The main goal of this project is calculate cost of calls using a plan of Q.UININO TELEFONIA and without a plan. To do that, the system has 3 entities, call, plan and tariffs. The entity call is the only that not persist data in the database, because the goal is give to their clientes only a easy way to make the calc, however Q.UININO TELEFONIA is abble to insert, update and delete plans and tariffs.
Link to see the project working with a frontend https://quinino.netlify.app/
- Origin; (DDD of Origin Call)
- Destiny; (DDD of Destiny Call)
- Time; (Time of call duration)
- Plan; (Which plan do you have)
- Cost with plan; (Variable to calc cost with plan)
- Cost without plan (Variable to calc cost without plan)
- Id; (Identification in database)
- Name; (Name of plan)
- Free Minutes; (Amount of free minutes by plan)
- Additional Tariff; (Price of additional minutes)
- Id;
- Origin; (DDD of Origin Call)
- Destiny; (DDD of Destiny Call)
- pricePerMinute; (Cost of call)
- GET calculateCallCost; (Make the cost calc of calls with and without a plan)
- POST - insertPlan; (Insert new plans)
- POST - insertTariff; (Insert new tariffs)
- PUT - updataPlan; (Update any data about a plan)
- PUT - updateTariff; (Update any data about a tariff)
- DETELE - deletePlanById; (Delete a plan by his ID)
- DELETE - deleteTariffById; (Delete a tariff by his ID)
Swagger is available in this backend, to make easy understand and test all methods.
The API has 3 enviroments, test with H2 database in memory, dev to local tests with PostgreSQL and prod to used in production;
The API has tests for all of the 3 services, testing all of the methods available;
- Java 17;
- Spring Boot 3;
- Spring Boot Starter Validation;
- Spring Data Jpa;
- H2;
- POSTGRESQL;
- Relational Object Mapping;
- SWAGGER;
- JUNIT5;
- MOCKITO;
The API has a DTO layer to avoid that our insed estructure be expose to user interface;
Prerequisites: Java 17
# clone repository
git clone https://github.com/luizjhonata/quinino-glcortex.git
# enter in the quinino-glcortex project folder
cd quinino-glcortex
# if you will try to use the frontend too, you need to go into the CallController and comment the line 20 @CrosOrigin annotation and uncomment the line 21;
# run the project
./mvnw spring-boot:run
Jhonata de Souza Luiz