How santifonzalida/geo-baches works
Geo Baches is a public pothole-reporting and map application with an administrative review panel. Residents browse approved reports, submit reports with location and optional photos, and confirm whether a pothole remains; administrators review pending reports, update status, and manage contact messages. The sampled frontend and backend sources show these capabilities and their main internal layers. Some modules are indexed but unsampled, so their internal behavior and specific frontend-to-backend links are omitted or left unverified.
Main entry points: baches.service.ts Report client · mapa.component.ts Map and detail · admin-dashboard.component.ts Admin dashboard · baches.controller.ts Reports API
Components 24
Public map
- Map and detail
frontend/src/app/components/mapa/mapa.component.ts - Report entry
frontend/src/app/components/mapa/mapa.component.ts - Report client
frontend/src/app/services/baches.service.ts - Report model
frontend/src/app/models/bache.model.ts - About and contact
frontend/src/app/components/acerca-de/acerca-de.component.ts
Admin tools
- Admin dashboard
frontend/src/app/components/admin-dashboard/admin-dashboard.component.ts - Pending review
frontend/src/app/components/admin-pendientes/admin-pendientes.component.ts - Admin login
frontend/src/app/components/login/login.component.ts - Frontend auth
frontend/src/app/services/auth.service.ts
Backend services
- Authentication API
backend/src/auth/auth.controller.ts - User and roles
backend/src/usuarios/usuarios.service.ts - Reports API
backend/src/baches/baches.controller.ts - Report operations
backend/src/baches/baches.service.ts - Confirmations
backend/src/baches/confirmaciones.controller.ts - Contact messages
backend/src/contacto/contacto.controller.ts - Reverse geocoding
backend/src/geocoding/geocoding.service.ts
Data and integrations
- Report records
backend/src/baches/entities/bache.entity.ts - Photo handling
backend/src/baches/fotos.service.ts - Photo storage
backend/src/storage/storage.service.ts - PostgreSQL
Other components
- Resident
- Administrator
- S3-compatible bucket
- Nominatim
Connections 26
- Resident → Map and detail: browses
- Map and detail → Report client: loads reports
frontend/src/app/components/mapa/mapa.component.ts - Report entry → Report client: submits report
frontend/src/app/components/mapa/mapa.component.ts - Report client → Report model: maps data
frontend/src/app/services/baches.service.ts - Map and detail → Report model: renders reports
frontend/src/app/components/mapa/mapa.component.ts - Map and detail → Report client: sends confirmations
frontend/src/app/components/mapa/mapa.component.ts - About and contact → Contact messages: sends message
- Administrator → Admin login: signs in
- Admin login → Frontend auth: requests login
- Frontend auth → Authentication API: requests token
- Authentication API → User and roles: finds account
- Administrator → Admin dashboard: manages reports
- Admin dashboard → Report client: loads summaries
frontend/src/app/components/admin-dashboard/admin-dashboard.component.ts - Pending review → Report client: reviews reports
frontend/src/app/components/admin-pendientes/admin-pendientes.component.ts - Admin dashboard → Contact messages: loads messages
- Report client → Reports API: calls reports API
- Reports API → Report operations: delegates operations
backend/src/baches/baches.controller.ts - Reports API → Photo handling: stores uploaded photo
backend/src/baches/baches.controller.ts - Report operations → Report records: manages reports
- Confirmations → Report records: uses report entities
- Report client → Reverse geocoding: requests address
- Reverse geocoding → Nominatim: queries
- Photo handling → Photo storage: stores and retrieves
- Photo storage → S3-compatible bucket: uses when configured
backend/src/storage/storage.service.ts - Report records → PostgreSQL: persists in
- Contact messages → PostgreSQL: stores messages