This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Local development:
docker-compose up(starts all services) - Run tests:
cd backend && uv run pytestorDJANGO_SETTINGS_MODULE=pycon.settings.test uv run pytest - Single test:
cd backend && uv run pytest path/to/test_file.py::test_function - Lint/format:
cd backend && uv run ruff checkanduv run ruff format - Type checking:
cd backend && uv run mypy . - Django management:
cd backend && uv run python manage.py <command> - Migrations:
cd backend && uv run python manage.py makemigrationsanduv run python manage.py migrate
- Local development:
cd frontend && pnpm dev(or via docker-compose) - Build:
cd frontend && pnpm build - Tests:
cd frontend && pnpm test - GraphQL codegen:
cd frontend && pnpm codegen(orpnpm codegen:watch) - Lint/format: Use Biome via
npx @biomejs/biome checkandnpx @biomejs/biome format
This is a monorepo for PyCon Italia's website with:
- API Layer: GraphQL API using Strawberry at
/backend/api/ - Django Apps: Modular apps in
/backend/including:conferences/- Conference management and configurationsubmissions/- Talk/proposal submissionsusers/- User management and authenticationschedule/- Event scheduling and video uploadssponsors/- Sponsor managementgrants/- Financial assistance programblog/- Blog posts and newscms/- Content management via Wagtailapi/- GraphQL schema and resolvers
- Database: PostgreSQL with migrations in each app's
migrations/folder - Task Queue: Celery with Redis backend for async processing
- Storage: Configurable (filesystem local, cloud for production)
- Framework: Next.js
- Styling: Tailwind CSS with custom design system
- State Management: Apollo Client for GraphQL
- Type Safety: Full TypeScript with generated types from GraphQL schema
- Location:
/frontend/src/contains pages, components, and utilities
- Pretix: Ticketing system integration for event registration
- Stripe: Payment processing
- ClamAV: File scanning for security
- Wagtail: CMS for page content management
- Google APIs: For YouTube video management and calendar integration
The project uses Docker Compose for local development with services:
- backend: Django API server (port 8000)
- frontend: Next.js dev server (port 3000)
- custom-admin: Admin interface (ports 3002-3003)
- backend-db: PostgreSQL database (port 15501)
- redis: Caching and task queue
- clamav: File virus scanning
- Python version: 3.13.5+ (specified in pyproject.toml)
- Uses
uvfor Python package management - Uses
pnpmfor Node.js package management - GraphQL schema auto-generation from Django backend to frontend
- Test configuration uses separate settings (
pycon.settings.test) - Ruff handles both linting and formatting for Python code
- Biome handles linting and formatting for JavaScript/TypeScript
IMPORTANT: When running locally, all Python/Django commands must run inside Docker. The local virtual environment will not work.
Use docker exec pycon-backend-1 (without -t flag for non-interactive/script usage, with -it for interactive terminal).
- Start services:
docker-compose up(starts all services) - Run tests:
docker exec pycon-backend-1 uv run pytest -l -s -vvv - Single test:
docker exec pycon-backend-1 uv run pytest path/to/test_file.py::test_function -l -s -vvv - Lint/format:
docker exec pycon-backend-1 uv run ruff checkanddocker exec pycon-backend-1 uv run ruff format - Type checking:
docker exec pycon-backend-1 uv run mypy . - Django management:
docker exec pycon-backend-1 uv run python manage.py <command> - Migrations:
docker exec pycon-backend-1 uv run python manage.py makemigrationsanddocker exec pycon-backend-1 uv run python manage.py migrate
Troubleshooting: If the backend container is not working:
- Restart container:
docker restart pycon-backend-1 - If dependencies changed: Remove
backend/.venvand rebuild withdocker-compose build --no-cache && docker-compose up