A modern, scalable hotel booking system built with ASP.NET Core 8, Clean Architecture, CQRS, and Stripe Payments.
- Browse and search hotels with filters
- View room availability and pricing
- Secure online booking with instant confirmation
- Manage bookings and view history
- Leave reviews and ratings
- Manage hotel and room listings
- Handle bookings and check-ins/check-outs
- View occupancy reports and analytics
- Respond to guest reviews
- Full system management
- User and role administration
- System configuration
- Advanced reporting
- Clean Architecture (Domain β Application β Infrastructure β API)
- CQRS Pattern using MediatR
- Repository Pattern + Unit of Work
- Domain-Driven Design principles (Entities, Value Objects, Domain Events)
- Specification Pattern for reusable queries
- SOLID & Clean Code principles
- .NET 8 / ASP.NET Core 8
- Entity Framework Core 8 (SQL Server)
- MediatR (Commands / Queries / Pipeline Behaviors)
- FluentValidation for request validation
- AutoMapper for DTO β Entity mapping
- Built-in Dependency Injection
- JWT Bearer Authentication
- Role-Based Access Control (RBAC)
- Policy-based authorization
- Secure password hashing
- RESTful API design
- API Versioning
- Swagger / OpenAPI 3
- Consistent API Response Wrapper
- Global Exception Handling
- CORS configuration
- Response Caching
- Response Compression
- SQL Server 2022
- EF Core Migrations
- Soft Delete support
- Pagination, filtering, sorting
- Optimized EF Core queries (AsNoTracking, compiled queries)
- Stripe PaymentIntent API
- Webhook Handling (
payment_intent.succeeded) - Automatic booking confirmation on payment success
- xUnit for unit testing
- Integration Tests using WebApplicationFactory/TestServer
- Moq for mocking
- SQLite in-memory Integration Tests
- Coverage reporting (Coverlet)
- Serilog (Console + File + Seq support)
- Request/Response logging
- Structured logging with enrichers
- Health Checks (
/health,/health/ready,/health/live)
- Docker + Docker Compose
- Environment-based configuration (Development/Production)
- GitHub Actions (CI pipeline)
- Secrets via Environment Variables / User Secrets
- HTTPS enforcement
- Security headers (CSP, HSTS, XSS-Protection)
- Input validation
- Output encoding
- Rate limiting
- CORS Policies
- Visual Studio 2022 / VS Code
- Postman Collection included
- Swagger UI for interactive testing
- XML documentation comments
- .NET 8 SDK
- Docker Desktop (recommended)
- Postman (optional, for API testing)
#Clone the repository
git clone https://github.com/Dev-Ahmed-Ashraf/Hotel_Booking_API.git
cd Hotel_Booking_API
#Start the full stack (API + SQL Server)
docker-compose up -d --buildFor detailed technical documentation, please refer to:
- API Documentation - Complete API reference and developer guide
- Database Schema - Detailed database design and relationships
- Authentication Guide - Setting up authentication and authorization
- Deployment Guide - Production deployment instructions
- ASP.NET Core 8
- EF Core 8
- MediatR
- FluentValidation
- AutoMapper
- Serilog
- xUnit
- Docker
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.











