Backend project conventions for Django, DRF, Celery, and infrastructure — app organization, logging, API schemas, settings, task processing, feature flags, and development commands
structlog for structured logging, not standard loggingdjango-timeseries for time series data (energy measurements)api_schema/optinode/webserver/config/settings/ — use config() helper for env varsUse just command runner from project root:
just backend-server # Django with auto-reload
just frontend-server # React dev server (port 3000)
just backend-tests-fast # Backend tests
just frontend-test # Frontend tests
just backend-migrate # Database migrations
just frontend-build-ts-types # Generate TS types from OpenAPI
just db-copy-backup-to-local # Restore staging data locally
| Directory | Commands |
|---|---|
Project root (where justfile lives) | just commands, backend operations |
frontend/ | npm, npx vitest, storybook |
Common mistakes: Running npm/npx from project root (use just frontend-* instead), running just from frontend/ (won't be found).
uv for dependency management