How gowthamabi/garment-fabric-cutting-mern works
UG SaaS is a multi-tenant manufacturing and retail ERP, with an integrated accounting and SaaS administration layer. Users authenticate into company workspaces, then work through department or ERP screens; requests pass through API routes and controllers to tenant-scoped operational records and posting logic. The principal operational workflow covers purchasing and inward receipt, production and stock movement, sales/dispatch, and finance/reporting. The README also documents approvals, automation, workforce, bank reconciliation, and tenant backup capabilities. Some subsystems are represented by documented capabilities and tree paths; their internal calls are not shown.
Main entry points: api.js API client · departmentRoutes.js Department API · models.js ERP records · Company.js Company workspace
Components 25
User experience
- ERP client
client/src/App.jsx - Page routing
client/src/routes/AppRoutes.jsx - Department workspace
client/src/pages/erp/Departments.jsx - API client
client/src/api.js
Manufacturing operations
- Purchase orders
server/src/controllers/purchaseOrderController.js - Goods receipt
server/src/controllers/inwardController.js - Fabric cutting
server/src/controllers/fabricCuttingController.js - Production control
server/src/controllers/productionController.js - Dispatch and sales
server/src/controllers/outwardController.js - Delivery workflow
server/src/controllers/deliveryController.js
Integrated ERP
- ERP workspace
client/src/pages/erp/ErpWorkspace.jsx - Department API
server/src/erp/departmentRoutes.js - Document posting
server/src/erp/engine.js - ERP records
server/src/erp/models.js - Finance and controls
server/src/erp - ERP reporting
server/src/erp/reports.js
Tenant platform
- Tenant database
server/src/config/tenantDatabase.js - Company workspace
server/src/models/Company.js - Access administration
server/src/routes/access.routes.js - Plans and onboarding
server/src/controllers/saasController.js
Billing automation
- Payment automation
server/src/automation/routes.js - Automation worker
server/src/automation/worker.js - Billing records
server/src/automation/models.js
Other components
- Company user
- Payment provider
Connections 26
- Company user → ERP client: uses
client/src/App.jsx - ERP client → Page routing: renders
client/src/App.jsx - Page routing → Department workspace: routes to
client/src/routes/AppRoutes.jsx - Department workspace → API client: requests data
client/src/pages/erp/Departments.jsx - ERP workspace → API client: requests data
- API client → Purchase orders: calls API
- API client → Goods receipt: calls API
- API client → Fabric cutting: calls API
- API client → Production control: calls API
- API client → Dispatch and sales: calls API
- API client → Delivery workflow: calls API
- API client → Department API: calls API
- Department API → Document posting: uses rules
- Department API → ERP records: writes records
server/src/erp/departmentRoutes.js - Document posting → ERP records: plans documents
- ERP workspace → Finance and controls: offers
- Finance and controls → ERP reporting: reports through
server/src/erp/routes.js - ERP records → Tenant database: resolves database
server/src/erp/models.js - Company workspace → Tenant database: uses tenant model
server/src/models/Company.js - Access administration → Company workspace: reads company
server/src/routes/access.routes.js - Access administration → Tenant database: resolves models
- Plans and onboarding → Company workspace: provisions workspace
server/src/controllers/saasController.js - Plans and onboarding → Billing records: settles subscription
server/src/controllers/saasController.js - Payment automation → Billing records: reads billing
server/src/automation/routes.js - Payment automation → Payment provider: verifies payment
- Automation worker → Billing records: processes jobs