/room-reservation

A simple room reservation application using Symfony 6, Docker, Queue (Symfony Messenger), Elasticsearch. All environment requirings were presented on docker

Primary LanguagePHP

Room Reservation REST Api Doc

A simple room reservation application using Symfony 6, Docker, Queue (Symfony Messenger), Elasticsearch. All environment requirings were presented on docker


to run the REST Api follow the following steps;

  1. run project: $ docker-compose up -d
  2. run schema update: $ docker exec room_reservation_php php bin/console doctrine:schema:update --force
  3. run migrations: $ docker exec room_reservation_php php bin/console doctrine:migrations:migrate
  4. run migrations: $ docker exec room_reservation_php php bin/console TransferDataFromMysqlToElastic
  5. run migrations: $ docker exec room_reservation_php php bin/console messenger:consume -vv
  6. run project https://localhost:8088

You can find postman collections in root directory name with postmanCollections

System Design Architecture

Alt text


Database Diagram

Alt text database diagram: https://drawsql.app/teams/selfteam-1/diagrams/reservation-database


Endpoints

list reservations

curl --location --request GET 'https://localhost:8088/api/v1/reservation/list'

create reservation

curl --location --insecure --request POST 'https://localhost:8088/api/v1/reservation/create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payment": {
        "cardNumber": "4716841611983226",
        "cardOwner": "test test",
        "cardCvc": 621,
        "cardExpiry": "07/28"
    },
    "user": 1,
    "room": 1,
    "startDate": "2022-09-26",
    "endDate": "2022-09-29",
    "guestCount": 2
}'

Tools

Packages