How prabakaransara2325/colorshine-mes works
Colorshine MES is a web-based manufacturing execution system for plant operations, inventory, planning, quality, master data, and administration. Users enter through the browser shell, select a screen, and work through domain pages that call the API; the Express server dispatches requests to route handlers backed by PostgreSQL. The release README highlights TDC templates, historical records, and approval workflows. Backend route implementations beyond the excerpts were not inspected, so their internal behavior is summarized from the source index and documented capabilities.
Main entry points: server.ts HTTP API Server · db.ts PostgreSQL Access · api.ts API Client · App.tsx App Routing
Components 25
Web Client
- App Routing
frontend/src/App.tsx - Navigation Shell
frontend/src/components/Shell.tsx - API Client
frontend/src/lib/api.ts - Master Data UI
frontend/src/pages/GroupCodes.tsx - TDC Workspace
frontend/src/pages/TDCWizard.tsx - TDC Templates
frontend/src/pages/TDCTemplateMaster.tsx - Login & Users
frontend/src/pages/Login.tsx
Plant Operations
- Reference Masters
backend/src/routes/masters.ts - Goods Receipt
backend/src/routes/grn.ts - Inventory
backend/src/routes/inventory.ts - Production Planning
backend/src/routes/planning.ts - Operational Reports
backend/src/routes/reports.ts - SAP Inbound
backend/src/routes/integration.ts - MES Dashboard
backend/src/routes/dashboard.ts
Quality & TDC
- RM Quality
backend/src/routes/quality.ts - TDC Workflow
backend/src/routes/tdc.ts - TDC Email
backend/src/services/tdcEmail.ts
API & Platform
- HTTP API Server
backend/src/server.ts - Authentication
backend/src/routes/auth.ts - Session Authorization
backend/src/middleware/auth.ts - Access Context
backend/src/security.ts - User Administration
backend/src/routes/admin-users.ts - User Preferences
backend/src/routes/user-preferences.ts - PostgreSQL Access
backend/src/db.ts
Other components
- MES User
Connections 40
- MES User → App Routing: uses
frontend/src/App.tsx - App Routing → Navigation Shell: renders
frontend/src/App.tsx - App Routing → Login & Users: routes login
frontend/src/App.tsx - App Routing → TDC Workspace: routes workflow
frontend/src/App.tsx - App Routing → TDC Templates: routes templates
frontend/src/App.tsx - Navigation Shell → API Client: loads preferences
frontend/src/components/Shell.tsx - Master Data UI → API Client: requests master data
frontend/src/pages/GroupCodes.tsx - TDC Workspace → API Client: calls API
frontend/src/pages/TDCWizard.tsx - TDC Templates → API Client: calls API
frontend/src/pages/TDCTemplateMaster.tsx - Login & Users → API Client: uses session API
- API Client → HTTP API Server: sends HTTP requests
- HTTP API Server → Authentication: mounts auth routes
backend/src/server.ts - HTTP API Server → User Administration: mounts admin routes
backend/src/server.ts - HTTP API Server → User Preferences: mounts preferences
backend/src/server.ts - HTTP API Server → SAP Inbound: mounts SAP routes
backend/src/server.ts - HTTP API Server → Goods Receipt: mounts GRN routes
backend/src/server.ts - HTTP API Server → Inventory: mounts inventory
backend/src/server.ts - HTTP API Server → Production Planning: mounts planning
backend/src/server.ts - HTTP API Server → Operational Reports: mounts reports
backend/src/server.ts - HTTP API Server → Reference Masters: mounts masters
backend/src/server.ts - HTTP API Server → RM Quality: mounts quality
backend/src/server.ts - HTTP API Server → TDC Workflow: mounts TDC routes
backend/src/server.ts - HTTP API Server → MES Dashboard: mounts dashboard
backend/src/server.ts - Authentication → Access Context: loads access context
backend/src/routes/auth.ts - Authentication → Session Authorization: protects endpoints
backend/src/routes/auth.ts - Session Authorization → PostgreSQL Access: checks account state
backend/src/middleware/auth.ts - Access Context → PostgreSQL Access: queries access data
backend/src/security.ts - Authentication → PostgreSQL Access: reads and updates users
backend/src/routes/auth.ts - User Administration → PostgreSQL Access: reads and writes records
backend/src/routes/admin-users.ts - User Preferences → PostgreSQL Access: stores preferences
backend/src/routes/user-preferences.ts - Reference Masters → PostgreSQL Access: reads and writes masters
backend/src/routes/masters.ts - Goods Receipt → PostgreSQL Access: accesses receipt data
backend/src/routes/grn.ts - Inventory → PostgreSQL Access: accesses stock data
backend/src/routes/inventory.ts - Production Planning → PostgreSQL Access: accesses planning data
backend/src/routes/planning.ts - Operational Reports → PostgreSQL Access: queries reports
- SAP Inbound → PostgreSQL Access: imports inbound data
backend/src/routes/integration.ts - RM Quality → PostgreSQL Access: accesses quality data
backend/src/routes/quality.ts - TDC Workflow → PostgreSQL Access: stores TDC records
backend/src/routes/tdc.ts - TDC Workflow → TDC Email: sends notifications
backend/src/routes/tdc.ts - MES Dashboard → PostgreSQL Access: queries summaries
backend/src/routes/dashboard.ts