# 0nru/proyectosirci architecture

> Architecture diagram of the GitHub repository 0nru/proyectosirci, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/0nru/proyectosirci
- Repository: https://github.com/0nru/proyectosirci

## Overview

SIRCI is a Laravel web application for citizen-submitted, location-aware municipal reports. The principal workflow is login, open the report form, select an active category and mark a location, then validate and save the report with its initial received status and history entry. The graph also shows the panel and the supporting report, category, and user data layer. The README is empty; the map-related views and script are represented from the tree, but their runtime connections are not asserted because their excerpts do not show them.

Main entry points: [`app/app/Http/Controllers/ReporteController.php`](https://github.com/0nru/proyectosirci/blob/master/app/app/Http/Controllers/ReporteController.php) (Report handling), [`app/routes/web.php`](https://github.com/0nru/proyectosirci/blob/master/app/routes/web.php) (Web routes), [`app/public/index.php`](https://github.com/0nru/proyectosirci/blob/master/app/public/index.php) (Laravel request entry), [`app/bootstrap/app.php`](https://github.com/0nru/proyectosirci/blob/master/app/bootstrap/app.php) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web access"]
  node_entry["Laravel request entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_routes["Web routes<br/>[web.php]"]
  node_panel["User panel<br/>[panel.blade.php]"]
  node_welcome["Welcome page<br/>[welcome.blade.php]"]
end

subgraph group_identity["Identity"]
  node_login_view["Login screen<br/>[login.blade.php]"]
  node_auth["Session authentication<br/>[AuthController.php]"]
end

subgraph group_reports["Report workflow"]
  node_report_controller["Report handling"]
  node_report_form["Report form<br/>[crear.blade.php]"]
  node_map_script["Report map logic<br/>[reporte-mapa.js]"]
end

subgraph group_data["Domain data"]
  node_report_model["Report model<br/>[Reporte.php]"]
  node_category_model["Category model<br/>[Categoria.php]"]
  node_user_model["User model<br/>[User.php]"]
  node_database[("Application database<br/>[sirci.sql]")]
end

node_citizen(("Browser user"))

node_citizen -->|"sends requests"| node_entry
node_entry -->|"loads app"| node_bootstrap
node_bootstrap -->|"registers routes"| node_routes
node_routes -->|"dispatches login"| node_auth
node_routes -->|"dispatches reports"| node_report_controller
node_auth -->|"renders login"| node_login_view
node_routes -->|"renders panel"| node_panel
node_report_controller -->|"renders form"| node_report_form
node_report_controller -->|"loads categories"| node_category_model
node_report_controller -->|"creates report"| node_report_model
node_report_controller -->|"reads and writes"| node_database
node_user_model -.->|"maps user records"| node_database

click node_entry "https://github.com/0nru/proyectosirci/blob/master/app/public/index.php"
click node_bootstrap "https://github.com/0nru/proyectosirci/blob/master/app/bootstrap/app.php"
click node_routes "https://github.com/0nru/proyectosirci/blob/master/app/routes/web.php"
click node_login_view "https://github.com/0nru/proyectosirci/blob/master/app/resources/views/login.blade.php"
click node_auth "https://github.com/0nru/proyectosirci/blob/master/app/app/Http/Controllers/AuthController.php"
click node_panel "https://github.com/0nru/proyectosirci/blob/master/app/resources/views/panel.blade.php"
click node_report_controller "https://github.com/0nru/proyectosirci/blob/master/app/app/Http/Controllers/ReporteController.php"
click node_report_form "https://github.com/0nru/proyectosirci/blob/master/app/resources/views/reportes/crear.blade.php"
click node_map_script "https://github.com/0nru/proyectosirci/blob/master/app/public/js/reporte-mapa.js"
click node_welcome "https://github.com/0nru/proyectosirci/blob/master/app/resources/views/welcome.blade.php"
click node_report_model "https://github.com/0nru/proyectosirci/blob/master/app/app/Models/Reporte.php"
click node_category_model "https://github.com/0nru/proyectosirci/blob/master/app/app/Models/Categoria.php"
click node_user_model "https://github.com/0nru/proyectosirci/blob/master/app/app/Models/User.php"
click node_database "https://github.com/0nru/proyectosirci/blob/master/sirci.sql"

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_entry,node_bootstrap,node_routes,node_panel,node_welcome,node_citizen toneBlue
class node_login_view,node_auth toneAmber
class node_report_controller,node_report_form,node_map_script toneMint
class node_report_model,node_category_model,node_user_model,node_database toneRose
```

## Components

### Web access

- [Laravel request entry](https://github.com/0nru/proyectosirci/blob/master/app/public/index.php): `app/public/index.php`
- [App bootstrap](https://github.com/0nru/proyectosirci/blob/master/app/bootstrap/app.php): `app/bootstrap/app.php`
- [Web routes](https://github.com/0nru/proyectosirci/blob/master/app/routes/web.php): `app/routes/web.php`
- [User panel](https://github.com/0nru/proyectosirci/blob/master/app/resources/views/panel.blade.php): `app/resources/views/panel.blade.php`
- [Welcome page](https://github.com/0nru/proyectosirci/blob/master/app/resources/views/welcome.blade.php): `app/resources/views/welcome.blade.php`

### Identity

- [Login screen](https://github.com/0nru/proyectosirci/blob/master/app/resources/views/login.blade.php): `app/resources/views/login.blade.php`
- [Session authentication](https://github.com/0nru/proyectosirci/blob/master/app/app/Http/Controllers/AuthController.php): `app/app/Http/Controllers/AuthController.php`

### Report workflow

- [Report handling](https://github.com/0nru/proyectosirci/blob/master/app/app/Http/Controllers/ReporteController.php): `app/app/Http/Controllers/ReporteController.php`
- [Report form](https://github.com/0nru/proyectosirci/blob/master/app/resources/views/reportes/crear.blade.php): `app/resources/views/reportes/crear.blade.php`
- [Report map logic](https://github.com/0nru/proyectosirci/blob/master/app/public/js/reporte-mapa.js): `app/public/js/reporte-mapa.js`

### Domain data

- [Report model](https://github.com/0nru/proyectosirci/blob/master/app/app/Models/Reporte.php): `app/app/Models/Reporte.php`
- [Category model](https://github.com/0nru/proyectosirci/blob/master/app/app/Models/Categoria.php): `app/app/Models/Categoria.php`
- [User model](https://github.com/0nru/proyectosirci/blob/master/app/app/Models/User.php): `app/app/Models/User.php`
- [Application database](https://github.com/0nru/proyectosirci/blob/master/sirci.sql): `sirci.sql`

### Other components

- **Browser user**

## Connections

- Browser user → Laravel request entry: sends requests
- Laravel request entry → App bootstrap: loads app (evidence: `app/public/index.php`)
- App bootstrap → Web routes: registers routes (evidence: `app/bootstrap/app.php`)
- Web routes → Session authentication: dispatches login (evidence: `app/routes/web.php`)
- Web routes → Report handling: dispatches reports (evidence: `app/routes/web.php`)
- Session authentication → Login screen: renders login (evidence: `app/app/Http/Controllers/AuthController.php`)
- Web routes → User panel: renders panel (evidence: `app/routes/web.php`)
- Report handling → Report form: renders form (evidence: `app/app/Http/Controllers/ReporteController.php`)
- Report handling → Category model: loads categories (evidence: `app/app/Http/Controllers/ReporteController.php`)
- Report handling → Report model: creates report (evidence: `app/app/Http/Controllers/ReporteController.php`)
- Report handling → Application database: reads and writes (evidence: `app/app/Http/Controllers/ReporteController.php`)
- User model → Application database: maps user records
