Build Frontend
Overview
The frontend depends on the backend API contract. Therefore the correct order is:
- Build/start backend
- Update OpenAPI spec in frontend
- Generate frontend API client (
gen:api) - Build or start frontend
Prerequisites
- Java 21 (for backend build)
- Node.js 20+ and npm
- Repository cloned locally
1. Build or Start Backend First
From repository root:
1 2 | |
For local development you can run the backend directly:
1 2 | |
By configuration, OpenAPI files are written to:
backend/target/openapi/openapi.yamlbackend/target/openapi/openapi.json
2. Update Frontend OpenAPI Contract
From repository root, copy backend schema into frontend:
1 | |
Alternative (if backend is running):
1 | |
3. Generate Typed API Client
1 2 | |
This regenerates frontend/jenga/src/api.
4. Build Frontend
1 | |
Build output is written to frontend/jenga/dist.
5. Run Frontend in Development
1 | |
Default dev server:
- Frontend:
http://localhost:7000 - API proxy (
/api) ->http://localhost:8080
Notes
- If backend endpoints or DTOs change, repeat steps 2-4.
- Do not manually edit generated files in
frontend/jenga/src/api.