How beto1821/hotel-management-app works
Plataforma Hotel is a hotel-management web application. Hotel staff use the Nuxt interface to authenticate and manage rooms, clients, and reservations, while the FastAPI backend serves those operations and dashboard metrics backed by SQLAlchemy/MySQL. Authentication, permissions, and audit logging are cross-cutting backend capabilities. The README documents the major product features; some route and frontend implementation details were not excerpted, so uncertain connections are omitted or marked unverified.
Main entry points: api.py API router · apiClient.ts API client · auth.py Authentication routes · clients.py Client routes
Components 29
Hotel interface
- Nuxt application
frontend/app.vue - Login and registration
frontend/pages/login.vue - Authentication state
frontend/composables/useAuth.ts - Route guard
frontend/middleware/auth.ts - Dashboard view
frontend/pages/index.vue - Client management
frontend/pages/clients/index.vue - Room management
frontend/pages/quartos/index.vue - Reservation management
frontend/pages/reservas/index.vue - API client
frontend/services/apiClient.ts
API workflows
- FastAPI application
backend/main.py - API router
backend/api/api.py - Authentication routes
backend/api/endpoints/auth.py - Client routes
backend/api/endpoints/clients.py - Room routes
backend/api/endpoints/quartos.py - Reservation routes
backend/api/endpoints/reservas.py - Dashboard routes
backend/api/endpoints/dashboard.py
Business services
- Client service
backend/services/client_service.py - Room service
backend/services/quarto_service.py - Reservation service
backend/services/reserva_service.py - Dashboard metrics
backend/services/dashboard_service.py
Security and persistence
- Authentication logic
backend/services/auth_service.py - Identity and permissions
backend/dependencies/auth.py - Audit logging
backend/services/audit_service.py - Database sessions
backend/core/database.py - Hotel records
backend/models/reserva.py - Client records
backend/models/client_model.py - Room records
backend/models/quarto.py - User records
backend/models/user_model.py
Other components
- Hotel staff
Connections 38
- Hotel staff → Login and registration: signs in
- Hotel staff → Dashboard view: views metrics
- Hotel staff → Client management: manages clients
- Hotel staff → Room management: manages rooms
- Hotel staff → Reservation management: manages stays
- Login and registration → Authentication state: uses
- Route guard → Authentication state: checks
frontend/middleware/auth.ts - Dashboard view → API client: requests data
- Client management → API client: requests data
- Room management → API client: requests data
- Reservation management → API client: requests data
- API client → FastAPI application: sends API calls
- Nuxt application → FastAPI application: uses API
- FastAPI application → Database sessions: creates tables
backend/main.py - FastAPI application → API router: mounts routes
backend/main.py - API router → Authentication routes: registers
backend/api/api.py - API router → Client routes: registers
backend/api/api.py - API router → Room routes: registers
backend/api/api.py - API router → Reservation routes: registers
backend/api/api.py - API router → Dashboard routes: registers
backend/api/api.py - Authentication routes → Database sessions: opens sessions
backend/api/endpoints/auth.py - Authentication routes → Authentication logic: uses security logic
backend/api/endpoints/auth.py - Authentication routes → Audit logging: records events
backend/api/endpoints/auth.py - Client routes → Client service: delegates client work
backend/api/endpoints/clients.py - Client routes → Audit logging: records changes
backend/api/endpoints/clients.py - Client routes → Identity and permissions: requires identity
backend/api/endpoints/clients.py - Room routes → Room service: delegates room work
- Reservation routes → Reservation service: delegates booking work
- Dashboard routes → Dashboard metrics: requests metrics
- Database sessions → Hotel records: creates schema
backend/core/database.py - Reservation service → Hotel records: reads and writes
backend/services/reserva_service.py - Reservation service → Room records: checks availability
backend/services/reserva_service.py - Client service → Client records: reads and writes
backend/services/client_service.py - Dashboard metrics → Hotel records: queries bookings
backend/services/dashboard_service.py - Dashboard metrics → Client records: queries clients
backend/services/dashboard_service.py - Dashboard metrics → Room records: queries rooms
backend/services/dashboard_service.py - Identity and permissions → User records: loads identity
backend/dependencies/auth.py - Database sessions → User records: creates schema
backend/core/database.py