A mission-critical, high-performance RESTful API designed for comprehensive restaurant management. Built with cutting-edge Java 25 and Spring Boot 4 technologies, focusing on scalability, security, and developer experience.
- Stateless Authentication: Robust JWT implementation with Refresh Token flow.
- Granular RBAC: Role-Based Access Control (CLIENT, RESTAURANT) managed via Spring Security 7.
- Rate Limiting: Protection against brute-force and abuse using Bucket4j (10 req/min per IP).
- Security Audit: Automated tracking of
createdAt,updatedAt,createdBy, andlastModifiedBy.
- Redis Caching: Intelligent caching for high-demand resources like Dishes, Menus, and Restaurants.
- Soft Delete: Logical deletion implementation using
@SQLDelete, ensuring data recoverability. - Validation: Strict Bean Validation and custom validators (e.g.,
@UniqueEmail) for early failure detection.
- Interactive API Docs: Fully configured Swagger UI with JWT authorization support at
/swagger-ui.html. - Database Versioning: Deterministic schema management powered by Flyway.
- Observability: Production-ready monitoring via Spring Boot Actuator and structured JSON Logging.
| Category | Technology |
|---|---|
| Backend | Java 25, Spring Boot 4.0+, Spring Security 7 |
| Persistencia | Hibernate, Spring Data JPA, PostgreSQL 17 |
| Cache | Redis 7 |
| Migraciones | Flyway |
| Mapeo | MapStruct 1.6+ |
| Utilidades | Lombok, Bucket4j, JJWT |
| Testing | JUnit 5, Testcontainers, Mockito |
- Docker & Docker Compose
- Java 25 (if running locally without Docker)
- Gradle 9
The entire stack (App, DB, Redis) is containerized for professional deployment.
-
Clone the repository:
git clone https://github.com/Kaistendev/RestaurantAPIJAVA.git cd RestaurantAPIJAVA -
Spin up the environment:
docker-compose up --build
-
Access the API:
- Swagger UI: http://localhost:9191/swagger-ui.html
- Health Check: http://localhost:9191/actuator/health
We maintain a high level of parity between development and production. Integration tests use Testcontainers to spin up real instances of PostgreSQL and Redis during the build process.
./gradlew test