# dev-roger10/sistema-biblioteca architecture

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

- Interactive diagram: https://gitdiagram.com/dev-roger10/sistema-biblioteca
- Repository: https://github.com/dev-roger10/sistema-biblioteca

## Overview

SIGB is an ASP.NET Core MVC system for university library operations. Readers discover books, reserve them online, and later collect them through a staff-managed loan; returns can trigger overdue fines and notifications. Staff also manage the catalog, users, support catalogs, and reports. The README documents these capabilities and centralizes loan/return rules in PrestamoService. Controller excerpts and the source index support several controller-to-data links; unsampled module internals and notification dispatch details are not inferred.

Main entry points: [`SistemaBiblioteca/Data/BibliotecaContext.cs`](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Data/BibliotecaContext.cs) (EF data context), [`SistemaBiblioteca/Controllers/ReservasController.cs`](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/ReservasController.cs) (Reservations), [`SistemaBiblioteca/Controllers/UsuariosController.cs`](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/UsuariosController.cs) (Accounts and profiles), [`SistemaBiblioteca/Controllers/LibrosController.cs`](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/LibrosController.cs) (Book catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Home dashboard<br/>[HomeController.cs]"]
  node_homeviews["Home views"]
  node_accounts["Accounts and profiles"]
  node_accountviews["Account views"]
end

subgraph group_catalog["Catalog management"]
  node_catalogctrl["Book catalog"]
  node_catalogviews["Catalog views"]
  node_supportcatalogs["Support catalogs"]
  node_publishers["Publishers"]
  node_branches["Library branches<br/>[SedesController.cs]"]
end

subgraph group_circulation["Circulation"]
  node_reservations["Reservations"]
  node_reservationviews["Reservation views"]
  node_loans["Loans and returns"]
  node_loanrules["Loan rules<br/>[PrestamoService.cs]"]
  node_sanctions["Fines and payments"]
end

subgraph group_admin["Administration"]
  node_reports["Reports"]
end

subgraph group_persistence["Domain and persistence"]
  node_entities["Library entities"]
  node_context["EF data context"]
end

node_reader(("Reader"))
node_staff(("Library staff"))
node_database[("SQL Server")]

node_reader -->|"opens"| node_home
node_reader -->|"searches"| node_catalogctrl
node_reader -->|"reserves"| node_reservations
node_reader -->|"manages profile"| node_accounts
node_staff -->|"manages loans"| node_loans
node_staff -->|"confirms"| node_reservations
node_staff -->|"manages fines"| node_sanctions
node_staff -->|"administers"| node_supportcatalogs
node_staff -->|"administers"| node_publishers
node_staff -->|"administers"| node_branches
node_staff -->|"reviews"| node_reports
node_home -->|"renders"| node_homeviews
node_accounts -->|"renders"| node_accountviews
node_catalogctrl -->|"renders"| node_catalogviews
node_reservations -->|"renders"| node_reservationviews
node_catalogctrl -->|"queries and updates"| node_context
node_reservations -->|"queries and updates"| node_context
node_loans -->|"applies rules"| node_loanrules
node_loans -->|"uses data"| node_context
node_sanctions -->|"uses data"| node_context
node_reports -->|"queries"| node_context
node_supportcatalogs -->|"uses data"| node_context
node_publishers -->|"uses data"| node_context
node_branches -->|"uses data"| node_context
node_accounts -->|"uses data"| node_context
node_context -->|"maps"| node_entities
node_loanrules -->|"reads and writes"| node_context
node_context -->|"persists"| node_database

click node_home "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/HomeController.cs"
click node_homeviews "https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Home"
click node_accounts "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/UsuariosController.cs"
click node_accountviews "https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Usuarios"
click node_catalogctrl "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/LibrosController.cs"
click node_catalogviews "https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Libros"
click node_supportcatalogs "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/CategoriasController.cs"
click node_publishers "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/EditorialesController.cs"
click node_branches "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/SedesController.cs"
click node_reservations "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/ReservasController.cs"
click node_reservationviews "https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Reservas"
click node_loans "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/PrestamosController.cs"
click node_loanrules "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Services/PrestamoService.cs"
click node_sanctions "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/SancionesController.cs"
click node_reports "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/ReportesController.cs"
click node_entities "https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Models"
click node_context "https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Data/BibliotecaContext.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_home,node_homeviews,node_accounts,node_accountviews toneBlue
class node_catalogctrl,node_catalogviews,node_supportcatalogs,node_publishers,node_branches,node_database toneAmber
class node_reservations,node_reservationviews,node_loans,node_loanrules,node_sanctions toneMint
class node_reports toneRose
class node_entities,node_context,node_reader,node_staff toneIndigo
```

## Components

### Web experience

- [Home dashboard](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/HomeController.cs): `SistemaBiblioteca/Controllers/HomeController.cs`
- [Home views](https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Home): `SistemaBiblioteca/Views/Home`
- [Accounts and profiles](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/UsuariosController.cs): `SistemaBiblioteca/Controllers/UsuariosController.cs`
- [Account views](https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Usuarios): `SistemaBiblioteca/Views/Usuarios`

### Catalog management

- [Book catalog](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/LibrosController.cs): `SistemaBiblioteca/Controllers/LibrosController.cs`
- [Catalog views](https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Libros): `SistemaBiblioteca/Views/Libros`
- [Support catalogs](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/CategoriasController.cs): `SistemaBiblioteca/Controllers/CategoriasController.cs`
- [Publishers](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/EditorialesController.cs): `SistemaBiblioteca/Controllers/EditorialesController.cs`
- [Library branches](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/SedesController.cs): `SistemaBiblioteca/Controllers/SedesController.cs`

### Circulation

- [Reservations](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/ReservasController.cs): `SistemaBiblioteca/Controllers/ReservasController.cs`
- [Reservation views](https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Views/Reservas): `SistemaBiblioteca/Views/Reservas`
- [Loans and returns](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/PrestamosController.cs): `SistemaBiblioteca/Controllers/PrestamosController.cs`
- [Loan rules](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Services/PrestamoService.cs): `SistemaBiblioteca/Services/PrestamoService.cs`
- [Fines and payments](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/SancionesController.cs): `SistemaBiblioteca/Controllers/SancionesController.cs`

### Administration

- [Reports](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Controllers/ReportesController.cs): `SistemaBiblioteca/Controllers/ReportesController.cs`

### Domain and persistence

- [Library entities](https://github.com/dev-roger10/sistema-biblioteca/tree/master/SistemaBiblioteca/Models): `SistemaBiblioteca/Models`
- [EF data context](https://github.com/dev-roger10/sistema-biblioteca/blob/master/SistemaBiblioteca/Data/BibliotecaContext.cs): `SistemaBiblioteca/Data/BibliotecaContext.cs`

### Other components

- **Reader**
- **Library staff**
- **SQL Server**

## Connections

- Reader → Home dashboard: opens (evidence: `README.md`)
- Reader → Book catalog: searches (evidence: `README.md`)
- Reader → Reservations: reserves (evidence: `README.md`)
- Reader → Accounts and profiles: manages profile (evidence: `README.md`)
- Library staff → Loans and returns: manages loans (evidence: `README.md`)
- Library staff → Reservations: confirms (evidence: `README.md`)
- Library staff → Fines and payments: manages fines (evidence: `README.md`)
- Library staff → Support catalogs: administers (evidence: `README.md`)
- Library staff → Publishers: administers (evidence: `README.md`)
- Library staff → Library branches: administers (evidence: `README.md`)
- Library staff → Reports: reviews (evidence: `README.md`)
- Home dashboard → Home views: renders (evidence: `README.md`)
- Accounts and profiles → Account views: renders (evidence: `README.md`)
- Book catalog → Catalog views: renders (evidence: `README.md`)
- Reservations → Reservation views: renders (evidence: `README.md`)
- Book catalog → EF data context: queries and updates (evidence: `SistemaBiblioteca/Controllers/LibrosController.cs`)
- Reservations → EF data context: queries and updates (evidence: `SistemaBiblioteca/Controllers/ReservasController.cs`)
- Loans and returns → Loan rules: applies rules (evidence: `README.md`)
- Loans and returns → EF data context: uses data (evidence: `SistemaBiblioteca/Controllers/PrestamosController.cs`)
- Fines and payments → EF data context: uses data (evidence: `SistemaBiblioteca/Controllers/SancionesController.cs`)
- Reports → EF data context: queries (evidence: `SistemaBiblioteca/Controllers/ReportesController.cs`)
- Support catalogs → EF data context: uses data (evidence: `SistemaBiblioteca/Controllers/CategoriasController.cs`)
- Publishers → EF data context: uses data (evidence: `SistemaBiblioteca/Controllers/EditorialesController.cs`)
- Library branches → EF data context: uses data (evidence: `SistemaBiblioteca/Controllers/SedesController.cs`)
- Accounts and profiles → EF data context: uses data (evidence: `SistemaBiblioteca/Controllers/UsuariosController.cs`)
- EF data context → Library entities: maps (evidence: `SistemaBiblioteca/Data/BibliotecaContext.cs`)
- Loan rules → EF data context: reads and writes (evidence: `SistemaBiblioteca/Services/PrestamoService.cs`)
- EF data context → SQL Server: persists (evidence: `README.md`)
