How ryanp4ul/mdrrmo_web works
This is a role-based emergency-response management application for an MDRRMO: residents submit incident reports, dispatchers review and coordinate response, drivers view assigned reports, and administrators manage operations and reporting. The tree shows dedicated interfaces for schedules, announcements, notifications, maps and vehicle tracking. The sampled resident-report component reads incident types and app state; report-generation routes build PDF reports from mock data and invoke a Python script. Most other component wiring and persistence behavior were not sampled, so their links are intentionally not inferred.
Main entry points: app-shell.tsx Role-based shell · report.tsx Emergency reporting · login-page.tsx Login · mock-data.ts Mock operational data
Components 30
Access and shell
- Role-based shell
src/components/layout/app-shell.tsx - Login
src/components/auth/login-page.tsx - Registration
src/components/auth/register-page.tsx
Resident services
- Resident dashboard
src/components/resident/dashboard.tsx - Emergency reporting
src/components/resident/report.tsx - Report history
src/components/resident/history.tsx - Notifications and schedule
src/components/resident/notifications.tsx
Response operations
- Dispatch dashboard
src/components/dispatcher/dashboard.tsx - Report coordination
src/components/dispatcher/reports.tsx - Report detail
src/components/dispatcher/report-detail.tsx - Response teams
src/components/dispatcher/responders.tsx - Dispatch schedule
src/components/dispatcher/schedule.tsx - Announcements
src/components/dispatcher/announcements.tsx - Vehicle tracking
src/components/shared/vehicle-tracking.tsx - Maps and heatmap
src/components/maps/heatmap.tsx - Driver reports
src/components/driver/reports.tsx
Administration
- Admin dashboard
src/components/admin/dashboard.tsx - User management
src/components/admin/user-management.tsx - Audit logs
src/components/admin/audit-logs.tsx - Incident types and teams
src/components/admin/incident-types.tsx - Announcement management
src/components/admin/announcements.tsx - Report management
src/components/admin/reports.tsx - Monthly PDF endpoint
src/app/api/admin/generate-monthly-report/route.ts - Weekly PDF endpoint
src/app/api/admin/generate-weekly-report/route.ts - PDF generation
scripts/generate_monthly_report.py
Application data
- App state
src/lib/store.ts - Mock operational data
src/lib/mock-data.ts - Domain types
src/lib/types.ts
Other components
- Residents
- Response staff
Connections 20
- Residents → Login: sign in
- Residents → Registration: register
- Response staff → Login: sign in
- Login → Role-based shell: enter app
- Registration → Role-based shell: continue
- Role-based shell → Resident dashboard: shows
- Role-based shell → Dispatch dashboard: shows
- Role-based shell → Admin dashboard: shows
- Residents → Emergency reporting: submit incident
- Emergency reporting → Mock operational data: reads types
- Emergency reporting → App state: reads app state
- Residents → Report history: review reports
- Residents → Notifications and schedule: view updates
- Response staff → Dispatch dashboard: coordinate response
- Response staff → Driver reports: view assignments
- Response staff → Admin dashboard: manage operations
- Monthly PDF endpoint → Mock operational data: reads reports and teams
- Weekly PDF endpoint → Mock operational data: reads reports and teams
- Monthly PDF endpoint → PDF generation: invokes
- Weekly PDF endpoint → PDF generation: invokes