How neel281998/construction-management-backend works
This is a construction-management backend API: authenticated users manage construction sites and work progress, inventory and plant materials, fuel, vehicles, and operational records. Requests enter through the server and route handlers, which apply authentication/permissions and work with MongoDB-backed models. The file tree and SOURCE INDEX show broad domain coverage, but the README provides no capability details; some domain links below reflect route imports listed by the index rather than inspected handler behavior.
Main entry points: index.js Route index · middleware/auth.js Authentication and permissions · sites.js Construction sites · routes/auth.js Authentication
Components 26
Access and API
- API server
server.js - Route index
api/index.js - Authentication
routes/auth.js - Authentication and permissions
middleware/auth.js - User accounts
models/User.js
Construction Operations
- Construction sites
routes/sites.js - Site records
models/Site.js - Work steps
routes/steps.js - Step progress
models/Step.js - Site reports
routes/constructionSiteReport.js
Supply Operations
- Materials inventory
routes/inventory.js - Inventory records
models/Inventory.js - Storage sites
routes/storageSites.js - Storage records
models/StorageSite.js - Inventory dispatch
routes/inventoryDispatch.js - Plant inventory
routes/plantInventory.js - Plant stock records
models/PlantInventory.js - Plant output delivery
routes/plantOutputDispatch.js
Fleet and Fuel
- Fuel management
routes/fuelManagement.js - Fuel storage
routes/fuelStorage.js - Vehicle management
routes/vehicles.js - Vehicle records
models/Vehicle.js - Vehicle analytics
routes/vehicleAnalytics.js
Operational Support
- Activity logging
utils/activityLogger.js - Alerts and notifications
routes/alerts.js - Attendance
routes/attendance.js
Connections 34
- API server → Route index: loads
- Route index → Authentication: imports
api/index.js - Route index → Construction sites: imports
api/index.js - Route index → Materials inventory: imports
api/index.js - Route index → Inventory dispatch: imports
api/index.js - Route index → Plant inventory: imports
api/index.js - Route index → Plant output delivery: imports
api/index.js - Route index → Fuel management: imports
api/index.js - Route index → Fuel storage: imports
api/index.js - Route index → Vehicle management: imports
api/index.js - Route index → Vehicle analytics: imports
api/index.js - Route index → Alerts and notifications: imports
api/index.js - Route index → Attendance: imports
api/index.js - Authentication → User accounts: queries
routes/auth.js - Authentication → Authentication and permissions: uses
routes/auth.js - Authentication and permissions → User accounts: loads user
middleware/auth.js - Construction sites → Site records: queries
routes/sites.js - Construction sites → Step progress: queries
routes/sites.js - Work steps → Step progress: imports
- Site reports → Step progress: queries
routes/constructionSiteReport.js - Site reports → Site records: queries
routes/constructionSiteReport.js - Materials inventory → Inventory records: imports
routes/inventory.js - Storage sites → Storage records: queries
routes/storageSites.js - Inventory dispatch → Inventory records: imports
routes/inventoryDispatch.js - Inventory dispatch → Storage records: imports
routes/inventoryDispatch.js - Plant inventory → Plant stock records: imports
routes/plantInventory.js - Plant output delivery → Plant stock records: imports
routes/plantOutputDispatch.js - Fuel storage → Authentication and permissions: checks access
routes/fuelStorage.js - Vehicle management → Vehicle records: imports
- Vehicle analytics → Vehicle records: imports
- Fuel management → Activity logging: uses
routes/fuelManagement.js - Construction sites → Activity logging: uses
routes/sites.js - Alerts and notifications → Authentication and permissions: uses
routes/alerts.js - Attendance → Authentication and permissions: uses
routes/attendance.js