How axelpepen/apagonrd works
ApagónRD is a Dominican Republic power-outage information and community reporting app. The principal workflow lets users discover sector power status, submit a geolocated outage report (with optional photos), and review reports; separate dashboard and AI-assistant capabilities extend that workflow. Routing and authentication gate the app, while service classes communicate with the backend. The README documents product capabilities; source excerpts and the SOURCE INDEX support the shown routes and service relationships, but do not expose every implementation detail or backend endpoint.
Main entry points: AppRouting.tsx App shell and routes · BaseService.ts HTTP service layer · AuthService.ts Authentication service · SectorService.ts Sector service
Components 23
App and access
- App shell and routes
src/AppRouting.tsx - Authentication state
src/contexts/AuthContext.tsx - Sign-in and recovery
src/modules/auth/AuthPage.tsx - Public landing site
src/modules/landingSite/LandingSite.tsx
Power information
- Sector status map
src/modules/home/HomePage.tsx - Uptime statistics
src/modules/uptime/UptimeDashboardPage.tsx
Community reports
- Outage reporting
src/modules/ReportSector/ReportarPage.tsx - My reports
src/modules/Reports/MisReportesPage.tsx - AI assistant
src/modules/assistant/AssistantPage.tsx
Backend services
- Sector service
src/services/sector/SectorService.ts - Report service
src/services/report/ReportService.ts - File service
src/services/file/FileService.ts - Assistant service
src/services/assistant/AssistantService.ts - Authentication service
src/services/auth/AuthService.ts - HTTP service layer
src/services/BaseService.ts - Browser storage
src/utils/LocalStorage.ts
Domain models
- Sector and uptime models
src/domain/model/sector/Sector.ts - Report model
src/domain/model/report/Report.ts - User model
src/domain/model/user/user.ts - Pagination model
src/domain/filters/Page.ts - Token model
src/domain/model/auth/Token.ts
Other components
- Visitor
- ApagónRD backend API
Connections 31
- Visitor → App shell and routes: opens app
src/AppRouting.tsx - App shell and routes → Public landing site: routes to
src/AppRouting.tsx - App shell and routes → Sign-in and recovery: routes to
src/AppRouting.tsx - App shell and routes → Sector status map: routes to
src/AppRouting.tsx - App shell and routes → Uptime statistics: routes to
src/AppRouting.tsx - App shell and routes → Outage reporting: routes to
src/AppRouting.tsx - App shell and routes → My reports: routes to
src/AppRouting.tsx - App shell and routes → AI assistant: routes to
src/AppRouting.tsx - App shell and routes → Authentication state: provides auth
src/App.tsx - Authentication state → Authentication service: authenticates with
src/contexts/AuthContext.tsx - Authentication service → Browser storage: stores token
src/services/auth/AuthService.ts - Authentication service → ApagónRD backend API: requests auth
src/services/auth/AuthService.ts - Sector status map → Sector service: loads sectors
src/modules/home/HomePage.tsx - Uptime statistics → Sector service: loads uptime
src/modules/uptime/UptimeDashboardPage.tsx - Outage reporting → Sector service: resolves sector
src/modules/ReportSector/ReportarPage.tsx - Outage reporting → Report service: submits report
src/modules/ReportSector/ReportarPage.tsx - Outage reporting → File service: uploads photos
src/modules/ReportSector/ReportarPage.tsx - My reports → Report service: loads reports
src/modules/Reports/MisReportesPage.tsx - AI assistant → Assistant service: sends questions
src/modules/assistant/AssistantPage.tsx - Sector service → HTTP service layer: inherits requests
src/services/sector/SectorService.ts - Report service → HTTP service layer: inherits requests
src/services/report/ReportService.ts - Assistant service → HTTP service layer: inherits requests
src/services/assistant/AssistantService.ts - HTTP service layer → ApagónRD backend API: sends HTTP
src/services/BaseService.ts - Sector service → Sector and uptime models: uses model
src/services/sector/SectorService.ts - Report service → Report model: uses model
src/services/report/ReportService.ts - Assistant service → ApagónRD backend API: sends questions
- HTTP service layer → Token model: reads token
src/services/BaseService.ts - HTTP service layer → Pagination model: uses pagination
src/services/BaseService.ts - Authentication service → Token model: maps token
src/services/auth/AuthService.ts - Authentication service → User model: returns user
src/services/auth/AuthService.ts - Authentication state → User model: tracks user
src/contexts/AuthContext.tsx