This repository is split into two clear applications:
frontend/ React + Vite HR portal
backend/ Spring Boot API for PostgreSQL/Supabase
The frontend calls the Spring Boot backend through the existing /api/* contract.
cd frontend
npm install
npm run devTo point the frontend at a local backend:
cd frontend
VITE_API_BASE_URL=http://127.0.0.1:8080 npm run devSee frontend/README.md.
The backend uses Spring Boot, Flyway, and PostgreSQL/Supabase. Local database secrets belong in ignored file backend/.env.local; commit only backend/.env.example.
cd backend
set -a
source .env.local
set +a
./mvnw spring-boot:runSee backend/README.md.
Run the backend unit/controller tests:
cd backend
./mvnw test15 integration tests are skipped unless TEST_DB_URL, TEST_DB_USERNAME, and TEST_DB_PASSWORD point at a real Postgres. ./mvnw test passes without them but only runs the Mockito unit tests; set them to also exercise the Flyway/repository integration suite (AbstractPostgresIntegrationTest).
Build the backend package:
cd backend
./mvnw -DskipTests packageBuild the frontend:
cd frontend
npm run buildRun the frontend lint and test scripts:
cd frontend
npm run lint
npm testnpm test runs the Vitest suite.
This repo includes a root-level vercel.json for Vercel projects whose Root Directory is the repository root. It installs and builds frontend/, publishes frontend/dist, proxies /api/* to the Render backend, and serves index.html for React SPA routes.
If the Vercel project Root Directory is set to frontend, the matching frontend/vercel.json can be used instead.
For production/on-prem, run the backend with SPRING_PROFILES_ACTIVE=prod, the target PostgreSQL datasource, and an absolute persistent APP_UPLOADS_DIR path (local disk, SAN/NAS mount, or other backed-up on-prem storage). The demo profile is only for seeded showcase data and must not be enabled against a real production database. Authentication uses employee email from hr.employee; initial passwords should be issued through the HR reset-password flow, not seeded from employee codes.