Mude o idioma:
🚧 WORK IN PROGRESS 🚧
A simplified API for controlling restaurant delivery services.
This project, originally developed by me in Java, was part of a selection process for a Java BackEnd position.
I decided to redo it in Kotlin, slightly changing the stack and adding some functionalities as part of my studies.
- Kotlin
- Spring Boot 3
- Spring (Security, Data, Web)
- Docker
- PostgresSQL
- Gradle
- OpenAPI 3.0 (Swagger)
- Allow user registration and login with JWT token authentication. The methods of the APIs below can only be executed if the user is logged in.
- Allow registration, modification, deletion, and querying of customers.
- Allow registration, modification, deletion, and querying of orders. An order must have a customer, and a customer can have multiple orders.
- Allow registration, modification, deletion, and querying of deliveries. A delivery must be linked to an order.
- When deleting a user, checks are performed. Users and orders can only be deleted if there is no ongoing delivery.
- If a user is deleted, all associated data is deleted.
- If an order is deleted, the delivery is deleted.
- If a delivery is deleted, the order is dissociated from the delivery.
ℹ️ JWT authentication, login and details will be available at application's Swagger-UI endpoint ℹ️
- Ensure you have installed on your machine: Java 19, PostgreSQL.
- In PostgreSQL, create a database for the application.
- Clone this repository to your local environment.
- Configure the database credentials in the application.yml file.
- Run the command
gradle bootRun - (in development) The API will be available at: http://localhost:8080/swagger-ui.html
😎 No need for configuration in project files 😎
- Ensure you have installed and running on your machine: Docker, Java 19.
- Clone this repository to your local environment.
- Run the following commands in the IDE terminal (at the project root):
- Gradle:
gradle build(Generates the artifact) - Docker:
docker build -t delivery-api -f Dockerfile-dev .(Uses the DockerFile-dev to generate the Docker image) - Docker:
docker-compose up(Uses Docker-Compose to configure and run the API and PostgreSQL)
- (in development) The API will be available at: http://localhost:8080/swagger-ui.html
- Better refinement to handle exceptions due to validations, showing more coherent error messages to the front-end.
- Tests for Controllers with mockMvc.
- Creating an architecture for "Items," replacing the item description for inventory control, adding items, removing items, calculating order price.
- Role-based control to allow an admin to register items in the inventory.
- Restructure branch architecture and workflows in GitHub Actions.