How vmillion16/ebinv4 works
E-Bin is a waste-bin monitoring and management application: users sign in, view bin status and waste activity, and use operational features such as reports, settings, maintenance, user management, and collection rewards. The frontend composes these screens around shared bin/event state; its API calls connect to backend routes and persistent models. The supplied excerpts show several frontend dispatches and data-fetching relationships, but not the server’s route registration, so those wiring details are omitted. Some backend model imports use names that do not match the listed filenames; they are represented at the models-directory level.
Main entry points: Dashboard.js Dashboard shell · models Domain models · auth.js Token and role checks · App.js App and auth state
Components 26
Frontend experience
- App and auth state
ebin-frontend/src/App.js - Login
ebin-frontend/src/components/Login.js - Dashboard shell
ebin-frontend/src/components/Dashboard.js - Shared bin state
ebin-frontend/src/EbinContext.js - Navigation
ebin-frontend/src/components/Sidebar.js
Operations features
- Overview analytics
ebin-frontend/src/components/DashboardOverview.js - Bin monitoring
ebin-frontend/src/components/BinMonitoring.js - Fill calculations
ebin-frontend/src/utils/binFill.js - Waste activity
ebin-frontend/src/components/WasteSegregation.js - Collection rewards
ebin-frontend/src/components/CollectionReward.js - Reports
ebin-frontend/src/components/Reports.js - Settings
ebin-frontend/src/components/Settings.js - Maintenance
ebin-frontend/src/components/Maintenance.js - User management
ebin-frontend/src/components/Usermanagement.jsx
Backend services
- API service
- Authentication routes
ebin-backend/routes/auth.routes.js - Token and role checks
ebin-backend/middleware/auth.js - Bin routes
ebin-backend/routes/bins.js - Waste event routes
ebin-backend/routes/wasteEvents.js - Reward session routes
ebin-backend/routes/rewardSessions.js - Report routes
ebin-backend/routes/report.routes.js - Settings routes
ebin-backend/routes/settings.js - Maintenance routes
ebin-backend/routes/maintenanceRequest.js - Device integration
ebin-backend/routes/esp32routes.js
Persistent data
- Domain models
ebin-backend/models
Other components
- Dashboard user
Connections 32
- Dashboard user → App and auth state: opens app
ebin-frontend/src/App.js - App and auth state → Login: routes to
ebin-frontend/src/App.js - App and auth state → Dashboard shell: routes to
ebin-frontend/src/App.js - App and auth state → User management: routes to
ebin-frontend/src/App.js - Dashboard shell → Overview analytics: renders
ebin-frontend/src/components/Dashboard.js - Dashboard shell → Bin monitoring: renders
ebin-frontend/src/components/Dashboard.js - Dashboard shell → Waste activity: renders
ebin-frontend/src/components/Dashboard.js - Dashboard shell → Reports: renders
ebin-frontend/src/components/Dashboard.js - Dashboard shell → Settings: renders
ebin-frontend/src/components/Dashboard.js - Dashboard shell → Collection rewards: renders
ebin-frontend/src/components/Dashboard.js - Dashboard shell → Navigation: renders
ebin-frontend/src/components/Dashboard.js - Overview analytics → Shared bin state: reads state
ebin-frontend/src/components/DashboardOverview.js - Overview analytics → Fill calculations: calculates fill
ebin-frontend/src/components/DashboardOverview.js - Bin monitoring → Shared bin state: reads state
ebin-frontend/src/components/BinMonitoring.js - Bin monitoring → Fill calculations: uses fill logic
ebin-frontend/src/components/BinMonitoring.js - Waste activity → Shared bin state: reads and refreshes
ebin-frontend/src/components/WasteSegregation.js - Shared bin state → API service: fetches bins and events
ebin-frontend/src/EbinContext.js - Login → API service: submits credentials
- Settings → API service: reads and saves
ebin-frontend/src/components/Settings.js - Authentication routes → Domain models: uses user data
- Bin routes → Token and role checks: checks access
ebin-backend/routes/bins.js - Waste event routes → Token and role checks: checks access
ebin-backend/routes/wasteEvents.js - Reward session routes → Token and role checks: checks access
ebin-backend/routes/rewardSessions.js - Report routes → Token and role checks: checks access
ebin-backend/routes/report.routes.js - Maintenance routes → Token and role checks: checks access
ebin-backend/routes/maintenanceRequest.js - Report routes → Domain models: aggregates records
ebin-backend/routes/report.routes.js - Reward session routes → Domain models: reads and updates
ebin-backend/routes/rewardSessions.js - Bin routes → Domain models: uses bin records
- Waste event routes → Domain models: uses event records
- Settings routes → Domain models: uses settings
- Maintenance routes → Domain models: uses requests
- Device integration → Domain models: updates device data