{"slug": "building-a-zero-backend-industrial-hmi-as-a-single-file-html-app-vue-3-indexeddb", "title": "Building a Zero-Backend Industrial HMI as a Single-File HTML App (Vue 3 + IndexedDB) with a Real Injection Molding Flash Case", "summary": "A developer built AICraft Studio, a free, MIT-licensed, zero-backend industrial HMI for injection molding engineers, using Vue 3, TypeScript, and Tailwind CSS v4. The app stores setup histories in browser localStorage and calls a physics calculation API over HTTPS, and can run as a hosted web app, a portable single-file HTML build for air-gapped shop-floor PCs, or a ~22 MB nginx Docker container. A worked thin-wall PP flash case shows the rule engine reducing metering position from 39.94 mm to 36.61 mm rather than raising clamping force, since the press had only 2% clamp headroom and the root cause was volumetric overfill before packing.", "body_md": "Most injection molding engineers work beside a press controller on a locked-down shop-floor PC—not inside a terminal running `curl` or a 180-field legacy MES. When we turned our injection molding physics engine into an API & MCP server, we realized engineers also needed a fast, transparent HMI they could open immediately without filing an IT ticket.\n\nThe result is **[AICraft Studio](https://aicraft4injection.com/studio/?utm_source=devto)**: a free, open-source (MIT), zero-backend industrial HMI built with Vue 3, TypeScript, and Tailwind CSS v4. Here is how we designed it for real factory constraints, walked through with a live thin-wall PP flash calculation.\n\nGitHub repository (MIT): [github.com/DreamwayChan/aicraft-injection-molding-studio](https://github.com/DreamwayChan/aicraft-injection-molding-studio)\n\nManufacturing plants are understandably strict about where mold geometry, resin grades, cycle times, and trial logs live. So Studio deliberately has **no application backend**:\n\n`T1 -> T2 -> T3` setup histories are stored locally in browser `localStorage`, and requests go straight over HTTPS to the calculation API.\n| Mode | How it runs | Best for | \n|---|---|---|\n| Hosted Web | Open `/studio/` in any browser | Instant trial with 30 free API calls | \n| Portable HTML | Double-click `AICraft-Studio-Portable.html` (`npm run build:portable` ) | Air-gapped or restricted shop-floor PCs (USB-friendly, zero Node/Docker) | \n| Docker | Lightweight nginx container (~22 MB) | Self-hosted plant intranet | \n| Local Dev | `npm install && npm run dev` | Contributors & custom HMI forks | \n\nA table saying `MEL = 39.94 mm` doesn't build trust at the press. Studio renders:\n\n`MEL`, `IL0..ILn`, `VPTL`, cushion, suck-back, swept volume).` BT4 -> BT1 -> NT`) with before/after delta badges.` recommend_thinking` rule traces and process-window headroom gauges.\nConsider a classic high-speed packaging job: **PP**, `0.9 mm` wall thickness, `22.0 g` total shot weight, `140 mm` flow length, `Ø36 mm` screw on a `130 T` press showing **moderate flash** on T1.\n\n`/v1/first-shot`)\n| Parameter | Meaning | T1 Value | \n|---|---|---|\n| `MEL` | Metering end position | `39.94 mm` | \n| `ML0` | Metering position stage 0 | `32.94 mm` | \n| `IL0` | Injection stroke end stage 0 | `31.33 mm` | \n| `VPTL` | V/P switchover position | `12.84 mm` | \n| `IP0` /`IP1` | Injection pressure stages | `140.0` /`103.7 MPa` | \n| `IV0` /`IV1` | Injection speed stages | `35.59` /`71.19 mm/s` | \n| `NT` /`BT1` | Nozzle / zone 1 temp | `236.0` /`258.0 °C` | \n| `CT` | Cooling time | `10.0 s` | \n| `PP0` /`PT0` | Holding pressure / time | `0.0 MPa` /`0.0 s` (fill-only T1) | \n\nProcess window headroom reported by the engine:\n\n`/v1/optimize` with `FLASH` / `moderate`)\nA generic chatbot almost always replies \"increase clamping force.\" Because the press only has **+2% clamp headroom** and holding pressure is still `0 MPa`, our rule engine fires `Rule.dat #99` (`IF FLASH_mid AND HOLDEXIST_low THEN MEL_reduce_mid`) followed by a coupled dose guard:\n\n`39.94 -> 36.61 mm` (`-3.33 mm`)` ML0`: `32.94 -> 29.61 mm` (`IL0`: `31.33 -> 28.00 mm` (\nInjection speed and pressure remain untouched—the root cause is volumetric overfill prior to packing, not clamp deficit.\n\nEvery mold configured in Studio generates ready-to-paste `cURL`, `Python`, `JSON`, and `MCP` payloads:\n\n```\ncurl -X POST https://aicraft4injection.com/v1/first-shot \\\n  -H \"Authorization: Bearer $AICRAFT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"business_id\": \"PP-LID-130T\",\n    \"target_shot_weight_g\": 22,\n    \"polymer\": { \"polymer_abbreviation\": \"PP\" },\n    \"mold\": { \"product_ave_thickness\": 0.9, \"product_max_length\": 140 },\n    \"machine\": {\n      \"clamping_force\": 130,\n      \"injector\": { \"injector_screw_diameter_mm\": 36 }\n    }\n  }'\ncurl -X POST https://aicraft4injection.com/v1/optimize \\\n  -H \"Authorization: Bearer $AICRAFT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"business_id\": \"PP-LID-130T\",\n    \"defect_info\": [{ \"defect\": \"FLASH\", \"level\": \"moderate\" }]\n  }'\n```\n\nBecause `business_id` links the stored T1 archive automatically, the `/v1/optimize` call stays tiny instead of re-sending ~50 machine parameters. The same tools also run over Streamable HTTP MCP at `https://aicraft4injection.com/mcp` or via the open-source stdio server [aicraft-mcp-server](https://github.com/DreamwayChan/aicraft-mcp-server).\n\nIf you build browser-based HMIs or local-first tools for panel PCs, what was the trickiest shop-floor edge case you hit (offline storage, touch targets, glare, or IT lock-down)?", "url": "https://wpnews.pro/news/building-a-zero-backend-industrial-hmi-as-a-single-file-html-app-vue-3-indexeddb", "canonical_source": "https://dev.to/moss_chan_15cdefc01087a6e/building-a-zero-backend-industrial-hmi-as-a-single-file-html-app-vue-3-indexeddb-with-a-real-362d", "published_at": "2026-12-03 01:12:10+00:00", "updated_at": "2026-12-03 01:16:47.185981+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "agent-protocols", "developer-tools"], "entities": ["AICraft Studio", "Vue 3", "TypeScript", "Tailwind CSS", "GitHub", "Docker"], "also_reported_by": [], "takeaway": "For moderate flash with only 2% clamp headroom and zero holding pressure, the rule engine cuts metering end position by 3.33 mm (39.94 to 36.61 mm) instead of raising clamp force, since the cause is volumetric overfill before packing.", "recommendation": {"advice": "Expose your domain engine as an API and MCP server with ready-to-paste cURL, Python, and JSON payloads, and ship a zero-backend client that stores state in localStorage for locked-down environments.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/building-a-zero-backend-industrial-hmi-as-a-single-file-html-app-vue-3-indexeddb", "markdown": "https://wpnews.pro/news/building-a-zero-backend-industrial-hmi-as-a-single-file-html-app-vue-3-indexeddb.md", "text": "https://wpnews.pro/news/building-a-zero-backend-industrial-hmi-as-a-single-file-html-app-vue-3-indexeddb.txt", "jsonld": "https://wpnews.pro/news/building-a-zero-backend-industrial-hmi-as-a-single-file-html-app-vue-3-indexeddb.jsonld"}}