This repository contains the source code for the ByteMeBurger API, part of the FIAP Tech Challenge. The API is designed to manage a burger restaurant's operations, including order placement, customer registration, and product management. The recent updates introduce a new endpoint for customer registration and enhance various aspects of the application, such as error handling, data models, and service configurations.
Endpoints are protected since JWT token is now required. Since this application will run on EKS Cluster inside a private VPC, Customers endpoint will be deprecated or splited into a different service. Customers information can be extracted from token, since it's generated and validated internally.
Clone the repository:
git clone https://github.com/soat-fiap/FIAP.TechChallenge.ByteMeBurger.git
cd FIAP.TechChallenge.ByteMeBurger
Configure environment variables
.env
fileStart the services using Docker:
docker-compose up -d
Service health (check if the service is healthy before testing)
To verify the existing endpoints, go to
If you want to quickly seed the database with fake data and test some of the endpoints use the FIAP_TechChallenge_ByteMeBurger-endpoints.http file
Logs should (not guaranteed) be available here http://localhost:8081
Stop the services using Docker:
docker-compose down
Run deploy.ps1 script to deploy the application to minikube
Use tunnel and port-forward to access the application
kubectl port-forward service/svc-seq 30008:80
minikube tunnel
whcli forward --token=f513d4a6-4dbd-4e32-93f5-b35376f33c89 --target=http://localhost/api/notifications/mercadopago
You can use the postman collection for testing
To test mercado pago integration don't forget to add your credentials to the secret-mercadopago file and the notification url on configmap-api
Once you are done, you can stop the services running rollback.ps1 script
Since the application is running inside a private subnet and tokens are generated internally by API Gateway information on the token use used for some use cases where user information is required like Creating a new Order.
GET /api/products
Admin
roleDELETE /api/products/{id}
Admin
roleGET /api/customers
Admin
rolePOST /api/customers
Customer/Admin
rolePOST /api/payments
Admin
rolePOST /api/orders
Customer/Admin
roleGET /api/orders/{id}
Admin/Kitchen
rolePOST /api/notifications