1.7 KiB
Development, deployment and testing
Install pinned Python requirements from main/requirements.txt into a virtual environment, configure a secret key in an ignored root .env or process environment, then run main/manage.py migrate. Frontend dependencies are in main/frontend/package.json; npm run build builds Vite assets. Use the existing tasknest-web.service for ordinary verification on this host. npm run deploy:assets builds, collects static files and restarts the web service, so run it only when deployment is authorized.
Web service: main/deploy/systemd/tasknest-web.service, Uvicorn ASGI on port 1234. MCP service: main/deploy/systemd/tasknest-mcp.service, separate Uvicorn process on port 8002. The repository also contains timers for demo reset, fasting notification and Home Assistant sync; inventory scans use a management command. Check service/timer status and logs on the target host before diagnosing scheduling.
Run Django tests with tasksnest-host/bin/python main/manage.py test <app or test module> from the repository root. Relevant suites include main/mcp_server/test_tool_catalog.py, main/mcp_server/tests.py, API and model tests in food, recipes, groceries, planner, home_assistant, stress and dreams. Frontend changes require Playwright MCP inspection per AGENTS.md. python3 scripts/docs_audit.py checks audit due date, local Markdown links and tracked source changes; it does not perform semantic review.
Pitfalls: the working tree may contain unapplied/uncommitted migrations; never reset the shared demo account to test; do not treat an MCP tool description as a permission check; do not restart or deploy services for documentation-only edits. See audit guide.