# francoxe/test1 architecture

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

- Interactive diagram: https://gitdiagram.com/francoxe/test1
- Repository: https://github.com/francoxe/test1

## Overview

#### Purpose and runtime
`LogeoV2` is an ASP.NET Core MVC application for user access, administration, and municipal-style complaint (“reclamo”) management. The runnable project is `LogeoV2/LogeoV2.csproj`; application startup and dependency/pipeline configuration begin at `LogeoV2/Program.cs`.

#### HTTP and presentation boundary
MVC controllers receive browser requests, coordinate services, and render Razor views. Main entry areas are access/authentication (`LogeoV2/Controllers/AccesoController.cs`), user/role administration (`LogeoV2/Controllers/AdministracionController.cs`), and complaint workflows (`LogeoV2/Controllers/ReclamosController.cs`). Notifications have a dedicated endpoint surface at `LogeoV2/Controllers/NotificacionesController.cs`.

Views are server-rendered Razor pages, with shared layout/navigation at `LogeoV2/Views/Shared/_Layout.cshtml`. Complaint UI includes personal, departmental, management, history, and metrics screens under `LogeoV2/Views/Reclamos/`.

#### Identity, authorization, and administration
Users, roles, permissions, and role-permission mappings form the authorization domain:
- `LogeoV2/Models/Usuario.cs`
- `LogeoV2/Models/Rol.cs`
- `LogeoV2/Models/Permiso.cs`

Service boundaries encapsulate this logic behind interfaces and implementations: `LogeoV2/Services/IUsuarioService.cs` / `UsuarioService.cs`, `LogeoV2/Services/IRolService.cs` / `RolService.cs`, and `LogeoV2/Services/IPermisoService.cs` / `PermisoService.cs`. Administration-oriented request/view shapes are separated from entities in `LogeoV2/ViewModels/AdministracionViewModels.cs` and `LogeoV2/ViewModels/UsuarioVM.cs`.

#### Complaint lifecycle
The central business flow is creation, assignment/management, status history, and reporting of complaints. The persistent domain includes:
- `LogeoV2/Models/Reclamo.cs`
- `LogeoV2/Models/HistorialEstado.cs`
- `LogeoV2/Models/Categoria.cs`

`LogeoV2/Services/ReclamoService.cs`, behind `IReclamoService.cs`, is the business boundary used by the complaint controller. Location and routing context are modeled with `Departamento.cs` and `Barrio.cs`. Controller-to-view data is purpose-built through `ReclamoVM.cs`, `GestionReclamosVM.cs`, `HistorialReclamosVM.cs`, and `MetricasReclamosVM.cs`, including pagination models.

#### Persistence and schema evolution
Entity Framework Core persistence is centralized in `LogeoV2/Data/AppDBContext.cs`, which connects controllers/services to the relational data store configured by `LogeoV2/appsettings.json`. The baseline schema and current EF model snapshot reside in `LogeoV2/Migrations/20250118234610_Primera Migracion.cs` and `LogeoV2/Migrations/AppDBContextModelSnapshot.cs`. Duplicate root-level folders appear to be older or parallel copies; the nested `LogeoV2/` project tree is the authoritative runnable structure.

#### Cross-cutting operational services
Auditing, notifications, email, and exports are explicit service seams rather than controller concerns:
- Audit: `LogeoV2/Services/IAuditoriaService.cs`, `AuditoriaService.cs`, with `LogeoV2/Models/LogAuditoria.cs`
- Notifications: `LogeoV2/Services/INotificacionService.cs`, `NotificacionService.cs`, with `LogeoV2/Models/Notificacion.cs`
- External email integration: `LogeoV2/Services/IEmailService.cs`, `EmailService.cs`
- Reporting/export generation: `LogeoV2/Services/IExportService.cs`, `ExportService.cs`

#### Client assets and local storage
The application serves static CSS, JavaScript, Bootstrap, jQuery, and validation assets from `LogeoV2/wwwroot/`. `LogeoV2/wwwroot/uploads/` indicates a filesystem boundary for uploaded content. No API client, queue, or separate frontend runtime is evidenced by the tree; external integration is principally email plus the configured relational database.

