docs: consolidate repository guides and preserve audit history

This commit is contained in:
cesnimda
2026-09-11 14:22:41 +02:00
parent 115441a409
commit 682a3028bb
404 changed files with 3402 additions and 2621 deletions
+6 -50
View File
@@ -1,64 +1,20 @@
# Job Tracker frontend
The frontend is a statically exported Next.js 16 application using React 19, TypeScript, Material UI, and React Router. Next.js supplies the build shell; authenticated and public application routes are defined in `src/App.tsx`.
This directory contains the statically exported Next.js 16 / React 19 / TypeScript frontend. Next supplies the build shell; React Router and `src/App.tsx` define the application routes.
## Requirements
- Node.js 24 (the version used by CI)
- npm 11 or a compatible npm release
- The Job Tracker API at `http://localhost:5202` for normal local use
Install the lockfile exactly:
## Development and checks
```powershell
npm ci
```
## Development
Start the application on Next.js's default development port:
```powershell
npm run dev
```
Open `http://localhost:3000`. The client calls `http://localhost:5202/api` on localhost unless `NEXT_PUBLIC_API_BASE_URL` overrides it.
The Playwright harness uses port `3300` and starts its own isolated API and SQLite database. Do not point it at a development or production database.
## Quality gates
```powershell
npm run lint
npm test -- --runInBand
npm run typecheck
npm run build
```
The production build is written to `out/` and is served by nginx in the frontend container.
Open `http://localhost:3000`; local API calls use `http://localhost:5202/api`. Install Chromium once and run `npm run test:e2e` for the isolated browser suite.
Run the browser suite after installing Chromium once:
`NEXT_PUBLIC_API_BASE_URL` is the only browser-visible API setting. Leave it empty in production so nginx proxies same-origin `/api` requests. It is embedded at build time and must never contain secrets.
```powershell
npx playwright install chromium
npm run test:e2e
```
The browser suite covers login, job creation, Career Workspace routing, and public CV/PDF access against isolated services.
## Useful paths
- `app/` — thin Next.js application shell
- `src/App.tsx` — application routes and shared authenticated shell
- `src/api.ts` — API client and local/default base URL
- `src/components/` — feature and shared UI components
- `src/i18n/` — English and Norwegian Bokmål UI messages
- `src/theme.ts` — application theme
- `e2e/` — Playwright browser tests
- `next.config.js` — static-export configuration
- `playwright.config.ts` — isolated browser-test services
## Runtime configuration
`NEXT_PUBLIC_API_BASE_URL` is the only browser-visible API setting. Leave it unset in the production container so nginx proxies same-origin `/api` requests. Values prefixed with `NEXT_PUBLIC_` are embedded at build time and must never contain secrets.
See the repository `README.md` for full-stack development and `deploy/README.md` for production requirements.
See the repository [frontend guide](../docs/frontend/README.md) and [configuration reference](../docs/configuration/environment-variables.md).