Contributing
Development Setup
git clone https://github.com/Jsakkos/engram.git
cd engram
# Backend
cd backend
uv sync
cd ..
# Frontend
cd frontend
npm install
cd ..
Start Dev Servers
Start the backend and frontend in separate terminals:
Open http://localhost:5173. The Vite dev server proxies /api and /ws to the backend at localhost:8000.
Code Quality
Backend
Ruff config: Line length 100, target Python 3.11, rules E/F/I/UP/B, double quotes.
Frontend
Running Tests
# Backend — all tests
cd backend
uv run pytest
# Backend — specific category
uv run pytest tests/unit/
uv run pytest tests/integration/
uv run pytest tests/pipeline/
# Frontend — E2E tests (requires backend with DEBUG=true)
cd frontend
npx playwright install # first time only
npm run test:e2e
npm run test:e2e:ui # with interactive browser UI
See the Testing page for detailed test categories and patterns.
Git Workflow
- Work on feature branches, not directly on
main - Branch naming:
fix/32-movie-track-state,feat/34-metadata-logging - Reference issue numbers in commit messages
- Create PRs for merging to main
Key Conventions
- Async everywhere — use
async/awaitfor database, subprocess, and I/O operations - Singleton services —
job_manager,ws_manager,curatorare module-level singletons - Error hierarchy — use specific exceptions from
app/core/errors.py, never bareexcept - State machine — all job lifecycle tracked through
JobStatetransitions - Tailwind v4 — uses
@theme inlineblocks in CSS, nottailwind.config.js
Documentation
Documentation is built with MkDocs Material and auto-deploys to GitHub Pages on push to main.
Edit files under docs/ and they'll be picked up automatically.