CarGo
Production-style Spring Boot backend for car-rental service with clean architecture and OpenAPI docs.
Tech Stack
Key Highlights
Clean Controller → Service → Repository architecture
MapStruct mappers with Input/Output DTOs
Reservation conflict detection algorithm
Versioned REST endpoints with pagination
OpenAPI/Swagger documentation with examples
Bean Validation with centralized error handling
Project Details
I built a production-style Spring Boot backend for a car-rental service with clean DTO layers, MapStruct mappings, and OpenAPI/Swagger docs—covering cars, customers, reservations, and pricing.
**Domain model & CRUD:** Car, Customer, Reservation, Payment entities with Controller → Service → Repository layering and JPA/Hibernate.
**DTO & mapping:** Input/Output DTOs, MapStruct mappers, and Bean Validation (constraints, global exception handling, error payloads).
**Availability logic:** Reservation overlap checks (date-range conflict detection) and simple price computation (daily rate × days, optional fees).
**API design:** Versioned REST endpoints (/api/v1/...), pagination/sort with Pageable, consistent response envelopes.
**Docs & tooling:** Swagger UI / OpenAPI 3 with example payloads; profiles for dev/test; SQL migrations via Flyway (optional).
My contributions:
• Designed the schema & repositories, wrote reservation conflict-check algorithm, and encapsulated pricing rules.
• Implemented DTO layer + MapStruct mappers; added validation (size, pattern, date range) and centralized error handling.
• Authored OpenAPI annotations and request/response examples; enabled pagination/sorting across list endpoints.