# juanes-10/proyecto_unispace architecture

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

- Interactive diagram: https://gitdiagram.com/juanes-10/proyecto_unispace
- Repository: https://github.com/juanes-10/proyecto_unispace

## Overview

UniSpace is a small FastAPI room-reservation application with a server-rendered web flow and a separate JSON reservations API. Users log in, view room/time availability, and submit reservations; the web reservation controller validates availability and persists it to JSON. The API supports listing, looking up, creating, and filtering typed reservations, stored in process memory. A health endpoint is also exposed. The source excerpts show these routes and calls; the README gives no additional product details.

Main entry points: [`backend/routers/web_router.py`](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/routers/web_router.py) (Web routes), [`backend/core/config.py`](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/core/config.py) (App configuration), [`backend/main.py`](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/main.py) (FastAPI app), [`backend/controllers/reserva_archivo_controller.py`](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/reserva_archivo_controller.py) (Web reservation logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_web_routes["Web routes<br/>[web_router.py]"]
  node_login_view["Login page<br/>[login.html]"]
  node_dashboard_view["Dashboard page<br/>[dashboard.html]"]
  node_auth["Credential validation<br/>[auth_controller.py]"]
  node_users["User records<br/>[usuarios.txt]"]
end

subgraph group_reservations["Reservation workflows"]
  node_web_reservation["Web reservation logic"]
  node_reservation_file[("Reservation file<br/>[reservas.json]")]
  node_api_routes["Reservation API routes"]
  node_api_controller["API reservation logic"]
  node_reservation_model["Reservation model<br/>[reserva.py]"]
  node_api_memory[("In-memory reservations")]
end

subgraph group_support["Configuration and health"]
  node_app["FastAPI app<br/>[main.py]"]
  node_config["App configuration<br/>[config.py]"]
  node_health["Health route<br/>[health_router.py]"]
end

node_visitor(("Web user"))

node_app -->|"registers"| node_web_routes
node_app -->|"registers"| node_api_routes
node_app -->|"registers"| node_health
node_visitor -->|"submits requests"| node_web_routes
node_web_routes -->|"validates login"| node_auth
node_auth -->|"reads credentials"| node_users
node_web_routes -->|"renders"| node_login_view
node_web_routes -->|"renders"| node_dashboard_view
node_web_routes -->|"loads or reserves"| node_web_reservation
node_web_reservation -->|"reads and writes"| node_reservation_file
node_web_routes -->|"uses settings"| node_config
node_web_reservation -->|"uses file and slots"| node_config
node_config -->|"sets template directory"| node_login_view
node_config -->|"sets template directory"| node_dashboard_view
node_api_routes -->|"dispatches"| node_api_controller
node_api_routes -->|"accepts model"| node_reservation_model
node_api_controller -->|"uses model"| node_reservation_model
node_api_controller -->|"reads and updates"| node_api_memory

click node_app "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/main.py"
click node_web_routes "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/routers/web_router.py"
click node_login_view "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/templates/login.html"
click node_dashboard_view "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/templates/dashboard.html"
click node_auth "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/auth_controller.py"
click node_users "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/usuarios.txt"
click node_web_reservation "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/reserva_archivo_controller.py"
click node_reservation_file "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/reservas.json"
click node_api_routes "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/routers/api_reservas_router.py"
click node_api_controller "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/reserva_api_controller.py"
click node_reservation_model "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/models/reserva.py"
click node_api_memory "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/reserva_api_controller.py"
click node_config "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/core/config.py"
click node_health "https://github.com/juanes-10/proyecto_unispace/blob/main/backend/routers/health_router.py"

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_web_routes,node_login_view,node_dashboard_view,node_auth,node_users,node_visitor toneBlue
class node_web_reservation,node_reservation_file,node_api_routes,node_api_controller,node_reservation_model,node_api_memory toneAmber
class node_app,node_config,node_health toneMint
```

## Components

### Web experience

- [Web routes](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/routers/web_router.py): `backend/routers/web_router.py`
- [Login page](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/templates/login.html): `backend/templates/login.html`
- [Dashboard page](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/templates/dashboard.html): `backend/templates/dashboard.html`
- [Credential validation](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/auth_controller.py): `backend/controllers/auth_controller.py`
- [User records](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/usuarios.txt): `backend/usuarios.txt`

### Reservation workflows

- [Web reservation logic](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/reserva_archivo_controller.py): `backend/controllers/reserva_archivo_controller.py`
- [Reservation file](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/reservas.json): `backend/reservas.json`
- [Reservation API routes](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/routers/api_reservas_router.py): `backend/routers/api_reservas_router.py`
- [API reservation logic](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/reserva_api_controller.py): `backend/controllers/reserva_api_controller.py`
- [Reservation model](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/models/reserva.py): `backend/models/reserva.py`
- [In-memory reservations](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/controllers/reserva_api_controller.py): `backend/controllers/reserva_api_controller.py`

### Configuration and health

- [FastAPI app](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/main.py): `backend/main.py`
- [App configuration](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/core/config.py): `backend/core/config.py`
- [Health route](https://github.com/juanes-10/proyecto_unispace/blob/main/backend/routers/health_router.py): `backend/routers/health_router.py`

### Other components

- **Web user**

## Connections

- FastAPI app → Web routes: registers (evidence: `backend/main.py`)
- FastAPI app → Reservation API routes: registers (evidence: `backend/main.py`)
- FastAPI app → Health route: registers (evidence: `backend/main.py`)
- Web user → Web routes: submits requests (evidence: `backend/routers/web_router.py`)
- Web routes → Credential validation: validates login (evidence: `backend/routers/web_router.py`)
- Credential validation → User records: reads credentials (evidence: `backend/controllers/auth_controller.py`)
- Web routes → Login page: renders (evidence: `backend/routers/web_router.py`)
- Web routes → Dashboard page: renders (evidence: `backend/routers/web_router.py`)
- Web routes → Web reservation logic: loads or reserves (evidence: `backend/routers/web_router.py`)
- Web reservation logic → Reservation file: reads and writes (evidence: `backend/controllers/reserva_archivo_controller.py`)
- Web routes → App configuration: uses settings (evidence: `backend/routers/web_router.py`)
- Web reservation logic → App configuration: uses file and slots (evidence: `backend/controllers/reserva_archivo_controller.py`)
- App configuration → Login page: sets template directory (evidence: `backend/core/config.py`)
- App configuration → Dashboard page: sets template directory (evidence: `backend/core/config.py`)
- Reservation API routes → API reservation logic: dispatches (evidence: `backend/routers/api_reservas_router.py`)
- Reservation API routes → Reservation model: accepts model (evidence: `backend/routers/api_reservas_router.py`)
- API reservation logic → Reservation model: uses model (evidence: `backend/controllers/reserva_api_controller.py`)
- API reservation logic → In-memory reservations: reads and updates (evidence: `backend/controllers/reserva_api_controller.py`)
