# mendieta967/fundamentos_programacion architecture

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

- Interactive diagram: https://gitdiagram.com/mendieta967/fundamentos_programacion
- Repository: https://github.com/mendieta967/fundamentos_programacion

## Overview

This is a desktop hotel-reservation application with customer, room, reservation, payment, and reporting capabilities. Its main user workflow runs from the reservations screen through reservation creation and validation, room availability selection, reservation services, and JSON-backed state; customer management and reports are additional branches. The repository also contains a separate menu-driven CLI. Some views and domain modules are unsampled, so their internal links are omitted unless supported by the source index or excerpts.

Main entry points: [`frontend/components/services/reservation_service.py`](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/reservation_service.py) (Reservation services), [`frontend/components/services/edit_reservation_service.py`](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/edit_reservation_service.py) (Reservation editing), [`frontend/components/sidebar.py`](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/sidebar.py) (Sidebar navigation), [`main.py`](https://github.com/mendieta967/fundamentos_programacion/blob/main/main.py) (CLI entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["Application shell<br/>[app.py]"]
  node_navigation["Sidebar navigation<br/>[sidebar.py]"]
  node_reservation_view["Reservations screen<br/>[reservations.py]"]
  node_reservation_dialog["New reservation<br/>[new_reservation.py]"]
  node_customer_view["Customer screen<br/>[customers.py]"]
  node_customer_dialogs["Customer dialogs<br/>[new_customer.py]"]
  node_room_view["Room screen<br/>[rooms.py]"]
  node_report_view["Reports screen<br/>[reports.py]"]
  node_receipt["Receipt PDF<br/>[receipt_pdf.py]"]
end

subgraph group_domain["Reservation domain"]
  node_reservation_service["Reservation services"]
  node_edit_reservation_service["Reservation editing"]
  node_payments["Payment calculations<br/>[payments.py]"]
  node_reservation_status["Reservation status"]
  node_validation["Domain validation<br/>[validations.py]"]
end

subgraph group_records["Customer and room records"]
  node_customer_service["Customer services"]
  node_rooms["Room management<br/>[rooms.py]"]
  node_json_store[("JSON data store<br/>[json_storage.py]")]
end

subgraph group_insights["Reports and analytics"]
  node_reporting["Report calculations"]
end

subgraph group_cli["Command-line interface"]
  node_cli["CLI entry point<br/>[main.py]"]
  node_cli_reservations["CLI reservations<br/>[menu.py]"]
  node_cli_customers["CLI customers<br/>[menu.py]"]
  node_cli_rooms["CLI room views<br/>[menu.py]"]
  node_cli_reports["CLI reports<br/>[menu.py]"]
end

node_user(("Hotel staff"))

node_user -->|"opens"| node_app
node_app -->|"creates"| node_navigation
node_navigation -->|"opens"| node_reservation_view
node_navigation -->|"opens"| node_customer_view
node_navigation -->|"opens"| node_room_view
node_navigation -->|"opens"| node_report_view
node_reservation_view -->|"opens"| node_reservation_dialog
node_reservation_view -->|"delegates edits"| node_edit_reservation_service
node_reservation_dialog -->|"submits reservation"| node_reservation_service
node_reservation_dialog -->|"checks availability"| node_rooms
node_reservation_dialog -->|"generates receipt"| node_receipt
node_reservation_service -->|"calculates charges"| node_payments
node_reservation_service -->|"uses status"| node_reservation_status
node_reservation_service -->|"validates"| node_validation
node_reservation_service -->|"checks customer"| node_customer_service
node_reservation_service -->|"reads and writes"| node_json_store
node_edit_reservation_service -->|"calculates charges"| node_payments
node_edit_reservation_service -->|"uses status"| node_reservation_status
node_edit_reservation_service -->|"checks room"| node_rooms
node_edit_reservation_service -->|"validates"| node_validation
node_edit_reservation_service -->|"reads and writes"| node_json_store
node_customer_view -->|"opens"| node_customer_dialogs
node_customer_view -->|"loads customers"| node_customer_service
node_customer_service -->|"checks reservations"| node_reservation_status
node_customer_service -->|"reads and writes"| node_json_store
node_rooms -->|"loads reservations"| node_json_store
node_report_view -.->|"presents reports"| node_reporting
node_reporting -->|"reads records"| node_json_store
node_reporting -->|"uses reservation status"| node_reservation_status
node_reporting -->|"uses room data"| node_rooms
node_user -->|"runs"| node_cli
node_cli -->|"dispatches"| node_cli_reservations
node_cli -->|"dispatches"| node_cli_customers
node_cli -->|"dispatches"| node_cli_rooms
node_cli -->|"dispatches"| node_cli_reports

click node_app "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/app.py"
click node_navigation "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/sidebar.py"
click node_reservation_view "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/reservations.py"
click node_reservation_dialog "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/dialogs/new_reservation.py"
click node_customer_view "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/customers.py"
click node_customer_dialogs "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/dialogs/new_customer.py"
click node_room_view "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/rooms.py"
click node_report_view "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/reports.py"
click node_receipt "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/pdf/receipt_pdf.py"
click node_reservation_service "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/reservation_service.py"
click node_edit_reservation_service "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/edit_reservation_service.py"
click node_payments "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/payments.py"
click node_reservation_status "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/reservation_status.py"
click node_validation "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/validations.py"
click node_customer_service "https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/customer_service.py"
click node_rooms "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/rooms.py"
click node_json_store "https://github.com/mendieta967/fundamentos_programacion/blob/main/storage/json_storage.py"
click node_reporting "https://github.com/mendieta967/fundamentos_programacion/tree/main/modules/reports"
click node_cli "https://github.com/mendieta967/fundamentos_programacion/blob/main/main.py"
click node_cli_reservations "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/reservations/menu.py"
click node_cli_customers "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/clients/menu.py"
click node_cli_rooms "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/room_views/menu.py"
click node_cli_reports "https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/reports/menu.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_app,node_navigation,node_reservation_view,node_reservation_dialog,node_customer_view,node_customer_dialogs,node_room_view,node_report_view,node_receipt toneBlue
class node_reservation_service,node_edit_reservation_service,node_payments,node_reservation_status,node_validation toneAmber
class node_customer_service,node_rooms,node_json_store toneMint
class node_reporting toneRose
class node_cli,node_cli_reservations,node_cli_customers,node_cli_rooms,node_cli_reports,node_user toneIndigo
```

## Components

### Desktop interface

- [Application shell](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/app.py): `frontend/app.py`
- [Sidebar navigation](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/sidebar.py): `frontend/components/sidebar.py`
- [Reservations screen](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/reservations.py): `frontend/views/reservations.py`
- [New reservation](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/dialogs/new_reservation.py): `frontend/dialogs/new_reservation.py`
- [Customer screen](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/customers.py): `frontend/views/customers.py`
- [Customer dialogs](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/dialogs/new_customer.py): `frontend/dialogs/new_customer.py`
- [Room screen](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/rooms.py): `frontend/views/rooms.py`
- [Reports screen](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/views/reports.py): `frontend/views/reports.py`
- [Receipt PDF](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/pdf/receipt_pdf.py): `frontend/pdf/receipt_pdf.py`

### Reservation domain

- [Reservation services](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/reservation_service.py): `frontend/components/services/reservation_service.py`
- [Reservation editing](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/edit_reservation_service.py): `frontend/components/services/edit_reservation_service.py`
- [Payment calculations](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/payments.py): `modules/payments.py`
- [Reservation status](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/reservation_status.py): `modules/reservation_status.py`
- [Domain validation](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/validations.py): `modules/validations.py`

### Customer and room records

- [Customer services](https://github.com/mendieta967/fundamentos_programacion/blob/main/frontend/components/services/customer_service.py): `frontend/components/services/customer_service.py`
- [Room management](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/rooms.py): `modules/rooms.py`
- [JSON data store](https://github.com/mendieta967/fundamentos_programacion/blob/main/storage/json_storage.py): `storage/json_storage.py`

### Reports and analytics

- [Report calculations](https://github.com/mendieta967/fundamentos_programacion/tree/main/modules/reports): `modules/reports`

### Command-line interface

- [CLI entry point](https://github.com/mendieta967/fundamentos_programacion/blob/main/main.py): `main.py`
- [CLI reservations](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/reservations/menu.py): `modules/reservations/menu.py`
- [CLI customers](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/clients/menu.py): `modules/clients/menu.py`
- [CLI room views](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/room_views/menu.py): `modules/room_views/menu.py`
- [CLI reports](https://github.com/mendieta967/fundamentos_programacion/blob/main/modules/reports/menu.py): `modules/reports/menu.py`

### Other components

- **Hotel staff**

## Connections

- Hotel staff → Application shell: opens
- Application shell → Sidebar navigation: creates (evidence: `frontend/app.py`)
- Sidebar navigation → Reservations screen: opens (evidence: `frontend/components/sidebar.py`)
- Sidebar navigation → Customer screen: opens (evidence: `frontend/components/sidebar.py`)
- Sidebar navigation → Room screen: opens (evidence: `frontend/components/sidebar.py`)
- Sidebar navigation → Reports screen: opens (evidence: `frontend/components/sidebar.py`)
- Reservations screen → New reservation: opens (evidence: `frontend/views/reservations.py`)
- Reservations screen → Reservation editing: delegates edits
- New reservation → Reservation services: submits reservation (evidence: `frontend/dialogs/new_reservation.py`)
- New reservation → Room management: checks availability (evidence: `frontend/dialogs/new_reservation.py`)
- New reservation → Receipt PDF: generates receipt (evidence: `frontend/dialogs/new_reservation.py`)
- Reservation services → Payment calculations: calculates charges (evidence: `frontend/components/services/reservation_service.py`)
- Reservation services → Reservation status: uses status (evidence: `frontend/components/services/reservation_service.py`)
- Reservation services → Domain validation: validates (evidence: `frontend/components/services/reservation_service.py`)
- Reservation services → Customer services: checks customer (evidence: `frontend/components/services/reservation_service.py`)
- Reservation services → JSON data store: reads and writes (evidence: `frontend/components/services/reservation_service.py`)
- Reservation editing → Payment calculations: calculates charges (evidence: `frontend/components/services/edit_reservation_service.py`)
- Reservation editing → Reservation status: uses status (evidence: `frontend/components/services/edit_reservation_service.py`)
- Reservation editing → Room management: checks room (evidence: `frontend/components/services/edit_reservation_service.py`)
- Reservation editing → Domain validation: validates (evidence: `frontend/components/services/edit_reservation_service.py`)
- Reservation editing → JSON data store: reads and writes (evidence: `frontend/components/services/edit_reservation_service.py`)
- Customer screen → Customer dialogs: opens (evidence: `frontend/views/customers.py`)
- Customer screen → Customer services: loads customers (evidence: `frontend/views/customers.py`)
- Customer services → Reservation status: checks reservations (evidence: `frontend/components/services/customer_service.py`)
- Customer services → JSON data store: reads and writes (evidence: `frontend/components/services/customer_service.py`)
- Room management → JSON data store: loads reservations (evidence: `modules/rooms.py`)
- Reports screen → Report calculations: presents reports
- Report calculations → JSON data store: reads records (evidence: `modules/reports/report_data.py`)
- Report calculations → Reservation status: uses reservation status (evidence: `modules/reports/report_data.py`)
- Report calculations → Room management: uses room data (evidence: `modules/reports/report_data.py`)
- Hotel staff → CLI entry point: runs
- CLI entry point → CLI reservations: dispatches (evidence: `main.py`)
- CLI entry point → CLI customers: dispatches (evidence: `main.py`)
- CLI entry point → CLI room views: dispatches (evidence: `main.py`)
- CLI entry point → CLI reports: dispatches (evidence: `main.py`)
