Corp/.github/copilot-instructions.md

1.8 KiB

GitHub Copilot instructions

EUSRR is a Django 5.2/DRF ASGI backend with a Next.js 16/React 19 frontend. Python 3.13 is the supported container/runtime version. PostgreSQL and Redis are the normal data services; Celery handles background jobs and Django Channels serves one authenticated /ws/ endpoint.

Sources of truth

  • project setup and structure: README.md;
  • HTTP API: docs/guides/API.md and generated /api/schema/;
  • LDAP: docs/guides/LDAP.md;
  • realtime: docs/guides/WEBSOCKET.md and AsyncAPI;
  • notifications: docs/guides/NOTIFICATIONS.md;
  • frontend conventions: docs/guides/frontend/README.md.

Prefer current code and generated schemas when a document disagrees with the implementation.

Development conventions

  • Run backend commands from backend in a Python 3.13 virtual environment.
  • Use pytest for backend tests and npm test, npm run lint, npm run build for frontend verification.
  • Add REST operations under /api/v1/; there is no /api/v2/.
  • Use frontend/src/lib/api/ instead of component-local fetch wrappers.
  • Use the shared /ws/ protocol instead of adding chat- or notification-specific sockets.
  • Create notifications with notifications.signals.notify.send, not the deprecated NotificationService.
  • Keep secrets and organization-specific configuration in environment variables.

Documentation

Update an existing guide or module README whenever possible. Do not create session reports, completion summaries, migration diaries or standalone TODO Markdown files. A maintained guide describes a stable contract or operational procedure and must link to current files.

Place cross-project guides in docs/guides/ and module-specific instructions in the module README. Update indexes and run the local-link check after moving or removing documentation.