A modern hotel booking system built with ASP.NET Core 9.0 following Clean Architecture principles. This application provides a robust and scalable solution for managing hotel reservations.
HotelBooking is a comprehensive hotel reservation management system designed to streamline the booking process for hotels. Built with a focus on maintainability and scalability, the application follows Clean Architecture patterns, ensuring separation of concerns and testability.
- 🛏️ Room booking and management
- 📅 Reservation scheduling
- 🔐 Secure authentication with ASP.NET Core Identity
- 📊 Clean Architecture design pattern
- 🐳 Docker containerization support
- 🗄️ MySQL database with Entity Framework Core
| Category | Technology |
|---|---|
| Framework | ASP. NET Core 9.0 |
| Language | C# 13 |
| Database | MySQL 8.0 |
| ORM | Entity Framework Core 9.0, Dapper |
| Authentication | ASP.NET Core Identity |
| MySQL Provider | Pomelo.EntityFrameworkCore.MySql |
| Containerization | Docker & Docker Compose |
| Architecture | Clean Architecture |
HotelBooking/
├── 📂 src/
│ ├── 📂 HotelBooking.Domain/ # Enterprise business rules & entities
│ │ ├── 📂 Common/ # Common base classes
│ │ ├── 📂 Entities/ # Domain entities
│ │ └── 📂 Enums/ # Domain enumerations
│ ├── 📂 HotelBooking.Application/ # Application business rules & use cases
│ │ ├── 📂 Exceptions/ # Custom exceptions
│ │ ├── 📂 Interfaces/ # Service interfaces
│ │ ├── 📂 Models/ # DTOs and view models
│ │ └── 📂 Services/ # Application services
│ ├── 📂 HotelBooking.Infrastructure/ # External concerns (DB, Identity)
│ │ ├── 📂 Context/ # Database context
│ │ ├── 📂 Identity/ # Identity configuration
│ │ ├── 📂 Migrations/ # EF Core migrations
│ │ ├── 📂 Persistence/ # Persistence configurations
│ │ └── 📂 Repositories/ # Repository implementations
│ └── 📂 HotelBooking.Web/ # Presentation layer
│ ├── 📂 Controllers/ # API/MVC controllers
│ ├── 📂 Middleware/ # Custom middleware
│ └── 📂 Pages/ # Razor Pages
├── 📄 Dockerfile
├── 📄 docker-compose. yml
├── 📄 HotelBooking. sln
└── 📄 . gitignore
- [. NET 9.0 SDK](https://dotnet.microsoft. com/download/dotnet/9.0) or later
- Docker (for containerized deployment)
- MySQL 8.0 (for local development without Docker)
-
Clone the repository
git clone https://github.com/kovalllllll/HotelBooking.git cd HotelBooking -
Start the application with Docker Compose
docker-compose up -d
-
Access the application
- The application will be available at:
http://localhost:5000 - MySQL will be exposed on port
3307
- The application will be available at:
-
Clone the repository
git clone https://github.com/kovalllllll/HotelBooking.git cd HotelBooking -
Set up the MySQL database
- Create a database named
HotelBooking - Update the connection string in
src/HotelBooking.Web/appsettings.json
- Create a database named
-
Restore dependencies
dotnet restore
-
Apply database migrations
dotnet ef database update --project src/HotelBooking.Infrastructure --startup-project src/HotelBooking. Web
-
Run the application
dotnet run --project src/HotelBooking.Web
Once the application is running, you can:
- Access the web application at
http://localhost:5000 - Register a new account or log in with existing credentials
- Browse available rooms and make reservations
- Manage bookings through the user dashboard
When using Docker, connect to MySQL with:
| Parameter | Value |
|---|---|
| Host | localhost |
| Port | 3307 |
| Database | HotelBooking |
| User | root |
| Password | mysql |
Made with ❤️ by kovalllllll