Monorepo combining a Spring Boot 3 backend and an Angular 21 frontend for a full-stack authentication study project.
saquei/
├── backend/ # Spring Boot 3.4.4, Java 21, REST API + JWT Auth
├── frontend/ # Angular 19, PrimeNG 19, Tailwind CSS
├── docker-compose.yml
└── .gitignore
Canonical source: AGENTS.md.
- Write all code identifiers in English (
class,interface,type,enum, variables, methods, functions, constants, files, and folders). - Use clear and descriptive names in
PascalCasefor classes and types. - Write all source code comments in English.
- Comments should explain intent, constraints, or non-obvious decisions; avoid obvious comments.
- Keep language consistent across backend and frontend code.
- Docker (for infrastructure)
- Java 21 + Maven (for backend)
- Node.js 20+ + Angular CLI 19 (for frontend)
docker compose up -dThis starts:
- PostgreSQL 16 on
localhost:5432(user/pass:postgres/postgres) - Redis Stack on
localhost:6379
Stop with:
docker compose downcd backend
./mvnw spring-boot:runAPI available at: http://localhost:8081
cd backend
./mvnw testTests use H2 in-memory database (profile test is auto-activated via src/test/resources/application-test.properties).
| Property | Value |
|---|---|
| Port | 8081 |
| Database | PostgreSQL localhost:5432/postgres |
| Redis | localhost:6379 |
| JWT secret | api.security.token.secret in application.properties |
cd frontend
npm installcd frontend
npm startApp available at: http://localhost:4200
cd frontend
npm run buildcd frontend
npm testcd frontend
npm run formatBrowser (Angular 19 :4200)
│ HTTP/JWT
▼
Spring Boot (:8081)
├── /auth/login → JWT token
├── /auth/register → User registration
└── /translation → i18n endpoint
│
├── PostgreSQL (:5432) → User persistence
└── Redis (:6379) → Session/token management
The Angular frontend stores the JWT token in sessionStorage and sends it via the Authorization header on protected routes, guarded by AuthGuard.
CORS is configured on the backend to allow http://localhost:4200.
| Layer | Technology |
|---|---|
| Backend | Spring Boot 3.4.4, Java 21, Spring Security, JWT (Auth0 v4) |
| Persistence | Spring Data JPA, PostgreSQL (prod), H2 (test) |
| Cache/Session | Spring Data Redis |
| Frontend | Angular 21, PrimeNG 21, Tailwind CSS 3, Chart.js |
| Build | Maven (backend), Angular CLI / npm (frontend) |
| Infrastructure | Docker Compose |