React + TypeScript application for the onemployment platform.
- React 19, Vite 7, TypeScript 5
- Material-UI (MUI) for component library and theming
- Redux Toolkit, React Router
- Vitest for unit tests
- ESLint (typescript-eslint) + Prettier
- Node.js 20
- Install dependencies:
npm ci - Environment variables:
VITE_API_URL— Backend API base URL (not the Vite dev server). In development, if omitted, the app falls back tohttp://localhost:3000persrc/config.ts.
Example .env.development (API on port 3000):
VITE_API_URL=http://localhost:3000
Example .env.production:
VITE_API_URL=https://api.onemployment.org
Note: The frontend dev server runs on http://localhost:5173 (see vite.config.ts). Do not set VITE_API_URL to the Vite URL; it must point to the backend API.
npm run dev— Start dev server (HMR) onhttp://localhost:5173npm run build— Type-check and build todist/npm run preview— Preview the production buildnpm run test— Run unit tests (Vitest)npm run test:watch— Watch mode for testsnpm run lint— Lint source filesnpm run format:check/npm run format— Prettier check/fix
- GitHub Actions on push to
main - CI: install → lint → format check → build → unit tests
- CD: build → deploy to AWS S3 (
www.onemployment.org) → CloudFront invalidation of/index.html - Auth via GitHub OIDC (no long‑lived AWS keys)