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

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

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: 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

1. Zero-backend privacy by default (IndexedDB)

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

  • Machines, molds, resins, and T1 -> T2 -> T3 setup histories are stored locally in browser IndexedDB with 1-click JSON export/import for shift handover or backup.
  • Your API key stays in localStorage, and requests go straight over HTTPS to the calculation API.
  • Instead of forcing 180+ ERP/MES master-data fields, Studio only asks for the ~15 physics-critical inputs (polymer, average wall thickness, shot weight, flow length, screw diameter, clamp tonnage).

2. Four ways to deploy where IT blocks installers

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

3. Show the physics, not black-box numbers

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

  • An SVG screw-stroke & cushion diagram (MEL, IL0..ILn, VPTL, cushion, suck-back, swept volume).
  • A barrel thermal profile (BT4 -> BT1 -> NT) with before/after delta badges.
  • A dual-domain process chart (stroke-domain fill speed/pressure + time-domain holding/cooling with previous-round overlay).
  • Full recommend_thinking rule traces and process-window headroom gauges.

Live Case: Thin-Wall PP Container Flashing on T1

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.

Step 1: First-shot baseline (/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:

  • Clamp force headroom: +2%
  • Cooling time headroom: +0% (limiting factor - narrow window)
  • Injection velocity headroom: +40%
  • Fill/freeze window headroom: +58%

Step 2: Defect-driven tuning (/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:

  • MEL: 39.94 -> 36.61 mm (-3.33 mm)
  • ML0: 32.94 -> 29.61 mm (-3.33 mm)
  • IL0: 31.33 -> 28.00 mm (-3.33 mm)

Injection speed and pressure remain untouched - the root cause is volumetric overfill prior to packing, not clamp deficit.

1-Click Code & MCP Export from Studio

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.

Try It Free

  • Hosted Studio (6 languages, 3 built-in showcase molds, 30 free trial calls, no card): aicraft4injection.com/studio
  • Open-source repo (MIT): github.com/DreamwayChan/aicraft-injection-molding-studio

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

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.