Dependency Management
Backend (pip + pip-compile)
Dependencies declared in backend/pyproject.toml, pinned in backend/requirements.txt (lock file — never edit by hand).
Add a package
Edit
backend/pyproject.toml:- Runtime:
[project.dependencies] - Dev-only:
[project.optional-dependencies.dev]
- Runtime:
Regenerate lock file:
cd backend && .venv/bin/pip-compile --output-file=requirements.txt pyproject.tomlInstall locally:
cd backend && .venv/bin/pip install -r requirements.txtCommit both files:
git add backend/pyproject.toml backend/requirements.txt git commit -m "chore(deps): add <package-name>"
Security audit
cd backend && .venv/bin/pip-audit
Frontend (npm)
Add a package
cd frontend
npm install <package-name> # runtime
npm install -D <package-name> # dev-only
Commit both files:
git add frontend/package.json frontend/package-lock.json
git commit -m "chore(deps): add <package-name>"
Security audit
cd frontend && npm audit
Docker Rebuild
After adding dependencies, rebuild the relevant container:
# Backend
docker compose build backend && docker compose up -d
# Frontend
docker compose build frontend && docker compose up -d
Converted and distributed by TomeVault — claim your Tome and manage your conversions.