xumes / hotel-reservation-api

Fullcycle challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hotel-reservation-api

A Fullcycle challenge

Installation

Docker is required.

git clone git@github.com:xumes/sudoku-api.git

cd sudoku-api

docker compose up

When you see the message Server is running at port: 3000 the game is up and running

Unit Tests

Run all test cases

npm test

Considerations

Since I am running the migration and seeder at the moment docker is running the backend, sometimes it gets stuck. This is a bug I will fix later, and I know it will not count as part of the challenge, sorry.

How to use the api

  • First start getting a list of available hotels POST /hotels
  • From here, you can decide if you want to get one hotel only with GET /hotels/{hotelId}
  • You can create a new Hotel POST /hotels and inform: { name: "", address: { street: "", zipCode: "", country: "" } }
  • You can update Hotel info PATCH /hotels/{hotelId} and inform: { name: "", address: { street: "", zipCode: "", country: "" } }
  • You can create a new room in a hotel POST /hotels/{hotelId}/room} and inform: { number: 0, price: 0, status?: "AVAILABLE|UNAVAILABLE" }
  • Make a reservation POST /booking/{hotelId} and inform { roomNumber: 0, startDate: "", endDate: "" }
  • Find all reservations in a Hotel GET /booking/{hotelId} See details on our Swagger documentation running the aplication and navigating to /docs

Video Aulas

  • Aula 1: Video Title
  • Aula 2: Video Title
  • Aula 3: Video Title
  • Aula 4: Video Title

Future releases

Features that can be implemented to keep the game growing:

  • Fix the issue on starting docker and running the seeders
  • Add logic to control the period the hotel room is reserved
  • Add logic to release the room after the time has gone

Thank you

Is has been a wonderful opportunity put all this in place.

About

Fullcycle challenge


Languages

Language:TypeScript 96.7%Language:JavaScript 1.4%Language:Dockerfile 1.3%Language:Shell 0.5%