# jorg3abz/t2_alvarezaraujojorge architecture

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

- Interactive diagram: https://gitdiagram.com/jorg3abz/t2_alvarezaraujojorge
- Repository: https://github.com/jorg3abz/t2_alvarezaraujojorge

## Overview

#### Purpose and entry point
This is a layered school-management CRUD application for students, courses, and teachers. The runnable host is an ASP.NET Core MVC GUI project, entered through `Colegio.Sistema.PL.GUI/Program.cs`; launch/profile settings are in `Colegio.Sistema.PL.GUI/Properties/launchSettings.json`.

#### Presentation layer
The MVC presentation project accepts browser requests, binds page models, invokes application services, and renders Razor views. Resource-specific controllers and models exist for the three managed entities:
- `Colegio.Sistema.PL.GUI/Controllers/AlumnoController.cs`
- `Colegio.Sistema.PL.GUI/Controllers/CursoController.cs`
- `Colegio.Sistema.PL.GUI/Controllers/DocenteController.cs`
- `Colegio.Sistema.PL.GUI/Models/AlumnoModel.cs`
- `Colegio.Sistema.PL.GUI/Views/Alumno/Listar.cshtml`

Views provide list, create, and edit workflows for each resource; shared layout and client-side validation are centralized in `Colegio.Sistema.PL.GUI/Views/Shared/_Layout.cshtml` and `Colegio.Sistema.PL.GUI/Views/Shared/_ValidationScriptsPartial.cshtml`.

#### Application/service boundary
The application project defines service interfaces and implementations, separating UI orchestration from persistence. Services are organized by `Alumno`, `Curso`, and `Docente` and should be the controller dependency boundary:
- `Colegio.Sistema.Application/BL.BC/Services/IAlumnoService.cs`
- `Colegio.Sistema.Application/BL.BC/Services/CursoService.cs`
- `Colegio.Sistema.Application/BL.BC/Services/DocenteService.cs`

Primary control flow is: HTTP request → MVC controller/model binding → application service → domain repository interface → infrastructure repository → database; returned entities are mapped or presented by MVC views.

#### Domain core
The domain project owns the core entity types and persistence abstractions, avoiding direct dependency on UI or database implementation:
- `Colegio.Sistema.Domain/BL.BE/Entities/Alumno.cs`
- `Colegio.Sistema.Domain/BL.BE/Entities/Curso.cs`
- `Colegio.Sistema.Domain/BL.BE/Entities/Docente.cs`
- `Colegio.Sistema.Domain/BL.BE/Interfaces/IAlumnoRepository.cs`
- `Colegio.Sistema.Domain/BL.BE/Interfaces/ICursoRepository.cs`
- `Colegio.Sistema.Domain/BL.BE/Interfaces/IDocenteRepository.cs`

Repository interfaces are the principal clean-architecture boundary: application code depends on these contracts, while infrastructure supplies implementations.

#### Persistence and database integration
Infrastructure implements the domain repository contracts and centralizes connection handling:
- `Colegio.Sistema.Infrastructure/DL.DALC/Persistence/IBDConexion.cs`
- `Colegio.Sistema.Infrastructure/DL.DALC/Persistence/BDConexion.cs`
- `Colegio.Sistema.Infrastructure/DL.DALC/Repositories/AlumnoRepository.cs`
- `Colegio.Sistema.Infrastructure/DL.DALC/Repositories/CursoRepository.cs`
- `Colegio.Sistema.Infrastructure/DL.DALC/Repositories/DocenteRepository.cs`

The README specifies a relational database initialized by `BDColegio.sql` and stored procedures from `ClinicaBD_Procedimientos.sql`; the referenced `database/` directory is not present in the supplied tree. Database credentials/configuration are expected to originate from `Colegio.Sistema.PL.GUI/appsettings.json` and its development override.

#### Runtime and dependencies
Projects target .NET 10.0, evidenced by `Colegio.Sistema.PL.GUI/bin/Debug/net10.0/Colegio.Sistema.PL.GUI.runtimeconfig.json`. The executable web host is `Colegio.Sistema.PL.GUI`; the other projects are class-library layers. Browser assets include Bootstrap, jQuery, and unobtrusive jQuery validation under `Colegio.Sistema.PL.GUI/wwwroot/lib/`. No API gateway, queue, cloud service, or separate frontend is represented.

