Car Rental Microservices
Spring Boot services with JWT/OAuth2 (Cognito), role-based access, MariaDB to AWS RDS, and Dockerized local development.
JavaSpring BootJWTOAuth2CognitoRDSDocker
Overview
I built this project to practice production-style backend architecture instead of a single monolith. The system handles core rental workflows and enforces role-based access for customer and admin operations. A major goal was proving I could move a local database setup into AWS RDS while keeping development setup simple for day-to-day work.
Highlights
- Split business capabilities into focused Spring Boot services with clear REST contracts.
- Implemented JWT authentication with Cognito-backed OAuth2 flows for secure access.
- Added role checks to protect admin-only actions such as fleet management and pricing updates.
- Containerized local development so services and dependencies spin up consistently.
Architecture
- API layer routes requests to service-specific handlers with validation at the boundary.
- Each service owns its persistence concerns and communicates through HTTP APIs.
- Auth flow uses Cognito-issued tokens that are verified in backend middleware.
- Application secrets and environment values are externalized for local and cloud parity.
Key Learnings
- Service boundaries are easier to maintain when contracts are defined early.
- Token lifecycle handling is a common source of bugs and needs explicit testing.
- Migration to managed databases is smoother when schema changes are automated.
- Dockerized workflows reduce setup friction and onboarding time.
Outcomes
- Services: 3 domain services plus auth integration
- Deployment target: AWS RDS-backed environment