GithubHelp home page GithubHelp logo

hotel-reservation's Introduction

Hotel Reservation System

users can register , login view rooms do reservation , get list of all reservations

Database & Schema Design

there are 3 entities User Reservation and Room for Relations

API Documenting

Assumptions

  • for simplicity authentication applied only on reservation
  • in reservation the minimum time unit is one day

Tech Stack

  • FastAPI as backend framework over python
  • uvicorn as asgi server
  • sqlalchemy as ORM
  • sqlite3 as RDMS

API END Points

URL Methods Description
/user/login/ POST user login using username and password
/user/register/ POST user register with username , password and confirm , confirm must match password value
/user/all/ GET list of all users
/room/add/ POST add new room to system , room code must be unique , price must be greater than 0
/room/{ID}/ GET get specific room details
/room/all/ GET list of all rooms
room/{ID}/ PUT update room code must be unique , price must be greater than 0
/room/{ID}/ DELETE delete room by ID
/reservation/{ID}/GET get reservation by id , current user must be owner of reservation
/reservation/all/ GET list of all reservation for current logged in user
/reservation/add/ POST create new reservations , user_id by default take current logged in user , room_id must be exists , reservation room mustn't be overlapped with other reservations , room for reservation must be in service , from_date and to_date must be in today and future , to_date must be greater than from_date
/reservation/{ID}/ DELETE reservation current user must be owner for reservation , reservation can only cancel before from_date with 2 days at least

Build Locally

  • machine with python >3.5 and pip as package manager
  • git clone url on github git clone {URL}
  • install pipenv as package manager pip install pipenv
  • move to cloned project folder cd {project folder}
  • run pipenv shell to create & activate virtual env
  • run pipenv install -r requirements.txt to install dependencies
  • run uvicorn app.main:app --reload to start application locally
  • no start play with API End Points

hotel-reservation's People

Contributors

bakrfrag avatar

Watchers

 avatar

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.