The application exposes backend API for a prototype of car repair shop, which was a theme of the project from university course.
Nowadays, we can often experience as a customer lacks of visibility in completed tasks in case of our cars in local mechanics. The vision of this project focuses on preparation a work supportive prototype for these car repair shops within indroduced issue.
- Customer registration (anonymous)
- Logging (customer, employee, head)
- Creating customer accounts (employee, head)
- Creating employee accounts (head)
- View all users (employee, head)
- Reset user password (employee, head)
- Change user self-password (customer, employee, head)
- Creating tickets - acceptance protocol of given car including estimated repair price, notes, customer story, brand, model etc. (employee, head)
- Editing tickets - status, final price, calculation note etc. (employee, head)
- View of a specific ticket (customer, employee, head)
- View of customer tickets - actual and historic (customer, employee, head)
- View of all tickets - actual and historic (employee, head)
- Search console for tickets - by brand, model, email, firstname etc. (employee, head)
The concept of packaging and class access modifiers in project comes from Hexagonal Architecture. The reason of this approach was to experiment with new layered architecture style, besides well-known controller -> facade -> service -> repository layer.
- Gradle 6.7.1
- OpenJDK 15 HotSpot
- Spring Boot 2.4.0 (web, security, data JPA)
- Lombok 1.18.12
- MapStruct 1.3.1.Final
- H2 Database 1.4.200
- Flyway 7.4.0
- SpringDoc OpenAPI 1.5.2
- Groovy 2.5.14 (tests)
- Spock Framework 1.3-groovy-2.5 (tests)
You can check current API documentation under following URL.
http://localhost:8081/swagger-ui.html
You can connect to H2 database in runtime mode under following URL.
http://localhost:8081/h2-console
- Credentials are in
application.yml
- In case JDBC URL provide absolute file path e.g.
jdbc:h2:/etc/car-repair-shop-api/db/memory
This service is based on Spring Boot and Gradle so after cloning repository we can simply run command.
./gradlew bootRun
If you want to see test scenarios run below command
./gradlew clean build
Firstly make sure that application jar
is created.
./gradlew clean build
now you can build docker image
docker build --build-arg JAR_FILE='build/libs/car-repair-shop-api-*-SNAPSHOT.jar' -t car-repair-shop-api:snapshot .
and now you can run it
docker run -p 8081:8081 --name car-repair-shop-api car-repair-shop-api:snapshot -jar service.jar