# josesepulvedavelez/focalizacionexcel architecture

> Architecture diagram of the GitHub repository josesepulvedavelez/focalizacionexcel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/josesepulvedavelez/focalizacionexcel
- Repository: https://github.com/josesepulvedavelez/focalizacionexcel

## Overview

##### Project type and purpose
- This is a full‑stack .NET solution named “PapsiviFocalizacion,” consisting of a Blazor web front‑end, a .NET Web API back‑end, a Core/domain library, and an Infra/data‑access layer.
- Purpose: manage “focalización” data (departments, ESEs, municipalities, resolutions, users, registrations) and provide both administrative and reporting UIs.

##### File structure
- Top‑level solution (PapsiviFocalizacion.sln) contains four main projects:
- PapsiviFocalizacion.Web – Blazor WASM/Server UI (Pages, Shared, DTOs/Models, wwwroot assets)
- PapsiviFocalizacion.Api – ASP.NET Core Web API (Controllers, appsettings, Program.cs)
- PapsiviFocalizacion.Core – Domain/Business layer (Models, DTOs, repository interfaces)
- PapsiviFocalizacion.Infra – Infrastructure layer (Repository implementations, EF Core or ADO to SQL scripts)
- There are database scripts (1 Creacion de tablas.sql) and sample data. Configuration files live under each project (launchSettings.json, appsettings.json).

##### Detailed capture of essential elements
- How DTOs travel from client → API → Core → Infra → DB and back
- Configuration (appsettings.json) feeding into API and Web projects
- Solution file (.sln) as an overview entry point if useful
- Call out sample‑data and external calls (weather.json) as secondary services

Putting it all together:
[Browser / Blazor UI]
↓ HTTP
[ASP.NET Core Web API]
↓ DI resolves
[Core / Domain Interfaces & Models]
↓ Implementation
[Infra / Repository Layer]
↓ SQL
[Database (SQL Server)]

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Web Client Layer
    subgraph "Web Client (Blazor UI)" 
        direction TB
        WC[("Web Client")]:::ui
        WCPROG["Program.cs"]:::ui
        WCAPP["App.razor"]:::ui
        WCPAGES["Pages/*.razor"]:::ui
        WCSHARED["Shared/*.razor"]:::ui
        WCDTOS["Dtos/*.cs"]:::ui
        WCMODELS["Models/*.cs"]:::ui
        WCWWW["wwwroot"]:::ui
        WCAPPSET["wwwroot/appsettings.json"]:::ui
        WCLAUNCH["Properties/launchSettings.json"]:::ui
    end

    %% API Layer
    subgraph "API Server (ASP.NET Core Web API)"
        direction TB
        API[("API Server")]:::api
        APIPROG["Program.cs"]:::api
        APICONT["Controllers/*.cs"]:::api
        APIAPPSET["appsettings.json"]:::api
        APIAPPDEV["appsettings.Development.json"]:::api
        APILAUNCH["Properties/launchSettings.json"]:::api
    end

    %% Core Layer
    subgraph "Core / Domain Layer"
        direction TB
        CORE[("Core / Domain")]:::core
        COREMODELS["Models/*.cs"]:::core
        COREDTOS["Dtos/*.cs"]:::core
        COREINTF["Interfaces/*.cs"]:::core
    end

    %% Infra Layer
    subgraph "Infra / Data Access Layer"
        direction TB
        INFRA[("Infra / Repositories")]:::infra
        INFRAREPO["Repositories/*.cs"]:::infra
        INFPJ["PapsiviFocalizacion.Infra.csproj"]:::infra
    end

    %% Database
    DB[("Database (SQL Server)")]:::db
    DBSCRIPT["1 Creacion de tablas.sql"]:::db

    %% External Service
    EXT[("External Weather API")]:::ext
    WEATHERCTRL["WeatherForecastController.cs"]:::api
    WEATHERJSON["sample-data/weather.json"]:::ext

    %% Solution Entry Point
    SLN[("PapsiviFocalizacion.sln")]:::misc

    %% Connections
    SLN --> WC
    SLN --> API
    SLN --> CORE
    SLN --> INFRA

    WC -->|HTTP/HTTPS| API
    API -->|resolve via DI| COREINTF
    COREINTF -->|implemented by| INFRAREPO
    INFRAREPO -->|SQL queries| DB
    APICONT -->|calls external| EXT
    EXT --> WEATHERJSON

    %% Click events for Web Client
    click WC "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion/PapsiviFocalizacion.Web"
    click WCPROG "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/Program.cs"
    click WCAPP "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/App.razor"
    click WCPAGES "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/Pages"
    click WCSHARED "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/Shared"
    click WCDTOS "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/Dtos"
    click WCMODELS "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/Models"
    click WCWWW "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/wwwroot"
    click WCAPPSET "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/wwwroot/appsettings.json"
    click WCLAUNCH "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion/PapsiviFocalizacion.Web/Properties/launchSettings.json"

    %% Click events for API
    click API "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Api"
    click APIPROG "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Api/Program.cs"
    click APICONT "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion.Api/Controllers"
    click APIAPPSET "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Api/appsettings.json"
    click APIAPPDEV "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Api/appsettings.Development.json"
    click APILAUNCH "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Api/Properties/launchSettings.json"

    %% Click events for Core
    click CORE "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Core"
    click COREMODELS "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion.Core/Models"
    click COREDTOS "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion.Core/Dtos"
    click COREINTF "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion.Core/Interfaces"

    %% Click events for Infra
    click INFRA "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Infra"
    click INFRAREPO "https://github.com/josesepulvedavelez/focalizacionexcel/tree/main/PapsiviFocalizacion.Infra/Repositories"
    click INFPJ "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Infra/PapsiviFocalizacion.Infra.csproj"

    %% Click events for Database
    click DBSCRIPT "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion/1 Creacion de tablas.sql"

    %% Click events for External
    click WEATHERCTRL "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Api/Controllers/WeatherForecastController.cs"
    click WEATHERJSON "https://github.com/josesepulvedavelez/focalizacionexcel/blob/main/PapsiviFocalizacion.Web/wwwroot/sample-data/weather.json"

    %% Styles
    classDef ui fill:#e0f7fa,stroke:#006064,color:#004d40
    classDef api fill:#e8f5e9,stroke:#1b5e20,color:#2e7d32
    classDef core fill:#fff8e1,stroke:#ff8f00,color:#ff6f00
    classDef infra fill:#fff3e0,stroke:#e65100,color:#bf360c
    classDef db fill:#ffebee,stroke:#b71c1c,color:#c62828
    classDef ext fill:#f3e5f5,stroke:#4a148c,color:#6a1b9a
    classDef misc fill:#eceff1,stroke:#263238,color:#37474f
```
