How wryjonue/road-map works
RoadMap lets the Bataan community submit and browse road incidents, inspect locations, and follow report status; authorities and administrators can manage reports. The principal path runs from report creation through API routing and report processing into persistent incident data, then out to feeds, maps, dashboards, comments, and notifications. Authentication, AI assistance/moderation, routing, and real-time features extend that workflow. Frontend request wiring is only partly excerpted, so undocumented links are omitted or marked unverified.
Main entry points: report-service.js Report processing · router.jsx Application routes · index.js API dispatcher · comment-service.js Comments
Components 25
Web experience
- Application routes
src/router.jsx - Incident feed
src/pages/FeedPage.jsx - Report submission
src/pages/CreateReportPage.jsx - Report detail
src/pages/ViewReportPage.jsx - Incident map
src/pages/MapView.jsx - Metrics dashboard
src/pages/Dashboard.jsx - AI assistant
src/pages/AssistantPage.jsx - Role access
src/auth/roles.js
Incident workflow
- Report processing
api/report-service.js - Comments
api/comment-service.js - Location matching
api/location-service.js - Route calculation
api/routing-service.js - Hotspot clustering
api/clustering.js
API services
- API dispatcher
api/index.js - AI moderation
api/ai-service.js - Chat history
api/chat-service.js - Notifications
api/notification-service.js - Dashboard queries
api/dashboard-service.js - User profiles
api/user-service.js
Identity and platform
- Authentication
api/auth.js - RoadMap database
- Report image storage
Other components
- Community and staff
- Clerk
- Google Gemini
Connections 36
- Community and staff → Application routes: uses
src/router.jsx - Application routes → Incident feed: routes to
src/router.jsx - Application routes → Report submission: routes to
src/router.jsx - Application routes → Report detail: routes to
src/router.jsx - Application routes → Incident map: routes to
src/router.jsx - Application routes → Metrics dashboard: routes to
src/router.jsx - Application routes → AI assistant: routes to
src/router.jsx - Report detail → API dispatcher: requests reports
- Incident map → API dispatcher: requests hotspots
src/pages/MapView.jsx - API dispatcher → Report processing: dispatches reports
api/index.js - API dispatcher → Comments: dispatches comments
api/index.js - API dispatcher → Dashboard queries: dispatches metrics
api/index.js - API dispatcher → Chat history: loads history
api/index.js - API dispatcher → Notifications: loads notifications
api/index.js - API dispatcher → Authentication: authenticates requests
api/index.js - Report processing → Location matching: resolves locations
api/report-service.js - Report processing → Route calculation: calculates routes
api/report-service.js - Report processing → Hotspot clustering: computes hotspots
api/report-service.js - Report processing → AI moderation: moderates reports
api/report-service.js - Report processing → Comments: adds system comments
api/report-service.js - Report processing → Notifications: creates alerts
api/report-service.js - Comments → Report processing: loads report access
api/comment-service.js - Comments → Notifications: notifies participants
api/comment-service.js - Report processing → User profiles: formats authors
api/report-service.js - Dashboard queries → User profiles: formats authors
api/dashboard-service.js - Authentication → User profiles: syncs profiles
api/auth.js - User profiles → RoadMap database: reads and writes
api/user-service.js - Report processing → RoadMap database: reads and writes
api/report-service.js - Comments → RoadMap database: reads and writes
api/comment-service.js - Dashboard queries → RoadMap database: queries metrics
api/dashboard-service.js - AI moderation → Report image storage: reads report images
api/ai-service.js - AI moderation → Google Gemini: requests moderation
api/ai-service.js - Authentication → Clerk: verifies identity
- Application routes → Clerk: provides sign-in
- Report submission → Report processing: submits reports
- Community and staff → Role access: receives role access
src/auth/roles.js