Vehicles live in a small registry: create, list, re-VIN and delete them over REST, with seed data loaded from JSON at startup. Ask for a vehicle's VIN and the API calls the vindecoder.eu VIN Decoder API by Vincario - for the data points it holds, or for the full decode: make, model, model year, body, engine, dimensions and about 50 more fields.
Every provider call is signed: the URL carries the API key and a control sum - the first ten characters of a SHA-1 over the VIN, the operation and both keys - so the secret key never appears in a URL. MapStruct maps the provider's payload onto clean DTOs, including how many API credits the account has left.
Highlights
- Seven REST endpoints over a generic CrudRepository, backed by a thread-safe in-memory store with UUID ids.
- Seed vehicles loaded from JSON once the application is ready.
- SHA-1 control sums sign every VIN request; the API key rides in the path, the secret never does.
- A dedicated RestTemplate for the provider, with 3-second connect and read timeouts.
- MapStruct mappers with constructor injection, Lombok DTOs and a @Json meta-annotation for lenient, null-free JSON.
- Swagger UI and OpenAPI docs, with the code checked in SonarQube.
At a glance
- Role
- Creator & sole developer
- Years
- 2020
- Source
- github.com/afmoleirinho96/car-tracker
- REST endpoints
- 7
- vehicle fields per decode
- ~50
- signed provider calls
- SHA-1
Stack
- Java 8
- Spring Boot
- Spring Web
- MapStruct
- Lombok
- Swagger
- Gradle
- vindecoder.eu API
- SonarQube
Built with Java.