Author: Ege Germen
EYN Hotel Reservation System is a web application that allows users to make hotel reservations, list hotels, filter them, and view hotel details. The project has been developed using modern architecture and technologies.
The backend has been developed in accordance with Onion Architecture principles. This architecture ensures that the project has a layered structure, dependencies are unidirectional towards the center, and the project is more testable, maintainable, and scalable.
- Core Layer:
- Domain: Contains the fundamental business logic and entities of the project. It has no dependencies on any layer.
- Application: Contains business workflows, commands, queries, and DTOs (Data Transfer Objects). The CQRS (Command Query Responsibility Segregation) pattern has been implemented using the
MediatRlibrary.
- Infrastructure Layer:
- Persistence: Contains database operations, Entity Framework Core context, and migrations. PostgreSQL database is used.
- Infrastructure: Contains infrastructural services such as token management.
- Presentation Layer:
- WebApi.Api: Contains API controllers that handle incoming requests from users and return responses. API documentation is provided with Swagger.
The frontend has been developed using Angular with Component-Based Architecture. This architecture allows the interface to be divided into reusable and manageable components.
- Components: Consists of components representing each part of the interface (e.g.,
otel-liste,otel-detay,rezervasyon-onay). - Services: Contains business logic such as API requests, authentication, and state management.
- Modules: Consists of modules that group different features of the application.
- .NET 9.0: The main platform on which the project is developed.
- ASP.NET Core: Framework used to create the Web API.
- Entity Framework Core: ORM (Object-Relational Mapping) tool used for database operations.
- PostgreSQL: Used as the database.
- MediatR: Used to implement the CQRS pattern.
- JWT (JSON Web Token): Used for authentication and authorization.
- Swagger: Used for API documentation.
- Angular 18: The framework on which the frontend application is developed.
- TypeScript: A statically typed superset of JavaScript.
- RxJS: Used for asynchronous and event-based programming.
- SCSS: An advanced version of CSS.
- Database Settings: Update the
ConnectionStringssection in theWebApi/Presentation/WebApi.Api/appsettings.jsonfile with your own PostgreSQL database information. - Apply Migrations: Run the following command in the directory where the
WebApi.Persistenceproject is located to create the database schema:dotnet ef database update
- Run the Application: Run the following command in the directory where the
WebApi.Apiproject is located:dotnet run
- Install Dependencies: Run the following command in the
EYNFrontdirectory:npm install
- Run the Application: Run the following command in the
EYNFrontdirectory:ng serve
The application will run at http://localhost:4200/.
When the backend application is running, you can access the API documentation through the Swagger interface. By default, the documentation is located at http://localhost:5000/swagger (or a similar port).
This project has been developed as part of an internship, aiming to create a hotel reservation system using modern web development technologies and architectures. The project covers both backend and frontend development processes, providing a complete web application development experience.