SGRH API Documentation
Welcome to the Sistema de Gestión de Reservas de Hoteles (SGRH) API documentation.Current Status: The SGRH project has a fully implemented domain layer with rich business logic, but the API controllers are currently under development. This documentation describes the planned API surface based on the existing domain model and application architecture.
Overview
SGRH is a hotel reservation management system built with clean architecture principles. The system has:- ✅ Complete domain layer with entities, business rules, and policies
- ✅ EF Core persistence with full database configuration
- ✅ CQRS structure in the application layer (implementation in progress)
- 🚧 API controllers (currently being implemented)
Current API Endpoints
The following endpoint is currently implemented for database connectivity testing:Test Database Connection
Planned API Architecture
The full API will be built using:- Framework: ASP.NET Core 8 Web API
- Database: MySQL (configurable to SQL Server)
- ORM: Entity Framework Core 8
- Architecture: Monolithic modular with layered architecture
- Pattern: CQRS (Command Query Responsibility Segregation)
- Authentication: JWT Bearer tokens (planned)
Planned API Modules
Based on the domain model, the following API modules are planned for implementation:Clientes
Client management - Domain model implemented
Reservas
Reservation management - Domain model implemented
Habitaciones
Room inventory - Domain model implemented
Tarifas y Temporadas
Pricing and seasons - Domain model implemented
Servicios Adicionales
Additional services - Domain model implemented
Reportes
Business intelligence queries (planned)
Auditoría
Audit logging - Domain model implemented
Domain-Driven Design
The API will expose operations based on the rich domain model:Implemented Domain Features
- Reservation aggregate with state machine (Pendiente → Confirmada → Finalizada → Cancelada)
- Room management with temporal state tracking
- Seasonal pricing with rate snapshots
- Business rule enforcement via domain policies
- Validation guards preventing invalid states
Development Setup
To run the current API:Swagger Documentation
Access the Swagger UI for interactive API exploration:Next Steps
Domain Models
Explore the implemented business entities
Architecture
Understand the system architecture
Application Layer
Review the CQRS structure
Configuration
Configure database and services