Dev machine setup. One-off steps that persist across restores.
- Python 3.12+ — Install Python 3.12 or later.
- Poetry — Install Poetry for dependency management.
- Node.js 22+ and npm — Required for the Vue frontend and Playwright tests.
- PostgreSQL 16+ — Install PostgreSQL and ensure it's running. Configure
pg_hba.confto allow password auth over sockets for app users (keep peer auth forpostgres):Restart PostgreSQL after editing.# TYPE DATABASE USER METHOD local all postgres peer local all all scram-sha-256 - Redis —
sudo apt install redis-server && sudo systemctl enable --now redis-server. Used as the Celery broker, Django shared cache, and Channels backend. Runs as host infrastructure on :6379 and starts on boot.
git clone https://github.com/corrin/docketworks.git
cd docketworks
python -m venv .venv
source .venv/bin/activate
poetry install
cd frontend && npm install && npx playwright install --with-deps && cd ..Wires up the pre-commit, post-merge, and post-rewrite git hooks (the latter two regenerate the autogenerated codesight context maps after git pull / git pull --rebase) and seeds the maps for the first time:
pre-commit install
pre-commit run --all-files --hook-stage post-mergeRe-running is safe and idempotent.
sudo -u postgres ./scripts/setup_database.sh.env— Copy from.env.exampleand configureDB_NAME,DB_USER,DB_PASSWORD, and all other required variables.- Configure tunnel URLs:
This updates backend
python scripts/configure_tunnels.py --backend https://<name>-dev.ngrok-free.app --frontend https://<name>-front.ngrok-free.app
.env, frontend.env, andvite.config.tswith the correct URLs. apps/workflow/fixtures/ai_providers.json— Copy fromai_providers.json.exampleand add your API keys for Claude, Gemini, and Mistral. Thenpython manage.py loaddata apps/workflow/fixtures/ai_providers.json.apps/workflow/fixtures/xero_apps.json— Copy fromxero_apps.json.exampleand fill in your dev Xero app credentials: client_id, client_secret, redirect_uri, and webhook_key (ask the team for the shared dev credentials). Setlabelto<your-name> xeroso it's distinguishable from other devs' rows. Thenpython manage.py loaddata apps/workflow/fixtures/xero_apps.json.
If you encounter issues:
- Dependencies: Rerun
poetry install. Check for errors. - .env File: Verify
DB_NAME,DB_USER,DB_PASSWORD, andAPP_DOMAIN. - Database: Is PostgreSQL running? Do credentials in
.envmatch theCREATE ROLEcommand? - Migrations: Run
python manage.py migrate. Any errors? - ngrok: Is the ngrok terminal running without errors? Does the domain match the redirect URI and
.env? Is the port correct? - Xero app configured? Admin > Xero Apps shows a row with
Authorised: ✓after the OAuth login. Redirect URI on the row must match the URI registered in the Xero Dev portal. - Django Debug Page/Logs: Look for detailed errors when
DEBUG=True. Checklogs/directory.