Main entry points: [`LogeoV2/Services/ReclamoService.cs`](https://github.com/francoxe/test1/blob/main/LogeoV2/Services/ReclamoService.cs) (Complaint service), [`LogeoV2/Controllers/ReclamosController.cs`](https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/ReclamosController.cs) (Complaints controller), [`LogeoV2/Data/AppDBContext.cs`](https://github.com/francoxe/test1/blob/main/LogeoV2/Data/AppDBContext.cs) (EF Core DbContext), [`LogeoV2/Program.cs`](https://github.com/francoxe/test1/blob/main/LogeoV2/Program.cs) (ASP.NET Core startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Application Host"]
  node_startup{{"ASP.NET Core startup<br/>application host<br/>[Program.cs]"}}
end

subgraph group_web["MVC Presentation"]
  node_access["Access controller<br/>MVC controller"]
  node_administration["Administration controller<br/>MVC controller"]
  node_complaints_controller["Complaints controller<br/>MVC controller"]
  node_notifications_controller["Notifications controller<br/>MVC controller"]
  node_razor_views["Razor views and layout<br/>server-rendered UI<br/>[_Layout.cshtml]"]
  node_admin_viewmodels["Administration view models<br/>request/view models"]
  node_complaint_viewmodels["Complaint view models<br/>workflow view models<br/>[ReclamoVM.cs]"]
end

subgraph group_domain["Business Services"]
  node_identity_services["User, role and permission services<br/>authorization services<br/>[IUsuarioService.cs]"]
  node_complaint_service["Complaint service<br/>complaint lifecycle service<br/>[ReclamoService.cs]"]
  node_authorization_domain["Users, roles and permissions<br/>identity domain<br/>[Usuario.cs]"]
  node_complaint_domain["Complaints and lifecycle<br/>complaint domain<br/>[Reclamo.cs]"]
end

subgraph group_data["Persistence"]
  node_db_context["EF Core DbContext<br/>persistence boundary<br/>[AppDBContext.cs]"]
  node_relational_db[("Relational database<br/>configured data store<br/>[appsettings.json]")]
  node_uploads[("Upload storage<br/>filesystem storage")]
end

subgraph group_ops["Operational Services"]
  node_audit_service["Audit service"]
  node_notification_service["Notification service"]
  node_email_service["Email service<br/>external email adapter<br/>[IEmailService.cs]"]
  node_export_service["Export service<br/>[IExportService.cs]"]
end

node_startup -->|"routes requests to"| node_access
node_startup -->|"routes requests to"| node_administration
node_startup -->|"routes requests to"| node_complaints_controller
node_startup -->|"routes requests to"| node_notifications_controller
node_access -->|"authenticates via"| node_identity_services
node_administration -->|"administers via"| node_identity_services
node_administration -->|"binds and renders"| node_admin_viewmodels
node_complaints_controller -->|"drives lifecycle through"| node_complaint_service
node_complaints_controller -->|"binds and renders"| node_complaint_viewmodels
node_notifications_controller -->|"uses"| node_notification_service
node_access -->|"renders"| node_razor_views
node_administration -->|"renders"| node_razor_views
node_complaints_controller -->|"renders"| node_razor_views
node_identity_services -->|"manages"| node_authorization_domain
node_identity_services -->|"persists through"| node_db_context
node_complaint_service -->|"manages"| node_complaint_domain
node_complaint_service -->|"persists through"| node_db_context
node_complaint_service -->|"triggers"| node_notification_service
node_complaint_service -->|"audits through"| node_audit_service
node_complaint_service -->|"exports through"| node_export_service
node_notification_service -->|"sends through"| node_email_service
node_notification_service -->|"stores notifications in"| node_db_context
node_audit_service -->|"stores logs in"| node_db_context
node_db_context -->|"connects to"| node_relational_db
node_complaints_controller -->|"uses uploaded content"| node_uploads

click node_startup "https://github.com/francoxe/test1/blob/main/LogeoV2/Program.cs"
click node_access "https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/AccesoController.cs"
click node_administration "https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/AdministracionController.cs"
click node_complaints_controller "https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/ReclamosController.cs"
click node_notifications_controller "https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/NotificacionesController.cs"
click node_razor_views "https://github.com/francoxe/test1/blob/main/LogeoV2/Views/Shared/_Layout.cshtml"
click node_admin_viewmodels "https://github.com/francoxe/test1/blob/main/LogeoV2/ViewModels/AdministracionViewModels.cs"
click node_complaint_viewmodels "https://github.com/francoxe/test1/blob/main/LogeoV2/ViewModels/ReclamoVM.cs"
click node_identity_services "https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IUsuarioService.cs"
click node_complaint_service "https://github.com/francoxe/test1/blob/main/LogeoV2/Services/ReclamoService.cs"
click node_authorization_domain "https://github.com/francoxe/test1/blob/main/LogeoV2/Models/Usuario.cs"
click node_complaint_domain "https://github.com/francoxe/test1/blob/main/LogeoV2/Models/Reclamo.cs"
click node_audit_service "https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IAuditoriaService.cs"
click node_notification_service "https://github.com/francoxe/test1/blob/main/LogeoV2/Services/INotificacionService.cs"
click node_email_service "https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IEmailService.cs"
click node_export_service "https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IExportService.cs"
click node_db_context "https://github.com/francoxe/test1/blob/main/LogeoV2/Data/AppDBContext.cs"
click node_relational_db "https://github.com/francoxe/test1/blob/main/LogeoV2/appsettings.json"

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_startup toneBlue
class node_access,node_administration,node_complaints_controller,node_notifications_controller,node_razor_views,node_admin_viewmodels,node_complaint_viewmodels toneAmber
class node_identity_services,node_complaint_service,node_authorization_domain,node_complaint_domain toneMint
class node_db_context,node_relational_db,node_uploads toneRose
class node_audit_service,node_notification_service,node_email_service,node_export_service toneIndigo
```

## Components

### Application Host

- [ASP.NET Core startup](https://github.com/francoxe/test1/blob/main/LogeoV2/Program.cs): application host · Registers dependencies and configures the HTTP pipeline. · `LogeoV2/Program.cs`

### MVC Presentation

- [Access controller](https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/AccesoController.cs): MVC controller · `LogeoV2/Controllers/AccesoController.cs`
- [Administration controller](https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/AdministracionController.cs): MVC controller · `LogeoV2/Controllers/AdministracionController.cs`
- [Complaints controller](https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/ReclamosController.cs): MVC controller · `LogeoV2/Controllers/ReclamosController.cs`
- [Notifications controller](https://github.com/francoxe/test1/blob/main/LogeoV2/Controllers/NotificacionesController.cs): MVC controller · `LogeoV2/Controllers/NotificacionesController.cs`
- [Razor views and layout](https://github.com/francoxe/test1/blob/main/LogeoV2/Views/Shared/_Layout.cshtml): server-rendered UI · Includes complaint workflow screens and shared navigation. · `LogeoV2/Views/Shared/_Layout.cshtml`
- [Administration view models](https://github.com/francoxe/test1/blob/main/LogeoV2/ViewModels/AdministracionViewModels.cs): request/view models · `LogeoV2/ViewModels/AdministracionViewModels.cs`
- [Complaint view models](https://github.com/francoxe/test1/blob/main/LogeoV2/ViewModels/ReclamoVM.cs): workflow view models · `LogeoV2/ViewModels/ReclamoVM.cs`

### Business Services

- [User, role and permission services](https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IUsuarioService.cs): authorization services · Encapsulates user, role, permission, and mapping logic. · `LogeoV2/Services/IUsuarioService.cs`
- [Complaint service](https://github.com/francoxe/test1/blob/main/LogeoV2/Services/ReclamoService.cs): complaint lifecycle service · Creates, assigns, manages, histories, and reports complaints. · `LogeoV2/Services/ReclamoService.cs`
- [Users, roles and permissions](https://github.com/francoxe/test1/blob/main/LogeoV2/Models/Usuario.cs): identity domain · `LogeoV2/Models/Usuario.cs`
- [Complaints and lifecycle](https://github.com/francoxe/test1/blob/main/LogeoV2/Models/Reclamo.cs): complaint domain · Includes categories, location routing, and status history. · `LogeoV2/Models/Reclamo.cs`

### Persistence

- [EF Core DbContext](https://github.com/francoxe/test1/blob/main/LogeoV2/Data/AppDBContext.cs): persistence boundary · `LogeoV2/Data/AppDBContext.cs`
- [Relational database](https://github.com/francoxe/test1/blob/main/LogeoV2/appsettings.json): configured data store · `LogeoV2/appsettings.json`
- **Upload storage**: filesystem storage

### Operational Services

- [Audit service](https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IAuditoriaService.cs): audit service · `LogeoV2/Services/IAuditoriaService.cs`
- [Notification service](https://github.com/francoxe/test1/blob/main/LogeoV2/Services/INotificacionService.cs): notification service · `LogeoV2/Services/INotificacionService.cs`
- [Email service](https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IEmailService.cs): external email adapter · `LogeoV2/Services/IEmailService.cs`
- [Export service](https://github.com/francoxe/test1/blob/main/LogeoV2/Services/IExportService.cs): report export service · `LogeoV2/Services/IExportService.cs`

## Connections

- ASP.NET Core startup → Access controller: routes requests to
- ASP.NET Core startup → Administration controller: routes requests to
- ASP.NET Core startup → Complaints controller: routes requests to
- ASP.NET Core startup → Notifications controller: routes requests to
- Access controller → User, role and permission services: authenticates via
- Administration controller → User, role and permission services: administers via
- Administration controller → Administration view models: binds and renders
- Complaints controller → Complaint service: drives lifecycle through
- Complaints controller → Complaint view models: binds and renders
- Notifications controller → Notification service: uses
- Access controller → Razor views and layout: renders
- Administration controller → Razor views and layout: renders
- Complaints controller → Razor views and layout: renders
- User, role and permission services → Users, roles and permissions: manages
- User, role and permission services → EF Core DbContext: persists through
- Complaint service → Complaints and lifecycle: manages
- Complaint service → EF Core DbContext: persists through
- Complaint service → Notification service: triggers
- Complaint service → Audit service: audits through
- Complaint service → Export service: exports through
- Notification service → Email service: sends through
- Notification service → EF Core DbContext: stores notifications in
- Audit service → EF Core DbContext: stores logs in
- EF Core DbContext → Relational database: connects to
- Complaints controller → Upload storage: uses uploaded content
