Giter VIP home page Giter VIP logo

hotel-booking's Introduction

Testing

Hotel Booking System

The final project of my backend internship at Foothill Technology Solutions.

ASP.NET WEB API project for booking hotels.

Features:

  • User login and register functionalities.
  • Global search functionality for finding hotels by hotel name, hotel description, room type, city name and other properties with text fields.
  • Managing images and thumbnails for cities, hotels and rooms.
  • Show popular cities which are the most visited ones.
  • Email sending service that sends an email to the user when the user creates a booking containing all of the needed information like total price, exact location for the hotel on the map and other details.
  • Admin page to search, add, update and delete entities.

System architecture:

Used Clean Architecture which provides great separation of concerns between business logic and external layers and minimal changes for replacing external frameworks like ASP.NET or EF Core. The system has 4 main layers:

Core layers:

  1. Domain layer:
    • Contains the shared models and abstractions for business logic.
    • Has no dependencies on other layers.
  2. Application layer:
    • Contains the implementation of business logic requirements that are declared in the domain layer and all of the validation logic.
    • Depends on the abstractions in domain layer.

External layers:

  1. Infrastructure:
    • Contains the implementation of external services that are declared in the domain layer like data repositories and email service.
    • Depends on the abstractions in domain layer.
  2. Presentation (API) layer:
    • Contains the implementation of the APIs using the help of business logic abstractions in the domain layer.
    • Depends on the domain layer and has no direct interactions with data repositories.

Technical features:

  • Secure APIs with JWT for authentication and Role-Based Access Control (RBAC) for regular users and admins.
  • Passwords are securely stored in the database using Microsoft.AspNet.Identity.IPasswordHasher which stores hashed passwords using Password Salting.
  • Used SQL Server as a database using the help of EF Core as an ORM.
  • Unit testing for units that contains testable logic, architecture testing to make sure that Clean Architecture principles aren't violated and integration testing for the APIs.
  • Well-documented clean codes and APIs with best-practices.
  • Robust validations for creating and updating entities.
  • Logging using Serilog.
  • Rate limiting middleware to limit the number of requests for a client in a customizable time interval.
  • Meaningful response status codes and messages.
  • Api versioning.

Database Schema:

Database Schema

API documentation:

Getting started:

  • The project is built on .NET 8.0
  • External packages: AutoMapper, SixLabors.ImageSharp, Serilog, FluentValidation, Moq, AutoFixture, FluentAssertion, xUnit, NetArchTest.
  • Download the project and open the solution file HotelBooking.sln.
  • Run the migration in Infrastructure layer to update the database.
  • The system has an admin that's seeded into the database using seeding migration, the credentials are: Username: admin, Password: admin123.

hotel-booking's People

Contributors

mohammad-nayef avatar

Stargazers

Patrick Couturier avatar Fidaa Shwahna avatar Leen Odeh avatar  avatar Nedal-Esrar Ahmad avatar Nathan Aguiar avatar Bashar Herbawi avatar  avatar

Watchers

 avatar

Forkers

andmiguedev1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.