How huyduong10/inventory- works
This is an internal warehouse and office-supplies allocation application. Users manage product inventory and create or review purchase proposals and handover documents; completed handovers and exports reduce stock, while purchase-proposal stocking increases it. The React app coordinates product and document actions through an HTTP client to Express routes and controllers, which persist records in MongoDB. The tree also identifies export and reporting features, though their implementation was not sampled; those branches are shown at their supported source paths without inferring detailed behavior.
Main entry points: App.jsx App coordinator · app.js Express API · Product.js Product records · purchaseProposalController.js Purchase proposals
Components 25
React client
- App coordinator
client/src/App.jsx - HTTP client
client/src/api/client.js - Product management
client/src/components/ProductManagement.jsx - Document creation
client/src/components/DocumentCreation.jsx - Document list
client/src/components/DocumentList.jsx - PDF templates
client/src/components/PdfTemplates.jsx - Document identity
client/src/lib/documentIdentity.js - Saved formats
client/src/lib/savedFormats.js
Warehouse API
- Express API
server/src/app.js - Product routes
server/src/routes/productRoutes.js - Purchase routes
server/src/routes/purchaseProposalRoutes.js - Handover routes
server/src/routes/handoverRoutes.js - Export routes
server/src/routes/exportRoutes.js - Report routes
server/src/routes/reportRoutes.js - Product operations
server/src/controllers/productController.js - Purchase proposals
server/src/controllers/purchaseProposalController.js - Handover notes
server/src/controllers/handoverController.js - Export orders
server/src/controllers/exportController.js - Reporting
server/src/controllers/reportController.js
Domain data
- Product records
server/src/models/Product.js - Purchase records
server/src/models/PurchaseProposal.js - Handover records
server/src/models/HandoverNote.js - Export records
server/src/models/ExportOrder.js
Other components
- Staff user
- MongoDB
Connections 30
- Staff user → App coordinator: uses
- App coordinator → Product management: renders
- App coordinator → Document creation: renders
- App coordinator → Document list: renders
- App coordinator → PDF templates: renders
- App coordinator → HTTP client: requests
- App coordinator → Document identity: identifies documents
- App coordinator → Saved formats: reads saved formats
- HTTP client → Express API: sends HTTP
- Express API → Product routes: dispatches
- Express API → Purchase routes: dispatches
- Express API → Handover routes: dispatches
- Express API → Export routes: dispatches
- Express API → Report routes: dispatches
- Product routes → Product operations: dispatches
- Purchase routes → Purchase proposals: dispatches
- Handover routes → Handover notes: dispatches
- Export routes → Export orders: dispatches
- Report routes → Reporting: dispatches
- Product operations → Product records: reads and writes
- Purchase proposals → Purchase records: reads and writes
- Purchase proposals → Product records: resolves and stocks
- Handover notes → Handover records: reads and writes
- Handover notes → Product records: checks and decrements
- Export orders → Export records: reads and writes
- Export orders → Product records: adjusts stock
- Product records → MongoDB: persists
- Purchase records → MongoDB: persists
- Handover records → MongoDB: persists
- Export records → MongoDB: persists