Frontend application built with Next.js, React, and TypeScript.
- Node.js 22.22.1+
- npm 10+
-
Install dependencies:
npm ci
-
Create
.env.localbased on.env.example. -
Update required env vars in
.env.local. -
Start development server:
npm run dev
Local development:
NEXT_PUBLIC_API_URL— backend origin (for examplehttp://localhost:8081).
Vercel production:
API_PROXY_TARGET— Azure backend origin used by same-origin/apirewrites;API_PROXY_SECRET— server-only proxy header secret, equal to backendReverseProxy__RequiredHeaderSecret;NEXT_PUBLIC_REALTIME_URL— Azure backend origin used only for the authenticated SignalR connection;- leave
NEXT_PUBLIC_API_URLempty so cookies remain first-party through/api. - keep
LEGAL_DOCUMENTS_STATUS=draftuntil Polish legal review and operator verification; - set
LEGAL_OPERATOR_NAME,LEGAL_OPERATOR_ADDRESS,LEGAL_OPERATOR_REGISTER,LEGAL_OPERATOR_NIPandLEGAL_CONTACT_EMAIL; - switch
LEGAL_DOCUMENTS_STATUS=publishedonly after every value is verified. A published build fails fast when any required operator field is missing.
npm run dev- run local dev server.npm run build- build production app.npm run start- run production server.npm run lint- run ESLint.npm run lint:fix- auto-fix lint issues where possible.npm run typecheck- run TypeScript checks.npm run format- format files with Prettier.npm run format:check- validate formatting without changes.npm run check- run lint, typecheck, and format:check.npm run commit- create conventional commit message via Commitizen.
- Commit message hook validates conventional commits via commitlint.
- CI validates
lint,typecheck, andbuildon pushes and pull requests.
- Create or update
.env.localfrom.env.example. - Run
npm run devduring development. - Before pushing, run
npm run check. - Use
npm run committo keep commit messages consistent.