Skip to content

adamlauzon/MES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MES Track

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.

Features

  • 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

Stack

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)

Getting started

1. Server

cd server
npm install
npm run dev     # dev with reload
# or
npm run build && npm start

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

2. Database options

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

SQL 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=true

3. Client

cd client
npm install
npm start       # ng serve with API proxy to the server

Open http://localhost:4200.

Docker

docker compose up --build

Builds 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).

Authentication

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/callback

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

Repository layout

client/   Angular app
server/   Express + TypeScript API (serves client build in production)
docs/     DB schema, sample external validator scripts, notes

About

Manufacturing Execution System for electronics assembly - serialized WIP tracking, barcode scan stations, routing, defect & repair, first-off inspection, location tracking, and live dashboards. Angular + Express + TypeScript. Runs on zero-config SQLite or SQL Server.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages