A senior-level, highly secure banking REST API built with Java 21, Spring Boot 3.x, and Clean Architecture principles.
- Clean Architecture: Domain-driven approach with strict separation of layers.
- Robust Security:
- Spring Security with JWT (JSON Web Tokens).
- BCrypt for password hashing.
- AES-256 for symmetric encryption of sensitive PII data (e.g., identity documents) at the infrastructure level.
- OWASP Best Practices:
- Global error handling (no stack traces leaked).
- Rate Limiting via Bucket4j (mitigates DDoS and brute force).
- Audit Logging of all incoming requests.
- Infrastructure Ready:
docker-composefor isolated PostgreSQL execution.- Integrated with Testcontainers for automated integration testing.
- Swagger/OpenAPI 3.0 documentation.
- Java 21
- Spring Boot 3.2+
- Spring Security & JWT
- PostgreSQL
- Bucket4j (Rate Limiting)
- Testcontainers & JUnit 5
- MapStruct / Lombok
- Docker & Docker Compose
The project includes a docker-compose.yml to easily spin up the database.
docker-compose up -dYou can run the API locally using Maven wrapper:
./mvnw spring-boot:runNote: For local development, the
application.ymluses fallback default values forJWT_SECRET,CRYPTO_SECRET, andDB_PASSWORD. In a production environment, you must inject these via environment variables.
Once the application is running on port 8080, access the interactive API documentation at: http://localhost:8080/swagger-ui.html
This repository contains safe, dummy fallback keys in its configuration files solely for ease of local testing. Do not use the default fallback JWT_SECRET or CRYPTO_SECRET in a live production environment.