Spring Boot backend for the Fast Eat mobile clients.
Companion repositories:
This repository is currently a single-module Spring Boot application (not a multi-module Maven build).
| Category | Current implementation |
|---|---|
| Framework | Spring Boot 4.0.3 |
| Language | Java 17 |
| Build tool | Maven Wrapper (mvnw, mvnw.cmd) |
| API | Spring Web MVC |
| Data | Spring Data JPA + PostgreSQL |
| Security | Spring Security + JWT (io.jsonwebtoken) |
| API docs | SpringDoc OpenAPI (/v3/api-docs, Swagger UI) |
| Testing | JUnit 5 + Spring Boot Test + H2 test profile |
| Quality gates | Spotless, Checkstyle, SpotBugs, JaCoCo (wired to verify) |
| Container runtime | Dockerfile + docker-compose.yml baseline |
fast-eat-backend-springboot/
├── src/
│ ├── main/java/com/gerolori/fasteat/
│ ├── main/resources/application*.properties
│ └── test/java/com/gerolori/fasteat/
├── .github/workflows/ci-baseline.yml
├── docker-compose.yml
├── Dockerfile
├── pom.xml
├── mvnw
├── mvnw.cmd
├── DEVELOPMENT.md
└── README.md
This project applies patterns and technologies from my thesis project, a Human Resources Management system built with Spring Boot for enterprise HR workflows.
| Pattern | Thesis | This Project (Fast Eat) |
|---|---|---|
| Architecture Style | Multi-module Maven monolith | Multi-module Maven monolith |
| Layer Organization | trigger/handler/repository | trigger/handler/repository |
| Domain Design | Contact, Employee, Application | User, Menu, Order |
| Security | Custom @Admin, @HR annotations | Custom @Customer, @Admin |
| Event Processing | ApplicationEventPublisher | ApplicationEventPublisher |
| DTO Pattern | Java Records (nested) | Java Records (nested) |
| Error Handling | @ControllerAdvice centralized | @ControllerAdvice centralized |
| Async Operations | @Scheduled cron tasks | @Scheduled status updates |
| Docker Strategy | Multi-stage builds | Multi-stage builds |
| Configuration Management | Profile-based (local/docker) | Profile-based (local/docker) |
- Spring Boot 3.2+ with Java 17 (LTS)
- Spring Data JPA with PostgreSQL (relational data modeling)
- Spring Security with JWT authentication
- SpringDoc OpenAPI for automatic API documentation
- Docker containerization with health checks
- JUnit 5 + Mockito for testing
- Java 17
- Docker + Docker Compose plugin (
docker compose) for containerized startup - Git
- Ensure PostgreSQL is available (defaults in
application-local.propertiestargetlocalhost:5432/fasteat). - Run:
./mvnw.cmd spring-boot:runDefault local profile is local (spring.profiles.default).
docker compose up --buildThis baseline compose stack includes:
backend(built from localDockerfile)postgres(postgres:15-alpine)
- API base:
http://localhost:8080 - OpenAPI JSON:
http://localhost:8080/v3/api-docs - Swagger UI:
http://localhost:8080/swagger-ui/index.html
/auth/users/menus/orders/restaurants/admin/*
There is currently no global /api/v1 context path configured.
local(default):application-local.propertiesdocker:application-docker.propertiestest:application-test.properties
The active configuration uses the FASTEAT_* contract, for example:
FASTEAT_DB_URLFASTEAT_DB_USERNAMEFASTEAT_DB_PASSWORDFASTEAT_JPA_DDL_AUTOFASTEAT_JWT_SECRETFASTEAT_JWT_EXPIRATION_MSFASTEAT_JWT_ISSUER
See src/main/resources/application*.properties for profile-specific defaults.
Workflow: .github/workflows/ci-baseline.yml
- Runner:
windows-latest - Java: Temurin 17
- CI command:
./mvnw.cmd verify
./mvnw.cmd test
./mvnw.cmd verify
./mvnw.cmd jacoco:reportverify is the main quality gate and includes:
- unit + integration test phases (Surefire + Failsafe)
- Spotless check
- Checkstyle check
- SpotBugs check
- JaCoCo report + minimum coverage rule
- Docker image build uses a multi-stage Dockerfile (
maven:3.9.11-eclipse-temurin-17->eclipse-temurin:17-jre-jammy). - Container profile is set to
docker. - Compose file currently targets backend + PostgreSQL only.
- Redis is noted as a future upgrade path in
docker-compose.ymlcomments and is not part of the running baseline.
The following are roadmap items, not current baseline guarantees:
- multi-module split/extraction
- expanded CI matrix beyond the baseline verify job
- additional container services (for example Redis) once finalized
This project is for educational and portfolio purposes (University of Milan, Mobile Computing course).
