Thanks for your interest in contributing! Here's how to get set up and submit changes.
cd backend
pip install -r requirements.txt
pip install ruff pyright pre-commit
# Install pre-commit hooks
pre-commit install
# Start MongoDB
docker compose -f ../docker-compose.yml up mongo -d
# Seed test data
python seed.py
# Run the server
uvicorn app.main:app --port 8001 --reloadcd frontend
npm install
npm run devcd backend
# Lint
ruff check app/ cli/ seed.py
# Format
ruff format app/ cli/ seed.py
# Type check
pyright app/ cli/ seed.pycd frontend
# All checks (typecheck + lint + format)
npm run check
# Individual
npm run typecheck # TypeScript
npm run lint # ESLint
npm run format:check # Prettier
# Auto-fix
npm run lint:fix
npm run format- Python 3.10+ — avoid 3.11+ features like
datetime.UTC - Ruff for linting and formatting (config in
pyproject.toml) - Pyright in basic mode for type checking
- Typed returns — use dataclasses or
TypedDict, not baredictortuple - Async — all DB operations use motor's async API
- Shared probes live in
app/core/probes.py— both the backend service and CLI import from here
- TypeScript strict mode — no
anytypes - Prettier + Tailwind plugin for formatting (config in
.prettierrc.json) - shadcn/ui components in
src/components/ui/— don't modify these directly, usenpx shadcn add - Custom components go in
src/components/ - Hooks go in
src/hooks/ - Pure utilities go in
src/lib/ - State ownership — UI-local state (popovers, form inputs) belongs in the component, not the data hook
- Create a branch from
master - Make your changes
- Ensure all checks pass (
ruff check,pyright,npm run check) - Push and open a pull request
- Describe what changed and why in the PR description
- Add the model ID to
MODELSinbackend/app/core/config.py - Add a short name to
MODEL_SHORTin the same file - The frontend picks up new models automatically from the
/api/modelsendpoint
- Add the Pydantic schema to
backend/app/schemas.py - Add the query logic to
backend/app/services/metrics.py - Add the route handler to
backend/app/routes.py - Add the TypeScript interface and fetch function to
frontend/src/lib/api.ts