Node/Express TypeScript API for the MACON Office Interface.
- Verifies Supabase JWT (role:
office) - Connects to MongoDB
- Proxies read-only machine status/events to PLC-bridge
- Proxies read-only file listing/download to File-Bridge
pnpm i
cp .env.example .env
pnpm devPORT=8080
MONGO_URI=mongodb://mongo-host:27017
MONGO_DB=MACON_Production
PLC_BRIDGE_BASE=http://10.10.10.5:5001
FILE_BRIDGE_BASE=http://10.10.10.5:5100
ALLOWED_ORIGIN=https://your-frontend.example.com
SUPABASE_JWKS=https://xyzcompany.supabase.co/auth/v1/keys
REQUIRED_ROLE=office
pnpm dev– Dev mode with tsxpnpm build– tsc buildpnpm start– run built app