# dantenovoa151-pixel/tp-fullstack-peluqueria-dante architecture

> Architecture diagram of the GitHub repository dantenovoa151-pixel/tp-fullstack-peluqueria-dante, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante
- Repository: https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante

## Overview

This is a Spanish-language hair-salon appointment manager: users filter, create, edit, and delete appointments in a browser; the frontend sends HTTP requests to a FastAPI backend, which validates data and uses SQLite for persistence. The graph follows the shown frontend controller, API client, route handlers, manager, and database layers. The README is empty, and HTML wiring and other unsampled frontend behavior are not asserted.

Main entry points: [`backend/main.py`](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/main.py) (Appointment routes), [`frontend/js/main.js`](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/main.js) (Appointment controller), [`frontend/js/api.js`](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/api.js) (HTTP API client), [`backend/managers.py`](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/managers.py) (Appointment operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser app"]
  node_controller["Appointment controller<br/>[main.js]"]
  node_ui["Forms and appointment UI<br/>[ui.js]"]
  node_client["HTTP API client<br/>[api.js]"]
end

subgraph group_api["API and validation"]
  node_routes["Appointment routes<br/>[main.py]"]
  node_models["Appointment schemas<br/>[models.py]"]
end

subgraph group_storage["Appointment storage"]
  node_manager["Appointment operations<br/>[managers.py]"]
  node_database["SQLite connection setup<br/>[database.py]"]
  node_store[("Appointments database<br/>[turnos.db]")]
end

node_user(("User"))

node_controller -->|"requests"| node_client
node_controller -->|"updates"| node_ui
node_client -->|"HTTP requests"| node_routes
node_routes -->|"dispatches"| node_manager
node_routes -->|"opens connection"| node_database
node_routes -->|"validates with"| node_models
node_manager -->|"reads and writes"| node_store
node_database -->|"creates table"| node_store
node_user -.->|"uses"| node_controller

click node_controller "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/main.js"
click node_ui "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/ui.js"
click node_client "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/api.js"
click node_routes "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/main.py"
click node_models "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/models.py"
click node_manager "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/managers.py"
click node_database "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/database.py"
click node_store "https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/turnos.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_controller,node_ui,node_client,node_user toneBlue
class node_routes,node_models toneAmber
class node_manager,node_database,node_store toneMint
```

## Components

### Browser app

- [Appointment controller](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/main.js): `frontend/js/main.js`
- [Forms and appointment UI](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/ui.js): `frontend/js/ui.js`
- [HTTP API client](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/frontend/js/api.js): `frontend/js/api.js`

### API and validation

- [Appointment routes](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/main.py): `backend/main.py`
- [Appointment schemas](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/models.py): `backend/models.py`

### Appointment storage

- [Appointment operations](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/managers.py): `backend/managers.py`
- [SQLite connection setup](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/backend/database.py): `backend/database.py`
- [Appointments database](https://github.com/dantenovoa151-pixel/tp-fullstack-peluqueria-dante/blob/main/turnos.db): `turnos.db`

### Other components

- **User**

## Connections

- Appointment controller → HTTP API client: requests (evidence: `frontend/js/main.js`)
- Appointment controller → Forms and appointment UI: updates (evidence: `frontend/js/main.js`)
- HTTP API client → Appointment routes: HTTP requests (evidence: `frontend/js/api.js`)
- Appointment routes → Appointment operations: dispatches (evidence: `backend/main.py`)
- Appointment routes → SQLite connection setup: opens connection (evidence: `backend/main.py`)
- Appointment routes → Appointment schemas: validates with (evidence: `backend/main.py`)
- Appointment operations → Appointments database: reads and writes (evidence: `backend/managers.py`)
- SQLite connection setup → Appointments database: creates table (evidence: `backend/database.py`)
- User → Appointment controller: uses
