π€ ContributingΒΆ
PrerequisitesΒΆ
Python 3.14+
Node.js (for vendored JS and linters)
Git
Project setupΒΆ
Clone the repository and create a virtual environment:
git clone https://github.com/confirm/typarr.git
cd typarr
make venv
source .venv/bin/activate
make develop
make develop installs the Python package in editable mode (with dev
dependencies) and the Node.js dependencies.
Running the dev serverΒΆ
Start the development server with auto-reload:
make server
This launches Uvicorn on http://localhost:8000 with hot-reload enabled.
To skip authentication during development, set:
TYPARR_AUTH_DISABLED=true make server
Vendored assetsΒΆ
Some front-end libraries (Prism.js, Yjs) are bundled into the
typarr/static/js/vendor/ directory. After modifying
typarr/static/js/yjs-entry.js or updating Node dependencies, rebuild
with:
make vendor-js
The colours CSS is fetched separately:
make vendor-css
LintingΒΆ
Run all linters at once:
make test
Or run them individually:
make test-pycodestyle # PEP 8
make test-pylint # Pylint
make test-isort # import order
make test-eslint # JavaScript
make test-stylelint # CSS
Building the docsΒΆ
Build the documentation once:
make docs
Or start a live-reloading preview:
make autodocs
This opens the docs in your browser on http://localhost:8888 and
watches for changes.
Building the Docker imageΒΆ
make package
make docker-image
make package creates a wheel in build/, which the Dockerfile
copies into the image.
Project layoutΒΆ
typarr/
βββ auth.py Authentication & OIDC
βββ config.py Environment-based configuration
βββ dependencies.py FastAPI dependency injection
βββ middleware.py ASGI middleware stack
βββ models.py Pydantic request/response schemas
βββ routers/ API endpoint modules
βββ services/ Business logic (bucket, file, git, compiler, β¦)
βββ static/ SPA frontend
βββ css/
βββ js/ ES modules (no framework, vanilla JS)
βββ index.html