Main entry points: [`Colegio.Sistema.PL.GUI/Controllers/AlumnoController.cs`](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Controllers/AlumnoController.cs) (Resource Controllers), [`Colegio.Sistema.Infrastructure/DL.DALC/Repositories/AlumnoRepository.cs`](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Repositories/AlumnoRepository.cs) (Repository Implementations), [`Colegio.Sistema.Application/BL.BC/Services/CursoService.cs`](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Application/BL.BC/Services/CursoService.cs) (Application Services), [`Colegio.Sistema.Infrastructure/DL.DALC/Persistence/BDConexion.cs`](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Persistence/BDConexion.cs) (Connection Provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["MVC Presentation"]
  node_host["ASP.NET Core MVC Host<br/>web host<br/>[Program.cs]"]
  node_controllers["Resource Controllers<br/>MVC controllers"]
  node_page_models["Page Models<br/>view models<br/>[AlumnoModel.cs]"]
  node_views["Razor CRUD Views<br/>Razor views<br/>[Listar.cshtml]"]
  node_shared_ui["Shared Layout &amp; Validation<br/>Razor shared UI<br/>[_Layout.cshtml]"]
  node_app_config["Database Configuration<br/>app settings<br/>[appsettings.json]"]
end

subgraph group_application["Application Layer"]
  node_services["Application Services<br/>service layer<br/>[CursoService.cs]"]
  node_service_contracts["Service Contracts<br/>service interfaces<br/>[IAlumnoService.cs]"]
end

subgraph group_domain["Domain Core"]
  node_entities{{"School Entities<br/>domain entities<br/>[Alumno.cs]"}}
  node_repository_contracts["Repository Contracts<br/>repository interfaces"]
end

subgraph group_infrastructure["Infrastructure"]
  node_repositories["Repository Implementations<br/>data repositories"]
  node_connection["Connection Provider<br/>database connection<br/>[BDConexion.cs]"]
  node_connection_contract["Connection Contract<br/>connection interface<br/>[IBDConexion.cs]"]
end

node_browser(("Browser<br/>client"))
node_database[("Relational School Database<br/>relational database")]

node_browser -->|"HTTP requests"| node_host
node_host -->|"routes to"| node_controllers
node_controllers -->|"binds"| node_page_models
node_controllers -->|"depends on"| node_service_contracts
node_service_contracts -.->|"implemented by"| node_services
node_services -->|"uses"| node_entities
node_services -->|"depends on"| node_repository_contracts
node_repositories -.->|"implements"| node_repository_contracts
node_repositories -->|"persists"| node_entities
node_repositories -->|"uses"| node_connection_contract
node_connection -.->|"implements"| node_connection_contract
node_connection -->|"connects to"| node_database
node_app_config -->|"configures"| node_host
node_app_config -->|"supplies settings"| node_connection
node_controllers -->|"renders"| node_views
node_page_models -->|"presented by"| node_views
node_shared_ui -.->|"shared by"| node_views

click node_host "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Program.cs"
click node_controllers "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Controllers/AlumnoController.cs"
click node_page_models "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Models/AlumnoModel.cs"
click node_views "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Views/Alumno/Listar.cshtml"
click node_shared_ui "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Views/Shared/_Layout.cshtml"
click node_app_config "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/appsettings.json"
click node_services "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Application/BL.BC/Services/CursoService.cs"
click node_service_contracts "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Application/BL.BC/Services/IAlumnoService.cs"
click node_entities "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Domain/BL.BE/Entities/Alumno.cs"
click node_repository_contracts "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Domain/BL.BE/Interfaces/IAlumnoRepository.cs"
click node_repositories "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Repositories/AlumnoRepository.cs"
click node_connection "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Persistence/BDConexion.cs"
click node_connection_contract "https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Persistence/IBDConexion.cs"

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_host,node_controllers,node_page_models,node_views,node_shared_ui,node_app_config toneBlue
class node_services,node_service_contracts toneAmber
class node_entities,node_repository_contracts toneMint
class node_repositories,node_connection,node_connection_contract toneRose
class node_browser,node_database toneNeutral
```

## Components

### MVC Presentation

- [ASP.NET Core MVC Host](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Program.cs): web host · Application entry point and dependency composition root. · `Colegio.Sistema.PL.GUI/Program.cs`
- [Resource Controllers](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Controllers/AlumnoController.cs): MVC controllers · Alumno, Curso, and Docente request handlers. · `Colegio.Sistema.PL.GUI/Controllers/AlumnoController.cs`
- [Page Models](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Models/AlumnoModel.cs): view models · Resource-specific models used for binding and presentation. · `Colegio.Sistema.PL.GUI/Models/AlumnoModel.cs`
- [Razor CRUD Views](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Views/Alumno/Listar.cshtml): Razor views · List, create, and edit workflows for managed resources. · `Colegio.Sistema.PL.GUI/Views/Alumno/Listar.cshtml`
- [Shared Layout & Validation](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/Views/Shared/_Layout.cshtml): Razor shared UI · `Colegio.Sistema.PL.GUI/Views/Shared/_Layout.cshtml`
- [Database Configuration](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.PL.GUI/appsettings.json): app settings · Connection settings originate in the GUI project configuration. · `Colegio.Sistema.PL.GUI/appsettings.json`

### Application Layer

- [Application Services](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Application/BL.BC/Services/CursoService.cs): service layer · UI orchestration for Alumno, Curso, and Docente. · `Colegio.Sistema.Application/BL.BC/Services/CursoService.cs`
- [Service Contracts](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Application/BL.BC/Services/IAlumnoService.cs): service interfaces · Controller dependency boundary. · `Colegio.Sistema.Application/BL.BC/Services/IAlumnoService.cs`

### Domain Core

- [School Entities](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Domain/BL.BE/Entities/Alumno.cs): domain entities · Alumno, Curso, and Docente business types. · `Colegio.Sistema.Domain/BL.BE/Entities/Alumno.cs`
- [Repository Contracts](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Domain/BL.BE/Interfaces/IAlumnoRepository.cs): repository interfaces · Persistence abstraction owned by the domain. · `Colegio.Sistema.Domain/BL.BE/Interfaces/IAlumnoRepository.cs`

### Infrastructure

- [Repository Implementations](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Repositories/AlumnoRepository.cs): data repositories · Alumno, Curso, and Docente persistence implementations. · `Colegio.Sistema.Infrastructure/DL.DALC/Repositories/AlumnoRepository.cs`
- [Connection Provider](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Persistence/BDConexion.cs): database connection · Centralizes relational database connectivity. · `Colegio.Sistema.Infrastructure/DL.DALC/Persistence/BDConexion.cs`
- [Connection Contract](https://github.com/jorg3abz/t2_alvarezaraujojorge/blob/main/Colegio.Sistema.Infrastructure/DL.DALC/Persistence/IBDConexion.cs): connection interface · `Colegio.Sistema.Infrastructure/DL.DALC/Persistence/IBDConexion.cs`

### Other components

- **Browser**: client
- **Relational School Database**: relational database · Initialized externally with schema and stored procedures.

## Connections

- Browser → ASP.NET Core MVC Host: HTTP requests
- ASP.NET Core MVC Host → Resource Controllers: routes to
- Resource Controllers → Page Models: binds
- Resource Controllers → Service Contracts: depends on
- Service Contracts → Application Services: implemented by
- Application Services → School Entities: uses
- Application Services → Repository Contracts: depends on
- Repository Implementations → Repository Contracts: implements
- Repository Implementations → School Entities: persists
- Repository Implementations → Connection Contract: uses
- Connection Provider → Connection Contract: implements
- Connection Provider → Relational School Database: connects to
- Database Configuration → ASP.NET Core MVC Host: configures
- Database Configuration → Connection Provider: supplies settings
- Resource Controllers → Razor CRUD Views: renders
- Page Models → Razor CRUD Views: presented by
- Shared Layout & Validation → Razor CRUD Views: shared by
