How mehedi-hasan-raju/garments-factory-erp-software works
This is a Garments ERP backend API. A client request enters the Express app, is routed to a domain endpoint, and—where the sampled controller shows the call—passes to domain services for validation and business operations. The major domains cover accounts, workforce and payroll, inventory, and purchasing. The source index identifies additional domain modules and their dependencies, but their implementation details were not sampled; those are represented at subsystem level, and only documented or indexed relationships are shown.
Main entry points: app.ts Express app · prisma.ts Prisma client · inventory.controller.ts Stock operations · auth.controller.ts Authentication
Components 19
API entry
- Express app
backend/src/app.ts
Accounts and workforce
- Authentication
backend/src/modules/auth/auth.controller.ts - User administration
backend/src/modules/users - Departments
backend/src/modules/departments/department.controller.ts - Employees
backend/src/modules/employees/employee.controller.ts - Employee salary
backend/src/modules/employees/employee-salary.controller.ts - Salary components
backend/src/modules/salary-components - Payroll
backend/src/modules/payrolls/payroll.controller.ts
Inventory and catalog
- Product catalog
backend/src/modules/products - Product categories
backend/src/modules/product-categories - Units
backend/src/modules/units - Stock operations
backend/src/modules/inventory/inventory.controller.ts - Warehouses
backend/src/modules/warehouses - Warehouse locations
backend/src/modules/warehouse-locations
Purchasing
- Suppliers
backend/src/modules/suppliers - Purchase orders
backend/src/modules/purchase-orders/purchase-order.controller.ts
Shared infrastructure
- Prisma client
backend/src/lib/prisma.ts - PostgreSQL
Other components
- ERP client
Connections 21
- ERP client → Express app: sends requests
backend/src/app.ts - Express app → Authentication: mounts auth routes
backend/src/app.ts - Express app → User administration: mounts user routes
backend/src/app.ts - Express app → Departments: mounts routes
backend/src/app.ts - Express app → Employees: mounts routes
backend/src/app.ts - Express app → Employee salary: mounts routes
backend/src/app.ts - Express app → Salary components: mounts routes
backend/src/app.ts - Express app → Payroll: mounts routes
backend/src/app.ts - Express app → Product catalog: mounts routes
backend/src/app.ts - Express app → Product categories: mounts routes
backend/src/app.ts - Express app → Units: mounts routes
backend/src/app.ts - Express app → Stock operations: mounts routes
backend/src/app.ts - Express app → Warehouses: mounts routes
backend/src/app.ts - Express app → Warehouse locations: mounts routes
backend/src/app.ts - Express app → Suppliers: mounts routes
backend/src/app.ts - Express app → Purchase orders: mounts routes
backend/src/app.ts - Authentication → Prisma client: reads and writes via repository
- Stock operations → Prisma client: uses repository and client
- Purchase orders → Prisma client: repository uses client
- Prisma client → PostgreSQL: connects through adapter
backend/src/lib/prisma.ts - Stock operations → PostgreSQL: persists stock operations