How bridge360ph/bazoora works
Bazoora is a digital waste-management platform for community residents, drivers, Eco-Aides, and administrators. Its web PWA presents role-specific workflows; the Fastify API authenticates users and coordinates hauling requests, routes and assignments, fleet, notifications, settings, and analytics against shared contracts and persistent data. The clearest sampled end-to-end path is route management: an admin page fetches through a hook and API service, then the API route delegates domain work to its service and database. Other major capabilities are represented from the README and source tree; unsampled internals are not inferred.
Main entry points: App.tsx Role-based PWA · server.ts Fastify server · prismaClient.ts Application database · routeService.ts Route API client
Components 32
Web application
- Role-based PWA
apps/web/src/App.tsx - Sign-in and session
apps/web/src/features/auth/components/LoginPage.tsx - Route management
apps/web/src/features/route-management/AdminRouteManagementPage.tsx - Route data hook
apps/web/src/features/route-management/hooks/useRoutes.ts - Route API client
apps/web/src/features/route-management/routeService.ts - Hauling requests
apps/web/src/features/hauling-requests/AdminHaulingRequestManagementPage.tsx - Fleet management
apps/web/src/features/fleet-management/AdminFleetManagementPage.tsx - Eco-Aide management
apps/web/src/features/eco-aides/components/EcoAideManagementPage.tsx - Driver operations
apps/web/src/features/driver/components/DriverRoute.tsx - Truck tracking
apps/web/src/features/residents/components/TrackTruckPage.tsx - Analytics
apps/web/src/features/analytics/AdminAnalyticsPage.tsx - Notifications
apps/web/src/features/notifications/components/NotificationsPage.tsx - Profile and settings
apps/web/src/features/settings/components/SettingsPage.tsx
API and domain
- Fastify server
apps/api/src/server.ts - Authentication routes
apps/api/src/routes/authRoutes.ts - JWT and role guards
apps/api/src/lib/auth.ts - Route endpoints
apps/api/src/routes/routeManagementRoutes.ts - Route domain service
apps/api/src/services/routeManagementService.ts - Route assignment
apps/api/src/routes/routeAssignmentRoutes.ts - Assignment service
apps/api/src/services/routeAssignmentService.ts - Hauling requests API
apps/api/src/routes/haulingRequestRoutes.ts - Fleet endpoints
apps/api/src/routes/adminFleetRoutes.ts - Eco-Aide endpoints
apps/api/src/routes/ecoAides.ts - Analytics endpoints
apps/api/src/routes/analyticsRoutes.ts - Notification endpoints
apps/api/src/routes/notificationRoutes.ts - Settings endpoints
apps/api/src/routes/settingsRoutes.ts - Live event channel
apps/api/src/plugins/socket.ts
Shared contracts
- Shared API contracts
packages/shared/src/route.ts
Persistence
- Application database
packages/db/src/prismaClient.ts
Other components
- Administrators
- Residents
- Drivers and Eco-Aides
Connections 37
- Administrators → Role-based PWA: uses
README.md - Residents → Role-based PWA: uses
README.md - Drivers and Eco-Aides → Role-based PWA: uses
README.md - Role-based PWA → Sign-in and session: routes to
apps/web/src/App.tsx - Role-based PWA → Route management: routes to
apps/web/src/App.tsx - Role-based PWA → Hauling requests: routes to
apps/web/src/App.tsx - Role-based PWA → Fleet management: routes to
apps/web/src/App.tsx - Role-based PWA → Eco-Aide management: routes to
apps/web/src/App.tsx - Role-based PWA → Driver operations: routes to
apps/web/src/App.tsx - Role-based PWA → Truck tracking: routes to
apps/web/src/App.tsx - Role-based PWA → Analytics: routes to
apps/web/src/App.tsx - Role-based PWA → Notifications: routes to
apps/web/src/App.tsx - Role-based PWA → Profile and settings: routes to
apps/web/src/App.tsx - Route management → Route data hook: loads through
apps/web/src/features/route-management/hooks/useRoutes.ts - Route data hook → Route API client: fetches via
apps/web/src/features/route-management/hooks/useRoutes.ts - Route API client → Route endpoints: requests routes
apps/web/src/features/route-management/routeService.ts - Fastify server → Authentication routes: registers
apps/api/src/server.ts - Fastify server → Route endpoints: registers
apps/api/src/server.ts - Fastify server → Route assignment: registers
apps/api/src/server.ts - Fastify server → Hauling requests API: registers
apps/api/src/server.ts - Fastify server → Fleet endpoints: registers
apps/api/src/server.ts - Fastify server → Eco-Aide endpoints: registers
apps/api/src/server.ts - Fastify server → Analytics endpoints: registers
apps/api/src/server.ts - Fastify server → Notification endpoints: registers
apps/api/src/server.ts - Fastify server → Settings endpoints: registers
apps/api/src/server.ts - Route endpoints → Route domain service: delegates to
apps/api/src/routes/routeManagementRoutes.ts - Route assignment → Assignment service: delegates to
apps/api/src/routes/routeAssignmentRoutes.ts - Route domain service → Application database: reads and writes
apps/api/src/services/routeManagementService.ts - Assignment service → Application database: reads and writes
apps/api/src/services/routeAssignmentService.ts - Authentication routes → Application database: stores sessions
apps/api/src/routes/authRoutes.ts - Authentication routes → JWT and role guards: uses guard
apps/api/src/routes/authRoutes.ts - Settings endpoints → Application database: reads and writes
apps/api/src/routes/settingsRoutes.ts - Notification endpoints → Application database: reads and writes
apps/api/src/routes/notificationRoutes.ts - Notification endpoints → Live event channel: emits events
apps/api/src/routes/notificationRoutes.ts - Fleet endpoints → Application database: reads and writes
apps/api/src/routes/adminFleetRoutes.ts - Route domain service → Shared API contracts: uses types
apps/api/src/services/routeManagementService.ts - Route API client → Shared API contracts: uses types
apps/web/src/features/route-management/routeService.ts