How sheter0909/capstoneproject works
EcoTrack is a barangay waste-management system with an admin portal, household and collector mobile experiences, and an Express/Prisma API. The principal workflow is a collector scanning a household QR code and recording a collection; households can then review collection history and receive notifications, while admins manage accounts, announcements, archives, and reports. Source coverage shows the API routing, authentication, validation, and admin API client; mobile screen-to-screen details and several route implementations were not excerpted, so those links are documented at the product level rather than inferred from imports.
Main entry points: routes.ts Route registry · lib/api.ts Mobile API client · lib/api.ts Admin API client · auth.ts Authentication routes
Components 34
Admin portal
- Account management
EcoTrack-Admin/app/garbage-collectors/page.tsx - Household management
EcoTrack-Admin/app/households/page.tsx - Reports and export
EcoTrack-Admin/app/reports/page.tsx - Announcements
EcoTrack-Admin/app/notifications/page.tsx - Activity log
EcoTrack-Admin/app/activity-log/page.tsx - Archived accounts
EcoTrack-Admin/app/archive/page.tsx - Admin API client
EcoTrack-Admin/lib/api.ts - Report export
EcoTrack-Admin/lib/reportExport.ts
Mobile app
- Household portal
EcoTrackApp/src/app/household/index.tsx - Collection history
EcoTrackApp/src/app/household/history.tsx - Household notifications
EcoTrackApp/src/app/household/notifications.tsx - Household QR
EcoTrackApp/src/app/household/qr.tsx - Collector portal
EcoTrackApp/src/app/garbagecollector/index.tsx - QR scan and entry
EcoTrackApp/src/app/garbagecollector/quick-scan.tsx - Scan results
EcoTrackApp/src/app/garbagecollector/scan-results.tsx - Mobile authentication
EcoTrackApp/src/context/auth.tsx - Mobile API client
EcoTrackApp/src/lib/api.ts
Backend API
- HTTP server
backend/src/server.ts - Route registry
backend/src/routes.ts - Authentication routes
backend/src/routes/auth.ts - Collection routes
backend/src/routes/collections.ts - Household routes
backend/src/routes/households.ts - Collector routes
backend/src/routes/collectors.ts - Notification routes
backend/src/routes/notifications.ts - Report routes
backend/src/routes/reports.ts - Activity routes
backend/src/routes/activity.ts - Route helpers
backend/src/routes/helpers.ts
API foundation
- Request validation
backend/src/validators.ts - Auth and errors
backend/src/middleware.ts - Login and tokens
backend/src/auth.ts - Response envelope
backend/src/response.ts
Other components
- Administrator
- Household user
- Garbage collector
Connections 48
- Administrator → Account management: manages
README.md - Administrator → Household management: manages
README.md - Administrator → Announcements: announces
README.md - Administrator → Reports and export: reviews
README.md - Administrator → Activity log: reviews
- Administrator → Archived accounts: manages
- Account management → Admin API client: requests data
EcoTrack-Admin/app/garbage-collectors/page.tsx - Household management → Admin API client: requests data
EcoTrack-Admin/app/households/page.tsx - Reports and export → Admin API client: requests data
EcoTrack-Admin/app/reports/page.tsx - Announcements → Admin API client: requests data
EcoTrack-Admin/app/notifications/page.tsx - Activity log → Admin API client: requests data
EcoTrack-Admin/app/activity-log/page.tsx - Reports and export → Report export: exports reports
EcoTrack-Admin/app/reports/page.tsx - Household user → Household portal: uses
README.md - Household user → Collection history: reviews
README.md - Household user → Household notifications: receives
README.md - Household user → Household QR: presents QR
README.md - Garbage collector → Collector portal: uses
README.md - Garbage collector → QR scan and entry: scans household
README.md - QR scan and entry → Scan results: shows scan
- Collector portal → QR scan and entry: records collection
README.md - Household portal → Mobile API client: uses API
- Collector portal → Mobile API client: uses API
- Mobile authentication → Mobile API client: uses API
- Collection history → Mobile API client: loads history
- Household notifications → Mobile API client: loads notices
- QR scan and entry → Mobile API client: submits collection
- Admin API client → HTTP server: calls API
README.md - Mobile API client → HTTP server: calls API
README.md - HTTP server → Route registry: mounts API routes
backend/src/server.ts - Route registry → Authentication routes: registers
backend/src/routes.ts - Route registry → Collection routes: registers
backend/src/routes.ts - Route registry → Household routes: registers
backend/src/routes.ts - Route registry → Collector routes: registers
backend/src/routes.ts - Route registry → Notification routes: registers
backend/src/routes.ts - Route registry → Report routes: registers
backend/src/routes.ts - Route registry → Activity routes: registers
backend/src/routes.ts - HTTP server → Auth and errors: handles errors
backend/src/server.ts - Authentication routes → Login and tokens: authenticates
backend/src/routes/auth.ts - Authentication routes → Auth and errors: validates requests
backend/src/routes/auth.ts - Authentication routes → Request validation: validates fields
backend/src/routes/auth.ts - Authentication routes → Route helpers: uses helpers
backend/src/routes/auth.ts - Activity routes → Auth and errors: checks access
backend/src/routes/activity.ts - Activity routes → Request validation: validates fields
backend/src/routes/activity.ts - Activity routes → Route helpers: uses helpers
backend/src/routes/activity.ts - Collection routes → Auth and errors: checks access
backend/src/routes/collections.ts - Collection routes → Request validation: validates fields
backend/src/routes/collections.ts - Collection routes → Route helpers: uses helpers
backend/src/routes/collections.ts - Collector routes → Auth and errors: checks access
backend/src/routes/collectors.ts