Игорь Надеин 4ff1657f3b
All checks were successful
Deploy production / deploy (push) Successful in 11m40s
Keep pinned boards above sorted lists
2026-11-06 14:50:53 +03:00
..
2026-11-06 14:50:53 +03:00

EUSRR frontend

Next.js 16 application for the EUSRR API. The app uses React 19, TypeScript, Tailwind CSS and domain clients from src/lib/api/.

Development

cp .env.example .env.local
npm install
npm run dev

The development server listens on http://localhost:3000. Set NEXT_PUBLIC_BACKEND_URL to the Django backend origin, normally http://localhost:8000. Browser requests to /api/* pass through the Next.js proxy in src/app/api/[...path]/route.ts.

NEXT_PUBLIC_WS_URL, when set, must be the complete endpoint including /ws/. The shared websocketManager normally derives the endpoint from NEXT_PUBLIC_BACKEND_URL and adds the access token.

Structure

  • src/app/ — App Router pages and API proxy;
  • src/components/ — domain and shared UI components;
  • src/lib/api/ — the only supported HTTP transport and domain clients;
  • src/contexts/ — authenticated user, notifications and calendar state;
  • src/hooks/ — reusable UI and domain lifecycle;
  • src/types/ — shared API types.

Use apiClient from @/lib/api; do not create component-local fetch wrappers. Use the shared WebSocket manager unless an isolated lifecycle is explicitly required.

Verification

npm test
npm run lint
npm run build

The Node test runner collects src/**/*.test.js. ESLint and a production build are separate required checks.

See the frontend documentation, HTTP API and WebSocket guide.