A Manufacturing Execution System (MES) for production tracking on electronics assembly lines — work orders, serialized units, routing steps, defect/repair tracking, first-off inspection, and location scanning.
- Admin — CRUD for operation types, operations, defect types, defects, SNA types, container types, API endpoints, and webhooks
- Setup — routes/steps, SNA definitions, jobs/WIP, PCB labeling (panelization), NPI forms
- Operational — scan progress, test center, SNA center, repair center, first-off forms, location scan/search
- Detail views — serial number and work order drill-downs
- Dashboard — production overview
- Workstation binding — assign an operation to each workstation
- Webhooks — fire configurable HTTP callbacks on operation events
- External validation — pluggable API endpoints for validating scans against external systems (e.g. an ERP/MRP database)
- Authentication — role/permission-based access (permission-gated navigation and routes), with a built-in mock mode for development and a JWT mode for integrating an external auth server
| Layer | Tech |
|---|---|
| Client | Angular 18 (standalone components) |
| Server | Node.js / Express / TypeScript |
| Database | SQLite (zero-config default) or SQL Server 2012+ |
| Deploy | Docker (multi-stage build) |
cd server
npm install
npm run dev # dev with reload
# or
npm run build && npm startWith no configuration, the server uses SQLite: on first start it creates server/data/mes.db and initializes the schema with sample lookup data automatically. Nothing else to set up.
The vendor is chosen by DB_VENDOR in server/.env (sqlite or mssql). If DB_VENDOR is not set, it defaults to mssql when DB_SERVER is configured and sqlite otherwise.
SQLite (default):
# optional overrides
DB_VENDOR=sqlite
DB_FILE=./data/mes.dbSQL Server: create a database, run docs/create_schema.sql against it (tables + sample lookup data, no foreign keys — SQL Server 2012 compatible), and configure server/.env:
PORT=3000
DB_SERVER=localhost
DB_DATABASE=mes
DB_USER=sa
DB_PASSWORD=yourpassword
DB_PORT=1433
DB_ENCRYPT=false
DB_TRUST_SERVER_CERTIFICATE=truecd client
npm install
npm start # ng serve with API proxy to the serverOpen http://localhost:4200.
docker compose up --buildBuilds the Angular client and the Express server into a single image; the server serves the compiled client and listens on port 3006. Database settings come from server/.env (optional — without one it runs on SQLite, persisted to ./data on the host).
AUTH_MODE (in server/.env) selects the mode:
mock(default) — no external auth server required. The login page offers built-in test accounts (operator,supervisor,engineer,admin) with different roles and permissions. Use this for development and evaluation.jwt— OAuth-style login against an external auth server. Configure:
AUTH_MODE=jwt
AUTH_APP_URL=http://auth.example.com
AUTH_CLIENT_ID=mes
AUTH_CLIENT_SECRET=yoursecret
AUTH_PUBLIC_KEY_URL=http://auth.example.com/.well-known/jwks.json
AUTH_JWT_ISSUER=mes-auth
AUTH_JWT_AUDIENCE=mes
AUTH_CALLBACK_URL=http://localhost:4200/auth/callbackNavigation and routes are gated by permissions (mes:setup for setup pages, mes:admin for admin pages); write access is attributed to the signed-in user.
client/ Angular app
server/ Express + TypeScript API (serves client build in production)
docs/ DB schema, sample external validator scripts, notes