# edder-crtl/biblioper architecture

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

- Interactive diagram: https://gitdiagram.com/edder-crtl/biblioper
- Repository: https://github.com/edder-crtl/biblioper

## Overview

BiblioPer is a web-based library management system. Readers and staff use the browser interface to consult the catalog and manage library activity through a REST API; documented capabilities include account access, catalog and member management, loans, returns, reservations, fines, and reports. The README describes a backend business/API layer, validation schemas, ORM-based data access, and SQLite persistence. Source excerpts are empty, so relationships below rely on the README’s architecture and capability descriptions; specific route-level calls cannot be verified. Email notifications are documented but their implementation is not shown.

Main entry points: [`sistema-biblioteca/backend/app/main.py`](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py) (REST API), [`sistema-biblioteca/frontend/js/index.html`](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/index.html) (Browser interface), [`sistema-biblioteca/backend/app/crud.py`](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/crud.py) (Data operations), [`sistema-biblioteca/frontend/js/app.js`](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/app.js) (UI events)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_browser["Browser interface<br/>[index.html]"]
  node_ui["UI events<br/>[app.js]"]
  node_api_client["API client<br/>[api.js]"]
  node_styles["Interface styles<br/>[styles.css]"]
end

subgraph group_backend["Library operations"]
  node_api["REST API<br/>[main.py]"]
  node_access["Authentication and roles<br/>[main.py]"]
  node_catalog["Catalog management<br/>[main.py]"]
  node_members["Member management<br/>[main.py]"]
  node_loans["Loans and returns<br/>[main.py]"]
  node_reservations["Book reservations<br/>[main.py]"]
  node_fines["Overdue fines<br/>[main.py]"]
  node_reports["Library reports<br/>[main.py]"]
end

subgraph group_data["Persistence and validation"]
  node_schemas["Validation schemas<br/>[schemas.py]"]
  node_crud["Data operations<br/>[crud.py]"]
  node_models["Database models<br/>[models.py]"]
  node_database["SQLAlchemy connection<br/>[database.py]"]
  node_sqlite[("SQLite database<br/>[biblioteca.db]")]
end

node_reader(("Reader"))
node_librarian(("Librarian"))
node_admin(("Administrator"))
node_email["Email service"]

node_reader -->|"uses"| node_browser
node_librarian -->|"uses"| node_browser
node_admin -->|"uses"| node_browser
node_browser -->|"presents"| node_ui
node_ui -->|"requests"| node_api_client
node_api_client -->|"calls REST API"| node_api
node_api -->|"provides access"| node_access
node_api -->|"provides catalog"| node_catalog
node_api -->|"manages members"| node_members
node_api -->|"manages loans"| node_loans
node_api -->|"supports reservations"| node_reservations
node_api -->|"calculates fines"| node_fines
node_api -->|"provides reports"| node_reports
node_api -->|"validates with"| node_schemas
node_api -->|"delegates data operations"| node_crud
node_crud -->|"uses ORM models"| node_models
node_crud -->|"accesses"| node_database
node_database -->|"persists in"| node_sqlite
node_loans -.->|"notifies"| node_email

click node_browser "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/index.html"
click node_ui "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/app.js"
click node_api_client "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/api.js"
click node_styles "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/css/styles.css"
click node_api "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_access "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_catalog "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_members "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_loans "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_reservations "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_fines "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_reports "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py"
click node_schemas "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/schemas.py"
click node_crud "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/crud.py"
click node_models "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/models.py"
click node_database "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/database.py"
click node_sqlite "https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/biblioteca.db"

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_browser,node_ui,node_api_client,node_styles toneBlue
class node_api,node_access,node_catalog,node_members,node_loans,node_reservations,node_fines,node_reports toneAmber
class node_schemas,node_crud,node_models,node_database,node_sqlite toneMint
class node_reader,node_librarian,node_admin,node_email toneIndigo
```

## Components

### Web interface

- [Browser interface](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/index.html): `sistema-biblioteca/frontend/js/index.html`
- [UI events](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/app.js): `sistema-biblioteca/frontend/js/app.js`
- [API client](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/js/api.js): `sistema-biblioteca/frontend/js/api.js`
- [Interface styles](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/frontend/css/styles.css): `sistema-biblioteca/frontend/css/styles.css`

### Library operations

- [REST API](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`
- [Authentication and roles](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`
- [Catalog management](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`
- [Member management](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`
- [Loans and returns](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`
- [Book reservations](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`
- [Overdue fines](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`
- [Library reports](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/main.py): `sistema-biblioteca/backend/app/main.py`

### Persistence and validation

- [Validation schemas](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/schemas.py): `sistema-biblioteca/backend/app/schemas.py`
- [Data operations](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/crud.py): `sistema-biblioteca/backend/app/crud.py`
- [Database models](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/models.py): `sistema-biblioteca/backend/app/models.py`
- [SQLAlchemy connection](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/database.py): `sistema-biblioteca/backend/app/database.py`
- [SQLite database](https://github.com/edder-crtl/biblioper/blob/main/sistema-biblioteca/backend/app/biblioteca.db): `sistema-biblioteca/backend/app/biblioteca.db`

### Other components

- **Reader**
- **Librarian**
- **Administrator**
- **Email service**

## Connections

- Reader → Browser interface: uses (evidence: `README.md`)
- Librarian → Browser interface: uses (evidence: `README.md`)
- Administrator → Browser interface: uses (evidence: `README.md`)
- Browser interface → UI events: presents (evidence: `README.md`)
- UI events → API client: requests (evidence: `README.md`)
- API client → REST API: calls REST API (evidence: `README.md`)
- REST API → Authentication and roles: provides access (evidence: `README.md`)
- REST API → Catalog management: provides catalog (evidence: `README.md`)
- REST API → Member management: manages members (evidence: `README.md`)
- REST API → Loans and returns: manages loans (evidence: `README.md`)
- REST API → Book reservations: supports reservations (evidence: `README.md`)
- REST API → Overdue fines: calculates fines (evidence: `README.md`)
- REST API → Library reports: provides reports (evidence: `README.md`)
- REST API → Validation schemas: validates with (evidence: `README.md`)
- REST API → Data operations: delegates data operations (evidence: `README.md`)
- Data operations → Database models: uses ORM models (evidence: `README.md`)
- Data operations → SQLAlchemy connection: accesses (evidence: `README.md`)
- SQLAlchemy connection → SQLite database: persists in (evidence: `README.md`)
- Loans and returns → Email service: notifies (evidence: `README.md`)
