3.0 KiB
3.0 KiB
Copilot Instructions for Vontor CZ
Overview
This monorepo contains a Django backend and a Vite/React frontend, orchestrated via Docker Compose. The project is designed for a Czech e-marketplace, with custom payment integrations and real-time features.
Architecture
- backend/: Django project (
vontor_cz), customaccountapp, and third-party payment integrations (thirdparty/).- Uses Django REST Framework, Channels (ASGI), Celery, and S3/static/media via
django-storages. - Custom user model:
account.CustomUser. - API docs: DRF Spectacular (
/api/schema/).
- Uses Django REST Framework, Channels (ASGI), Celery, and S3/static/media via
- frontend/: Vite + React + TypeScript app.
- Organized by
src/api/,components/,features/,layouts/,pages/,routes/. - Uses React Router layouts and nested routes (see
src/layouts/,src/routes/).
- Organized by
- docker-compose.yml: Orchestrates backend, frontend, Redis, and Postgres for local/dev.
Developer Workflows
- Backend
- Local dev:
python manage.py runserver(or use Docker Compose) - Migrations:
python manage.py makemigrations && python manage.py migrate - Celery:
celery -A vontor_cz worker -l info - Channels: Daphne/ASGI (see Docker Compose command)
- Env config:
.envfiles inbackend/(see.gitignorefor secrets)
- Local dev:
- Frontend
- Install:
npm install - Dev server:
npm run dev - Build:
npm run build - Preview:
npm run preview - Static assets:
src/assets/(import in JS/CSS),public/(referenced in HTML)
- Install:
Conventions & Patterns
- Backend
- Use environment variables for secrets and config (see
settings.py). - Static/media files: S3 in production, local in dev (see
settings.py). - API versioning and docs: DRF Spectacular config in
settings.py. - Custom permissions, filters, and serializers in each app.
- Use environment variables for secrets and config (see
- Frontend
- Use React Router layouts for shared UI (see
src/layouts/,LAYOUTS.md). - API calls and JWT handling in
src/api/. - Route definitions and guards in
src/routes/(ROUTES.md). - Use TypeScript strict mode (see
tsconfig.*.json). - Linting: ESLint config in
eslint.config.js.
- Use React Router layouts for shared UI (see
Integration Points
- Payments:
thirdparty/contains custom integrations for Stripe, GoPay, Trading212. - Real-time: Django Channels (ASGI, Redis) for websockets.
- Task queue: Celery + Redis for async/background jobs.
- API: REST endpoints, JWT auth, API key support.
References
- frontend/REACT.md: Frontend structure, workflows, and conventions.
- frontend/src/layouts/LAYOUTS.md: Layout/component patterns.
- frontend/src/routes/ROUTES.md: Routing conventions.
- backend/vontor_cz/settings.py: All backend config, env, and integration details.
- docker-compose.yml: Service orchestration and dev workflow.
When in doubt, check the referenced markdown files and settings.py for project-specific logic and patterns.