This project consists of two separate microservices. One of them, Burgerzilla API, is a REST-API micro-service that takes orders from hamburger restaurants, can view the status of the order, and enables transactions with customer/restaurant authorization regarding the order. The second of them is a microservice called Auth API, which allows restaurants and customers to register and login, and then issue JWT tokens to users.
docker-compose up
flask test
burgerzilla-restapi
┣ app
┃ ┣ api
┃ ┃ ┣ customer
┃ ┃ ┃ ┣ controller.py
┃ ┃ ┃ ┣ dto.py
┃ ┃ ┃ ┣ service.py
┃ ┃ ┃ ┣ utils.py
┃ ┃ ┃ ┗ __init__.py
┃ ┃ ┣ restaurant
┃ ┃ ┃ ┣ controller.py
┃ ┃ ┃ ┣ dto.py
┃ ┃ ┃ ┣ service.py
┃ ┃ ┃ ┣ utils.py
┃ ┃ ┃ ┗ __init__.py
┃ ┃ ┣ authorization_check.py
┃ ┃ ┗ __init__.py
┃ ┣ auth
┃ ┃ ┣ controller.py
┃ ┃ ┣ dto.py
┃ ┃ ┣ service.py
┃ ┃ ┣ utils.py
┃ ┃ ┗ __init__.py
┃ ┣ models
┃ ┃ ┣ orders.py
┃ ┃ ┣ products.py
┃ ┃ ┣ restaurant.py
┃ ┃ ┣ schemas.py
┃ ┃ ┣ users.py
┃ ┃ ┗ __init__.py
┃ ┣ extensions.py
┃ ┣ utils.py
┃ ┗ __init__.py
┣ logs
┣ tests
┃ ┣ utils
┃ ┃ ┣ base.py
┃ ┃ ┣ common.py
┃ ┃ ┗ __init__.py
┃ ┣ test_auth_customer.py
┃ ┣ test_auth_restaurant.py
┃ ┗ __init__.py
┣ .env
┣ .gitignore
┣ boot.sh
┣ config.py
┣ docker-compose.yml
┣ Dockerfile
┣ README.md
┣ requirements.txt
┗ runburgerzilla.py
A REST-API micro-service that enables customers and restaurants to login and register. In addition, customers and restaurants receive JWT tokens with this micro-service, which they will use later.
Postman Documentation
https://documenter.getpostman.com/view/19453056/UVeNm2hn
Customers endpoints
POST /login
Content-Type: application/json
{
"email": "ugurozy@musteri.nett",
"password": "12345"
}
POST /register
Content-Type: application/json
{
"fullname": "Ezel Özyalı",
"email": "ezelozy@musteri.nett",
"password": "12345"
}
Restaurant endpoints
POST /login
Content-Type: application/json
{
"email": "omerk@restaron.net",
"password": "12345"
}
POST /register
Content-Type: application/json
{
"fullname": "Tunç Dimdal",
"email": "tuncd@restaron.net",
"password": "12345",
"restaurant_name": "Dublemumble"
}
A REST-API micro-service that takes orders from hamburger restaurants, can view the status of the order, and enables transactions with customer/restaurant authorization regarding the order.
Postman Documentation
https://documenter.getpostman.com/view/19453056/UVeNm2ho
Customers endpoints
POST /order/<int:res_id>
Content-Type: application/json
{
"product_ids": int,
"quantities": int
}
GET /orderlist
Content-Type: application/json
{
"product_ids": List,
"quantities": List
}
GET /<int:order_id>
Content-Type: application/json
{
'order_id': int
'user_id': int
'product_ids': int
'quantities': int
'order_date': datetime
'order_status': int
}
PUT /<int:order_id>
Content-Type: application/json
{
"quantities": int
}
DELETE /<int:order_id>
Content-Type: application/json
{
"status": status,
"message": message
}
Restaurant endpoints
GET /<int:order_id>
Content-Type: application/json
{
'order_id': int
'res_id': int
'user_id': int
'product_ids': int
'quantities': int
'order_date': datetime
'order_status': int
}
Update /<int:order_id>
Delete /<int:order_id>
Get /orderlist
GET /menu
Content-Type: application/json
{
'order_id': int
'user_id': int
'product_ids': int
'quantities': int
'order_date': datetime
'order_status': int
}
POST /menu
GEtT /menuProducts
GET /menu/<int:product_id>
Content-Type: application/json
{
'order_id': int
'user_id': int
'product_ids': int
'quantities': int
'order_date': datetime
'order_status': int
}
PUT /menu/<int:product_id>
DELETE /menu/<int:product_id>