Skip to content

A Rest API using Java 11 with Spring Boot, with a Order and Client control endpoints.

Notifications You must be signed in to change notification settings

Vinicius-92/order-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Linkedin Profile

Order control REST API

A full CRUD API for a model/entity Order, OrderItem and Client

A fully functional API that control order with the association with order items and clients. Made using:

  • Java 11
  • Maven
  • JUnit
  • Spring Boot
  • Spring Data Jpa
  • Docker and Docker-compose
  • PostgreSQL
  • Lombok
  • Swagger Documentation

What I've learned:

How to structure a Spring Boot Java application using best practices and SOLID principles, using dependencies from Maven like Lombok to save time and create more readable and easy to maintain code. I also learn got a better understanding of associations (One to Many, Many to One, etc) using annotations. I've also have learned the importance of DTO and Service classes. Update: Returning to the project a few months later I'm now implementing tests and improving the overall architecture.

Swagger Documentation:

You can access after the project is running in the /swagger-ui.html endpoint.

Click here for documentation

How to use:

You can use an API Test application, Postman or Insomnia, to test the endpoints you'll clone the project to your machine and run, you'll need Java 11 and Maven 3.8.1. The commands to clone and to run are the following:

Clone:

git clone https://github.com/Vinicius-92/order-api.git

Create docker database: In order to create and use the database, you'll need Docker and docker compose installed on your machine, if that is the case you can enter the docker directory and run the command bellow.

docker compose up -d

This command will automatically build de image for the postgres database, create the database and add a few resources for you to test the endpoints.

Run: (in the root of project directory)

mvn spring-boot:run

To-do:

  • Added Swagger Documentation-> Done
  • Separate the class repository to delegate the responsibility for the service class -> Done
  • Create a DTO object in order to improve how the responses from endpoints can be more efficient -> Done
  • Create a database to test application's endpoints -> Done
  • Create personalized exceptions -> Done
  • Add a docker and docker compose file to automatically create the database -> Done

About

A Rest API using Java 11 with Spring Boot, with a Order and Client control endpoints.

Topics

Resources

Stars

Watchers

Forks