How hyangwoosh/leaptron-warehouse-management-system works
This is a web-based inventory and operations system: staff manage products and bin locations, process RMAs and tool loans, and administer users, groups, and notifications. The client routes authenticated users to these workflows; the API serves routed controllers, which delegate domain operations to services and use database and cache configuration. The excerpts establish several API call chains, but provide little evidence for most client-to-API wiring or external notification delivery, so those links are omitted rather than inferred.
Main entry points: App.tsx Route shell · rma.controller.js RMA workflow controller · tLoanController.js Loan workflow controller · userController.js User and login controller
Components 31
Staff web client
- Route shell
client/src/App.tsx - Login and MFA
client/src/pages/auth/MultiFactorAuthentication.tsx - RMA workflow
client/src/pages/rma/NewRma.tsx - Tool-loan workflow
client/src/pages/tloans/NewtToan.tsx - RMA display
client/src/components/display/RmaDisplay.tsx - Loan display
client/src/components/display/TloanDisplay.tsx - Client state
client/src/app/store.tsx - Current-user state
client/src/app/reducers/CurrentUserSlice.ts - Navigation state
client/src/app/reducers/SidebarSlice.ts - API configuration
client/src/config/config.ts
API and workflows
- HTTP and socket server
api/index.js - API routes
api/src/routes/index.js - RMA routes
api/src/routes/rma.route.js - RMA workflow controller
api/src/controllers/rma.controller.js - RMA operations
api/src/services/rma.service.js - Loan routes
api/src/routes/tLoanRoutes.js - Loan workflow controller
api/src/controllers/tLoanController.js - Loan operations
api/src/services/tLoanService.js - Product updates
api/src/controllers/productController.js - Email notifications
api/src/controllers/emailNotificationController.js - Telegram notifications
api/src/controllers/telegramNotificationController.js
Identity and access
- User routes
api/src/routes/userRoutes.js - User and login controller
api/src/controllers/userController.js - User operations
api/src/services/userService.js - Notification-group operations
api/src/services/notificationGroupService.js - Request validation
api/src/middlewares/validation.js
Runtime infrastructure
- Cache client
api/src/config/caching.js - Database connection
api/src/config/database.js - Redis
- SQL database
Other components
- Staff user
Connections 34
- Staff user → Route shell: uses
client/src/App.tsx - Route shell → Login and MFA: routes to
client/src/App.tsx - Route shell → RMA workflow: routes to
client/src/App.tsx - Route shell → Tool-loan workflow: routes to
client/src/App.tsx - Route shell → RMA display: renders
client/src/App.tsx - Route shell → Loan display: renders
client/src/App.tsx - Login and MFA → Current-user state: dispatches to
client/src/pages/auth/MultiFactorAuthentication.tsx - Login and MFA → Navigation state: dispatches to
client/src/pages/auth/MultiFactorAuthentication.tsx - Route shell → Current-user state: checks auth
client/src/App.tsx - HTTP and socket server → API routes: mounts
api/index.js - API routes → RMA routes: registers
- API routes → Loan routes: registers
- RMA routes → RMA workflow controller: routes to
- Loan routes → Loan workflow controller: routes to
api/src/routes/tLoanRoutes.js - User routes → User and login controller: routes to
api/src/routes/userRoutes.js - User routes → Request validation: applies
api/src/routes/userRoutes.js - Loan routes → Request validation: applies
api/src/routes/tLoanRoutes.js - RMA workflow controller → RMA operations: calls
api/src/controllers/rma.controller.js - Loan workflow controller → Loan operations: calls
api/src/controllers/tLoanController.js - Loan workflow controller → Email notifications: calls
api/src/controllers/tLoanController.js - RMA workflow controller → Email notifications: calls
api/src/controllers/rma.controller.js - RMA workflow controller → Telegram notifications: calls
api/src/controllers/rma.controller.js - Loan workflow controller → Telegram notifications: calls
api/src/controllers/tLoanController.js - User and login controller → User operations: calls
api/src/controllers/userController.js - User and login controller → Notification-group operations: calls
api/src/controllers/userController.js - User and login controller → Cache client: reads and writes
api/src/controllers/userController.js - RMA workflow controller → Cache client: reads and writes
api/src/controllers/rma.controller.js - Loan workflow controller → Cache client: reads and writes
api/src/controllers/tLoanController.js - Cache client → Redis: connects
api/src/config/caching.js - RMA operations → Database connection: uses
api/src/services/rma.service.js - Loan operations → Database connection: uses
api/src/services/tLoanService.js - User operations → Database connection: uses
api/src/services/userService.js - Database connection → SQL database: connects
- HTTP and socket server → Product updates: dispatches MQTT updates
api/index.js