# Building a Zero-Backend Industrial HMI as a Single-File HTML App (Vue 3 + IndexedDB) with a Real Injection Molding Flash Case

> 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: 2026-12-03 01:12:10+00:00

**Recommendation:** 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.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

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.

The 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.

GitHub repository (MIT): [github.com/DreamwayChan/aicraft-injection-molding-studio](https://github.com/DreamwayChan/aicraft-injection-molding-studio)

Manufacturing plants are understandably strict about where mold geometry, resin grades, cycle times, and trial logs live. So Studio deliberately has **no application backend**:

`T1 -> T2 -> T3` setup histories are stored locally in browser `localStorage`, and requests go straight over HTTPS to the calculation API.
| Mode | How it runs | Best for | 
|---|---|---|
| Hosted Web | Open `/studio/` in any browser | Instant trial with 30 free API calls | 
| Portable HTML | Double-click `AICraft-Studio-Portable.html` (`npm run build:portable` ) | Air-gapped or restricted shop-floor PCs (USB-friendly, zero Node/Docker) | 
| Docker | Lightweight nginx container (~22 MB) | Self-hosted plant intranet | 
| Local Dev | `npm install && npm run dev` | Contributors & custom HMI forks | 

A table saying `MEL = 39.94 mm` doesn't build trust at the press. Studio renders:

`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.
Consider 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.

`/v1/first-shot`)
| Parameter | Meaning | T1 Value | 
|---|---|---|
| `MEL` | Metering end position | `39.94 mm` | 
| `ML0` | Metering position stage 0 | `32.94 mm` | 
| `IL0` | Injection stroke end stage 0 | `31.33 mm` | 
| `VPTL` | V/P switchover position | `12.84 mm` | 
| `IP0` /`IP1` | Injection pressure stages | `140.0` /`103.7 MPa` | 
| `IV0` /`IV1` | Injection speed stages | `35.59` /`71.19 mm/s` | 
| `NT` /`BT1` | Nozzle / zone 1 temp | `236.0` /`258.0 °C` | 
| `CT` | Cooling time | `10.0 s` | 
| `PP0` /`PT0` | Holding pressure / time | `0.0 MPa` /`0.0 s` (fill-only T1) | 

Process window headroom reported by the engine:

`/v1/optimize` with `FLASH` / `moderate`)
A 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:

`39.94 -> 36.61 mm` (`-3.33 mm`)` ML0`: `32.94 -> 29.61 mm` (`IL0`: `31.33 -> 28.00 mm` (
Injection speed and pressure remain untouched—the root cause is volumetric overfill prior to packing, not clamp deficit.

Every mold configured in Studio generates ready-to-paste `cURL`, `Python`, `JSON`, and `MCP` payloads:

```
curl -X POST https://aicraft4injection.com/v1/first-shot \
  -H "Authorization: Bearer $AICRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "business_id": "PP-LID-130T",
    "target_shot_weight_g": 22,
    "polymer": { "polymer_abbreviation": "PP" },
    "mold": { "product_ave_thickness": 0.9, "product_max_length": 140 },
    "machine": {
      "clamping_force": 130,
      "injector": { "injector_screw_diameter_mm": 36 }
    }
  }'
curl -X POST https://aicraft4injection.com/v1/optimize \
  -H "Authorization: Bearer $AICRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "business_id": "PP-LID-130T",
    "defect_info": [{ "defect": "FLASH", "level": "moderate" }]
  }'
```

Because `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).

If 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)?
