This is a Django + Next.js monorepo. Python/Django backend lives in the root directory, Next.js frontend lives in front_end/.
cd ./front_end && bun run build: Build the projectcd ./front_end && bun run format: Format the frontend codecd ./front_end && bun run lint: Run linter AND type checker in parallel (includes bothlint:jsandlint:types). Do NOT runlintandlint:typesseparately —lintalready includes type checking.uv run ruff format .: Format Python codeuv run ruff check .: Lint Python code
- Check the existing code style and follow it
- Destructure imports when possible (eg. import { foo } from 'bar')
- Do not use inline imports where possible. Prefer top-level imports.
- Do not add excessive comments. Add comments only to document what would be surprising to a senior engineer.
- For any frontend content visible to the user, use the translation mechanism used across the whole frontend.
const t = useTranslations()and thent("stringKey")while adding the "stringKey" to all the corresponding language files infront_end/messages/:en.json,es.json,cs.json,pt.json,zh.json,zh-TW.json.
- When connected to an IDE, check terminal outputs first. If a dev server is already running, do not run a build. Instead, read the dev server terminal output for any latest errors and use those for feedback.
- When done making code changes, run the relevant linters and formatters based on which files you edited:
- Python files: run
uv run ruff format .anduv run ruff check . - Frontend (JS/TS) files: run
cd ./front_end && bun run lintandcd ./front_end && bun run format, and try to build withcd ./front_end && bun run buildif there is no running dev server in IDE.
- Python files: run