This project is to develop a Restaurant website applying modern, scalable, high available architecture by implementing OAuth2, micro-service, Redis, Kafka message queue, Docker, Kubernetes and AWS cloud. This repo is the backend for all microservices.
- The IPs for all the URLs might change in the future since we reboot the EC2 instances.
- Discovery Service
- API Gateway Service
- Kafka Service
- Account Service
- Login service
- Menu Service
- Table Service
- Reservation Service
- User Service
http://54.203.146.96:8761
http://54.214.208.194:8989
http://34.222.65.129:8083
- GET
- Params: startAt, maxResults
- POST, PUT
- GET
- Called by Login Service
- POST
- Params: startAt, maxResults
- Find accounts by different attributes
- DELETE
- POST
http://34.217.83.118:8081
- GET
- OAuth2 Login with google
http://54.184.58.188:8084
- GET
- Params: startAt, maxResults
- POST, PUT
- GET
- Params: startAt, maxResults
- POST
- Params: startAt, maxResults
- Find dishes by different attributes
- DELETE
http://54.190.164.68:8082
- GET
- Params: startAt, maxResults
- POST, PUT
- POST
- Params: startAt, maxResults
- Find tables by different attributes
- GET
- Called by User Service
http://34.218.66.165:9000
- POST
- POST
http://34.218.66.165:8086
- POST, PUT
- Called by User Service
- GET
- Called by User Service
- DELETE
http://54.202.141.13:8085
- GET
- Find available tables from a given time
- GET
- Params: startAt, maxResults
- POST, PUT
- POST
- Find reservations by different attributes
- Save/load main courses of the menu
- Handle request for create and update reservations
- Launch Discovery service first.
- Launch Kafka service before Reservation service.
- Launch Table and Reservation services before User service.
- Launch Redis server before Menu service
- Check services' name here
http://54.203.146.96:8761
- All APIs should be called from API Gateway with corresponding service name
- IP for each service and for discovery service specified in application.yml of each service has to be checked and modified manually to make sure it is up-to-date.
- Run mvn clean install to create target folder and .jar file
- Run docker-compose up --build command
- User and email must be unique and not empty
- User, password and email are required for creating new account
- Valid statuses { available, unavailable }
- Seats must be greater than 0 and are required for creating new table
- Cannot add new, remove table or update seats (fixed physical map)
- Valid categories { appetizer, main, dessert }
- Dish name must not be empty and is required for creating new dish
- Category cannot be updated
- Valid statuses { booked, cancelled, done }
- Name, phone, start time, table id are required and must not be empty for creating new reservation
- One reservation can last up to 2 hours
- Booked and unavailable tables cannot be reserved
- Search, view menu
- Search, view available tables
- Create reservation
- Login by username password, google
- Search, view, update tables
- Search, view, create, update, delete accounts
- Search, view, create, update, delete menu
- Search, view, create, update, delete reservation