A full-stack enterprise application built with React (frontend) and Jakarta EE / Quarkus (backend), featuring a DDD-aligned persistence strategy.
react-java-monorepo/
├── frontend/ # React + TypeScript + Vite single-page application
├── backend/ # Jakarta EE application (Quarkus runtime)
│ └── src/main/java/com/ibanfr/auth/
│ ├── domain/ # Aggregate roots & repository interfaces (ports)
│ ├── application/ # Use-case services
│ └── infrastructure/
│ └── adapters/
│ ├── in/rest/ # JAX-RS inbound adapter (primary)
│ └── out/jpa/ # Panache outbound adapter (secondary)
└── docker-compose.yml # Orchestrates both services for local development
Persistence follows the Repository pattern from Domain-Driven Design:
| Layer | Artefact | Responsibility |
|---|---|---|
| Domain | User |
Aggregate root; pure JPA entity |
| Domain | UserRepository (interface) |
Port — defines what the domain needs |
| Infrastructure | JpaUserRepository |
Outbound adapter — Hibernate / Panache implementation |
Development database: H2 in-memory (zero-config, spun up on startup).
Production database: swap quarkus.datasource.* properties to point at PostgreSQL — no code changes required.
| Tool | Version (minimum) | Install guide |
|---|---|---|
| Java | 25 | https://adoptium.net/ |
| Maven | 3.9 | https://maven.apache.org/install.html |
| Node.js | 22 | https://nodejs.org/ |
| npm | 10 | bundled with Node.js |
| Docker | 24 (optional) | https://docs.docker.com/engine/install/ |
cd backend
mvn quarkus:devThe API is available at http://localhost:8080.
Swagger UI is at http://localhost:8080/swagger-ui.
Open a second terminal:
cd frontend
npm install
npm run devThe app is available at http://localhost:5173.
Requires the backend JAR to be built first:
cd backend && mvn package -DskipTests
docker compose up- Frontend: http://localhost:5173
- Backend: http://localhost:8080
cd backend
mvn testcd frontend
npm test| Method | Path | Description |
|---|---|---|
| POST | /api/auth/login |
Authenticate a user |
POST /api/auth/login request body:
{ "username": "admin", "password": "secret" }200 OK response:
{ "message": "Login successful" }401 Unauthorized response:
{ "message": "Invalid username or password" }| Path | Purpose |
|---|---|
src/main.tsx |
Application entry point |
src/App.tsx |
Root component |
src/pages/LoginPage.tsx |
Login page component |
src/pages/LoginPage.css |
Login page styles |
| Path | Purpose |
|---|---|
domain/User.java |
User aggregate root (JPA entity) |
domain/UserRepository.java |
Repository port (interface) |
infrastructure/adapters/out/jpa/JpaUserRepository.java |
Panache JPA outbound adapter |
application/AuthService.java |
Login use-case orchestration |
infrastructure/adapters/in/rest/AuthResource.java |
JAX-RS inbound adapter |
infrastructure/adapters/in/rest/LoginRequest.java |
REST request DTO |
resources/application.properties |
Quarkus configuration |
resources/import.sql |
Development seed data |