# rodri1988/proyecto-municipalidad-valle-del-sol architecture

> Architecture diagram of the GitHub repository rodri1988/proyecto-municipalidad-valle-del-sol, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rodri1988/proyecto-municipalidad-valle-del-sol
- Repository: https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol

## Overview

SIGI is a municipal emergency-prevention and response platform. Residents and municipal staff register or sign in, submit incident reports (including photos), and use role-specific views; operators validate and prioritize reports and assign them to response teams, while administrators monitor incidents and manage users. The frontend also provides employment notices, activities, and profile features. The tree shows the frontend plus gateway and Eureka entry points, but not the backend microservice implementations; their internal routing and persistence are therefore not mapped.

Main entry points: [`Sigi_Front/src/services/apiClient.js`](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/apiClient.js) (HTTP API client), [`Sigi_Front/src/pages/Dashboard.jsx`](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Dashboard.jsx) (Operations dashboard), [`Sigi_Front/src/App.jsx`](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/App.jsx) (App routing), [`Sigi_Front/src/services/reporteService.js`](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/reporteService.js) (Report operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_authpages["Sign-in and registration<br/>[Register.jsx]"]
end

subgraph group_incidents["Incident response"]
  node_reportform["Submit incident report<br/>[NuevoReporte.jsx]"]
  node_media["Photo and media upload<br/>[mediaService.js]"]
  node_reports["Report operations<br/>[reporteService.js]"]
  node_operator["Operations dashboard<br/>[Dashboard.jsx]"]
  node_team["Response team panel"]
  node_emergencies["Emergency management"]
  node_map["Incident map<br/>[MapaIncidentes.jsx]"]
end

subgraph group_municipal["Municipal services"]
  node_jobs["Employment notices<br/>[empleoService.js]"]
  node_activities["Municipal activities<br/>[Actividades.jsx]"]
  node_users["User administration<br/>[usuarioService.js]"]
  node_profile["Profile management<br/>[Perfil.jsx]"]
end

subgraph group_platform["Platform integration"]
  node_client["HTTP API client<br/>[apiClient.js]"]
  node_gateway["API gateway"]
  node_jwt["JWT request filter<br/>[JwtAuthFilter.java]"]
  node_discovery["Service discovery"]
end

node_residents(("Residents and staff"))

node_residents -->|"use platform"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_reportform
node_authpages -.->|"uses session"| node_auth
node_auth -->|"stores credentials"| node_client
node_reportform -->|"creates report"| node_reports
node_reportform -->|"uploads photo"| node_media
node_operator -->|"reviews reports"| node_reports
node_operator -->|"loads emergencies"| node_emergencies
node_operator -->|"loads response staff"| node_users
node_operator -->|"renders incidents"| node_map
node_team -->|"loads team reports"| node_reports
node_reports -->|"calls API"| node_client
node_emergencies -->|"calls API"| node_client
node_users -->|"calls API"| node_client
node_jobs -.->|"calls API"| node_client
node_activities -->|"uses local service"| node_jobs
node_profile -.->|"updates profile"| node_users
node_media -.->|"uploads media"| node_client
node_client -.->|"sends API requests"| node_gateway
node_gateway -.->|"uses filter"| node_jwt
node_gateway -.->|"discovers services"| node_discovery

click node_app "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/App.jsx"
click node_auth "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/context/AuthContext.jsx"
click node_authpages "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Register.jsx"
click node_reportform "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/NuevoReporte.jsx"
click node_media "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/mediaService.js"
click node_reports "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/reporteService.js"
click node_operator "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Dashboard.jsx"
click node_team "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/DashboardEquipo.jsx"
click node_emergencies "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/emergenciaService.js"
click node_map "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/components/MapaIncidentes.jsx"
click node_jobs "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/empleoService.js"
click node_activities "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Actividades.jsx"
click node_users "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/usuarioService.js"
click node_profile "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Perfil.jsx"
click node_client "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/apiClient.js"
click node_gateway "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/api-gateway/src/main/java/com/municipalidad/gateway/ApiGatewayApplication.java"
click node_jwt "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/api-gateway/src/main/java/com/municipalidad/gateway/config/JwtAuthFilter.java"
click node_discovery "https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/eureka-server/src/main/java/com/municipalidad/eureka/EurekaServerApplication.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_auth,node_authpages toneBlue
class node_reportform,node_media,node_reports,node_operator,node_team,node_emergencies,node_map toneAmber
class node_jobs,node_activities,node_users,node_profile toneMint
class node_client,node_gateway,node_jwt,node_discovery toneRose
class node_residents toneIndigo
```

## Components

### Access and navigation

- [App routing](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/App.jsx): `Sigi_Front/src/App.jsx`
- [Authentication state](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/context/AuthContext.jsx): `Sigi_Front/src/context/AuthContext.jsx`
- [Sign-in and registration](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Register.jsx): `Sigi_Front/src/pages/Register.jsx`

### Incident response

- [Submit incident report](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/NuevoReporte.jsx): `Sigi_Front/src/pages/NuevoReporte.jsx`
- [Photo and media upload](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/mediaService.js): `Sigi_Front/src/services/mediaService.js`
- [Report operations](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/reporteService.js): `Sigi_Front/src/services/reporteService.js`
- [Operations dashboard](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Dashboard.jsx): `Sigi_Front/src/pages/Dashboard.jsx`
- [Response team panel](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/DashboardEquipo.jsx): `Sigi_Front/src/pages/DashboardEquipo.jsx`
- [Emergency management](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/emergenciaService.js): `Sigi_Front/src/services/emergenciaService.js`
- [Incident map](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/components/MapaIncidentes.jsx): `Sigi_Front/src/components/MapaIncidentes.jsx`

### Municipal services

- [Employment notices](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/empleoService.js): `Sigi_Front/src/services/empleoService.js`
- [Municipal activities](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Actividades.jsx): `Sigi_Front/src/pages/Actividades.jsx`
- [User administration](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/usuarioService.js): `Sigi_Front/src/services/usuarioService.js`
- [Profile management](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/pages/Perfil.jsx): `Sigi_Front/src/pages/Perfil.jsx`

### Platform integration

- [HTTP API client](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/Sigi_Front/src/services/apiClient.js): `Sigi_Front/src/services/apiClient.js`
- [API gateway](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/api-gateway/src/main/java/com/municipalidad/gateway/ApiGatewayApplication.java): `api-gateway/src/main/java/com/municipalidad/gateway/ApiGatewayApplication.java`
- [JWT request filter](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/api-gateway/src/main/java/com/municipalidad/gateway/config/JwtAuthFilter.java): `api-gateway/src/main/java/com/municipalidad/gateway/config/JwtAuthFilter.java`
- [Service discovery](https://github.com/rodri1988/proyecto-municipalidad-valle-del-sol/blob/main/eureka-server/src/main/java/com/municipalidad/eureka/EurekaServerApplication.java): `eureka-server/src/main/java/com/municipalidad/eureka/EurekaServerApplication.java`

### Other components

- **Residents and staff**

## Connections

- Residents and staff → App routing: use platform (evidence: `README.md`)
- App routing → Authentication state: provides auth (evidence: `Sigi_Front/src/App.jsx`)
- App routing → Sign-in and registration: routes to (evidence: `Sigi_Front/src/App.jsx`)
- App routing → Submit incident report: routes to (evidence: `Sigi_Front/src/App.jsx`)
- Sign-in and registration → Authentication state: uses session
- Authentication state → HTTP API client: stores credentials (evidence: `Sigi_Front/src/context/AuthContext.jsx`)
- Submit incident report → Report operations: creates report (evidence: `Sigi_Front/src/pages/NuevoReporte.jsx`)
- Submit incident report → Photo and media upload: uploads photo (evidence: `Sigi_Front/src/pages/NuevoReporte.jsx`)
- Operations dashboard → Report operations: reviews reports (evidence: `Sigi_Front/src/pages/Dashboard.jsx`)
- Operations dashboard → Emergency management: loads emergencies (evidence: `Sigi_Front/src/pages/Dashboard.jsx`)
- Operations dashboard → User administration: loads response staff (evidence: `Sigi_Front/src/pages/Dashboard.jsx`)
- Operations dashboard → Incident map: renders incidents (evidence: `Sigi_Front/src/pages/Dashboard.jsx`)
- Response team panel → Report operations: loads team reports (evidence: `Sigi_Front/src/pages/DashboardEquipo.jsx`)
- Report operations → HTTP API client: calls API (evidence: `Sigi_Front/src/services/reporteService.js`)
- Emergency management → HTTP API client: calls API (evidence: `Sigi_Front/src/services/emergenciaService.js`)
- User administration → HTTP API client: calls API (evidence: `Sigi_Front/src/services/usuarioService.js`)
- Employment notices → HTTP API client: calls API (evidence: `Sigi_Front/src/services/empleoService.js`)
- Municipal activities → Employment notices: uses local service (evidence: `Sigi_Front/src/pages/Actividades.jsx`)
- Profile management → User administration: updates profile
- Photo and media upload → HTTP API client: uploads media
- HTTP API client → API gateway: sends API requests
- API gateway → JWT request filter: uses filter
- API gateway → Service discovery: discovers services
