Skip to content

hpavlo/car-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car Service API ⚙️🚗⚙️

DescriptionFeaturesArchitectureTechnologiesHow to start the programUML diagram

📃 Description

Car Service is a web-application created to save car service orders in the database. The program is written in Java with Spring Boot and uses PostgreSQL as a database. The front-end part uses HTML/CSS, TypeScript and the Angular framework. For API testing, you can use Swagger, which is also available in the app.

🚀 Features

In this program, you can store such data as information about drivers, their cars and orders. In addition, used goods and performed service work are stored (detailed information about models can be found on the UML diagram). At the end of the completed order, you can calculate the total price for the work, and if the client refused to use the service, then he will only pay the amount for diagnostics in the amount of UAH 500. Also available is the calculation of wages for craftsmen, which is calculated as 40% of the price of the performed service work.

Here you can see how to create new order using frontend page

Creating new order

Also, by selecting the desired order, you can view its details and change them

Updating order status

The frontend part also has a global error interceptor that opens a standard browser dialog with a description of the problem and the error status code

⚙ Architecture

3-layer architecture
Controller (Presentation layer)
↓↑
Service (Application layer)
↓↑
Repository (Data access layer)

🧑‍💻 Technologies

Technology Version
Backend
JDK 17
Maven 4.0.0
Spring Boot 3.0.1
Swagger 2.9.2
PostgreSQL 15
Liquibase 4.17.2
Lombok 1.8.24
Docker -
Frontend
Angular 15.1.2
npm 9.3.1

📎 How to start the program

To run an application via Docker, you must have the latest version of Docker installed on your local machine!

Run Backend

  1. Clone the project from GitHub
  2. Open terminal in the project folder and run mvn clean package -DskipTests (you must also have Maven installed)
  3. When the project was built successfully, run the following command: docker-compose up
  4. After a successful start, the program can be tested using the link http://localhost:6868/api/swagger-ui.html

Run Frontend

  1. Install npm by the link
  2. Open terminal in folder /frontend and run npm start (if you started the backend part in another way, don't forget to change your port in proxy.conf.json:
{
  "/api/*": {
    "target": "http://localhost:6868",    // Change the port here
    "secure": false,
    "logLevel": "debug",
    "changeOrigin": true
  }
}
  1. When the compilation is completed successfully, open the link in your browser
  2. Enjoy the program 😉

✨ UML models diagram

UML diagram