-
Notifications
You must be signed in to change notification settings - Fork 4
Getting Started
This page explains how to set up the Vitruv-UI-Methodologist for local development. You will need both the frontend and the backend running. The backend requires PostgreSQL and Keycloak, which are started via Docker Compose.
| Tool | Minimum version | Notes |
|---|---|---|
| Node.js | 18 | LTS recommended |
| npm | 9 | Comes with Node |
| Docker Desktop | any recent | For PostgreSQL + Keycloak |
| Git | any | — |
| Java 17 | 17 | For the backend only |
| Maven | 3.9 | For the backend only |
The backend repository contains a docker-compose.yml that starts PostgreSQL and Keycloak. From inside the methodologistUI-backend directory:
docker compose up -dThis starts:
-
PostgreSQL on port
3454 -
Keycloak on port
7668
Wait until both containers report healthy before continuing.
Windows note: Use PowerShell. If
docker composeis not recognized, make sure Docker Desktop is running and thedockerCLI is on your PATH.
Still inside methodologistUI-backend, build and run the Spring Boot application:
mvn spring-boot:runThe backend starts on http://localhost:9811.
You can verify it is running by opening the Swagger UI:
http://localhost:9811/swagger-ui.html
Flyway will automatically apply any pending database migrations on startup.
git clone <frontend-repo-url>
cd Vitruv-UI-Methodologistnpm installcp .env.example .env.localThe default .env.local points to the local backend — no changes needed unless your backend runs on a different port:
REACT_APP_API_BASE_URL=http://localhost:9811
REACT_APP_ENV=localnpm startThe development server starts on http://localhost:3000 and opens the app in your default browser automatically.
Hot-reload is enabled — saving a file in src/ will instantly update the running app without a full page refresh.
- Open
http://localhost:3000 - Click Sign Up and fill in your details
- Check your email for the OTP verification code (valid for 5 minutes)
- Enter the code on the verification screen
- You are redirected to the Home screen
If you are a KIT member, you can use the KIT Login button on the sign-in screen to authenticate via Keycloak SSO instead.
| Command | What it does |
|---|---|
npm start |
Dev server with hot-reload (uses .env.local) |
npm test |
Runs the Jest / React Testing Library test suite |
npm run build |
Production build (generic) |
npm run build:staging |
Production build targeting the staging backend |
npm run build:production |
Production build targeting the production backend |
| File | Used by | Backend URL |
|---|---|---|
.env.local |
npm start |
http://localhost:9811 |
.env.staging |
npm run build:staging |
BW-Cloud staging instance |
.env.production |
npm run build:production |
Production instance |
Only .env.example is committed to the repository. The actual .env.local, .env.staging, and .env.production files are gitignored and must be created locally or provided by the team.
The built frontend is served by nginx. The docker/nginx.conf in the repository configures nginx to:
- serve the React SPA from
/usr/share/nginx/htmlon port8082 - proxy
/api/requests to the Spring Boot backend container (backend:8080) - proxy
/realms/requests to the Keycloak container (keycloak:8081)
To build and deploy to staging:
npm run build:staging
# Then copy the build/ output into the nginx container's html directoryREACT_APP_API_BASE_URL is not defined
You are missing .env.local. Run cp .env.example .env.local and restart the dev server.
Login fails with "Network error" or CORS error
The backend is not running or not reachable. Check that http://localhost:9811/swagger-ui.html is accessible.
OTP email is not arriving
Check that the backend's mail configuration (SMTP settings in application.properties) is set up correctly. In some local setups a mailhog or similar local SMTP server is used — ask your team lead for the current configuration.
Docker containers not starting
Make sure Docker Desktop is running. Check for port conflicts: PostgreSQL needs 3454 and Keycloak needs 7668 to be free.
Keycloak SSO (KIT Login) not working locally The KIT SSO redirect requires the callback URL to be registered in Keycloak. For local development, use username/password sign-in instead.