Skip to content

rpedrodasilva10/clients-api

Repository files navigation

clients-api

The objective with this project is to study and test Spring Boot API's with JPA, Lombok, and Heroku deploys 😎.

Built with

Documentation

Running locally

What you will need

Building and starting the application:

Clone the repo and navigate to the project's folder open the terminal and execute the commands bellow

cp env.example.properties .env # Copy env example as .env

The API's sending e-mail feature depends on configuration, so, to test this scenario, you need to configure mail server information

MAIL_HOST=
MAIL_USER=
MAIL_PASSWORD=
MAIL_PORT=

After that, you're good to go. Run:

mvn clean package # Creates JAR file 
docker-compose up # Spin up all necessary containers

Tasks and Status

Create a client CRUD

  • Create client
  • Update client
  • Delete client
  • List clients
  • Find a specific client
  • Control all operations above with DTO's pattern
  • Use Bean validation to validate data before saving in the DB

Implement Exception handling

  • Create models and classes for exception handling
  • Define exception handling in the service layer

Database

  • Persist the previous task results with PostgreSQL

Virtualization

  • Use Docker
  • Use docker-compose to manage containers spin up/down
  • Use environment files to load the container variables dependencies

Third part libs

Tests

  • Try JUnit
  • Add ClientService tests
  • Add ClientController tests

Mail

  • Send e-mail after creating a client successfully
  • Create a separate service to send email
  • Use some topic/subscription structure to send emails independently
  • Refactor the ClientService to send emails using messages to a topic or queue

Docs

  • Add swagger OpenAPI specification

Made with ❤ by rpsilva

About

API to manage clients and their data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published