# helendrg14-em/fixa_back architecture

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

- Interactive diagram: https://gitdiagram.com/helendrg14-em/fixa_back
- Repository: https://github.com/helendrg14-em/fixa_back

## Overview

FIXA_back is the Laravel/Filament staff panel and public portal for managing urban-incident cases; a separate ASP.NET API owns case-changing business operations. The main workflow is staff review and case administration: the panel reads case data from the shared database, then sends changes through the API. Assisted report registration also uses the API. The repository excerpts show report-building logic and authentication internals; several screen implementations were not sampled, so their connections are included only where the README documents them.

Main entry points: [`app/Api/ClienteFixaApi.php`](https://github.com/helendrg14-em/fixa_back/blob/main/app/Api/ClienteFixaApi.php) (API client), [`app/Filament/Resources/Casos/CasoResource.php`](https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Resources/Casos/CasoResource.php) (Staff panel), [`app/Reportes/ReporteBuilder.php`](https://github.com/helendrg14-em/fixa_back/blob/main/app/Reportes/ReporteBuilder.php) (Report builder), [`app/Auth/ServicioAutenticacion.php`](https://github.com/helendrg14-em/fixa_back/blob/main/app/Auth/ServicioAutenticacion.php) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_panel["Staff panel<br/>[CasoResource.php]"]
  node_interventions["Intervention screens"]
  node_reviews["Review screens"]
  node_portal["Public portal<br/>[portal.blade.php]"]
  node_tracking["Case tracking"]
end

subgraph group_operations["Case operations"]
  node_api_client["API client<br/>[ClienteFixaApi.php]"]
  node_api_service{{"FIXA API"}}
end

subgraph group_domain["Domain and reporting"]
  node_case_model["Case records<br/>[Caso.php]"]
  node_category_model["Category records<br/>[Categoria.php]"]
  node_report_builder["Report builder<br/>[ReporteBuilder.php]"]
  node_category_factory["Category rules"]
  node_case_states["Case states<br/>[EstadoCaso.php]"]
  node_database[("Shared database")]
end

subgraph group_identity["Identity and setup"]
  node_auth_service["Authentication service"]
  node_user_model["Staff accounts<br/>[User.php]"]
  node_token["Panel JWT<br/>[TokenPanel.php]"]
  node_catalog_seeders["Catalog seeders"]
  node_district_seeder["District seeder"]
end

node_staff(("Staff"))
node_resident(("Resident"))

node_staff -->|"uses"| node_panel
node_panel -->|"reads cases"| node_database
node_panel -->|"requests changes"| node_api_client
node_interventions -->|"submits work"| node_api_client
node_reviews -->|"resolves reviews"| node_api_client
node_api_client -->|"sends commands"| node_api_service
node_api_service -->|"writes cases"| node_database
node_staff -->|"visits"| node_portal
node_resident -->|"visits"| node_portal
node_staff -->|"checks status"| node_tracking
node_panel -->|"registers reports"| node_report_builder
node_report_builder -->|"validates with"| node_category_factory
node_report_builder -->|"creates case"| node_case_model
node_report_builder -->|"stores report"| node_database
node_report_builder -->|"sets initial state"| node_case_states
node_panel -->|"manages categories"| node_category_model
node_auth_service -->|"gets current user"| node_user_model
node_token -->|"signs for user"| node_user_model
node_api_client -->|"gets identity"| node_auth_service
node_api_client -->|"attaches token"| node_token
node_catalog_seeders -->|"seeds catalogs"| node_database
node_district_seeder -->|"seeds districts"| node_database

click node_panel "https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Resources/Casos/CasoResource.php"
click node_interventions "https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Pages/GestionarIntervencion.php"
click node_reviews "https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Resources/Revisiones/RevisionResource.php"
click node_portal "https://github.com/helendrg14-em/fixa_back/blob/main/resources/views/publico/portal.blade.php"
click node_tracking "https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Pages/ConsultarSeguimiento.php"
click node_api_client "https://github.com/helendrg14-em/fixa_back/blob/main/app/Api/ClienteFixaApi.php"
click node_case_model "https://github.com/helendrg14-em/fixa_back/blob/main/app/Models/Caso.php"
click node_category_model "https://github.com/helendrg14-em/fixa_back/blob/main/app/Models/Categoria.php"
click node_report_builder "https://github.com/helendrg14-em/fixa_back/blob/main/app/Reportes/ReporteBuilder.php"
click node_category_factory "https://github.com/helendrg14-em/fixa_back/blob/main/app/Categorias/CreadorCategoria.php"
click node_case_states "https://github.com/helendrg14-em/fixa_back/blob/main/app/Enums/EstadoCaso.php"
click node_auth_service "https://github.com/helendrg14-em/fixa_back/blob/main/app/Auth/ServicioAutenticacion.php"
click node_user_model "https://github.com/helendrg14-em/fixa_back/blob/main/app/Models/User.php"
click node_token "https://github.com/helendrg14-em/fixa_back/blob/main/app/Api/TokenPanel.php"
click node_catalog_seeders "https://github.com/helendrg14-em/fixa_back/blob/main/database/seeders/CatalogosSeeder.php"
click node_district_seeder "https://github.com/helendrg14-em/fixa_back/blob/main/database/seeders/DistritosSeeder.php"

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_panel,node_interventions,node_reviews,node_portal,node_tracking toneBlue
class node_api_client,node_api_service toneAmber
class node_case_model,node_category_model,node_report_builder,node_category_factory,node_case_states,node_database toneMint
class node_auth_service,node_user_model,node_token,node_catalog_seeders,node_district_seeder toneRose
class node_staff,node_resident toneIndigo
```

## Components

### User interfaces

- [Staff panel](https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Resources/Casos/CasoResource.php): `app/Filament/Resources/Casos/CasoResource.php`
- [Intervention screens](https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Pages/GestionarIntervencion.php): `app/Filament/Pages/GestionarIntervencion.php`
- [Review screens](https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Resources/Revisiones/RevisionResource.php): `app/Filament/Resources/Revisiones/RevisionResource.php`
- [Public portal](https://github.com/helendrg14-em/fixa_back/blob/main/resources/views/publico/portal.blade.php): `resources/views/publico/portal.blade.php`
- [Case tracking](https://github.com/helendrg14-em/fixa_back/blob/main/app/Filament/Pages/ConsultarSeguimiento.php): `app/Filament/Pages/ConsultarSeguimiento.php`

### Case operations

- [API client](https://github.com/helendrg14-em/fixa_back/blob/main/app/Api/ClienteFixaApi.php): `app/Api/ClienteFixaApi.php`
- **FIXA API**

### Domain and reporting

- [Case records](https://github.com/helendrg14-em/fixa_back/blob/main/app/Models/Caso.php): `app/Models/Caso.php`
- [Category records](https://github.com/helendrg14-em/fixa_back/blob/main/app/Models/Categoria.php): `app/Models/Categoria.php`
- [Report builder](https://github.com/helendrg14-em/fixa_back/blob/main/app/Reportes/ReporteBuilder.php): `app/Reportes/ReporteBuilder.php`
- [Category rules](https://github.com/helendrg14-em/fixa_back/blob/main/app/Categorias/CreadorCategoria.php): `app/Categorias/CreadorCategoria.php`
- [Case states](https://github.com/helendrg14-em/fixa_back/blob/main/app/Enums/EstadoCaso.php): `app/Enums/EstadoCaso.php`
- **Shared database**

### Identity and setup

- [Authentication service](https://github.com/helendrg14-em/fixa_back/blob/main/app/Auth/ServicioAutenticacion.php): `app/Auth/ServicioAutenticacion.php`
- [Staff accounts](https://github.com/helendrg14-em/fixa_back/blob/main/app/Models/User.php): `app/Models/User.php`
- [Panel JWT](https://github.com/helendrg14-em/fixa_back/blob/main/app/Api/TokenPanel.php): `app/Api/TokenPanel.php`
- [Catalog seeders](https://github.com/helendrg14-em/fixa_back/blob/main/database/seeders/CatalogosSeeder.php): `database/seeders/CatalogosSeeder.php`
- [District seeder](https://github.com/helendrg14-em/fixa_back/blob/main/database/seeders/DistritosSeeder.php): `database/seeders/DistritosSeeder.php`

### Other components

- **Staff**
- **Resident**

## Connections

- Staff → Staff panel: uses (evidence: `README.md`)
- Staff panel → Shared database: reads cases (evidence: `README.md`)
- Staff panel → API client: requests changes (evidence: `README.md`)
- Intervention screens → API client: submits work (evidence: `README.md`)
- Review screens → API client: resolves reviews (evidence: `README.md`)
- API client → FIXA API: sends commands (evidence: `README.md`)
- FIXA API → Shared database: writes cases (evidence: `README.md`)
- Staff → Public portal: visits (evidence: `README.md`)
- Resident → Public portal: visits (evidence: `README.md`)
- Staff → Case tracking: checks status (evidence: `README.md`)
- Staff panel → Report builder: registers reports (evidence: `README.md`)
- Report builder → Category rules: validates with (evidence: `app/Reportes/ReporteBuilder.php`)
- Report builder → Case records: creates case (evidence: `app/Reportes/ReporteBuilder.php`)
- Report builder → Shared database: stores report (evidence: `app/Reportes/ReporteBuilder.php`)
- Report builder → Case states: sets initial state (evidence: `app/Reportes/ReporteBuilder.php`)
- Staff panel → Category records: manages categories (evidence: `README.md`)
- Authentication service → Staff accounts: gets current user (evidence: `app/Auth/ServicioAutenticacion.php`)
- Panel JWT → Staff accounts: signs for user (evidence: `app/Api/TokenPanel.php`)
- API client → Authentication service: gets identity (evidence: `app/Api/ClienteFixaApi.php`)
- API client → Panel JWT: attaches token (evidence: `app/Api/ClienteFixaApi.php`)
- Catalog seeders → Shared database: seeds catalogs
- District seeder → Shared database: seeds districts
