Files

1.9 KiB

Application architecture

TasksNest is a Django 6.1 application with SQLite, server-rendered templates and HTMX interactions. Vite builds Sass and JavaScript; WhiteNoise serves collected static files. main/tasksnest/settings.py defines installed apps and middleware. main/tasksnest/urls.py mounts the web applications, /api/v1/, and OAuth endpoints. main/manage.py, tasksnest/wsgi.py, and tasksnest/asgi.py are Django entry points.

Component Responsibility
planner Tasks, occurrences, settings, health trackers, dashboard and demo policy
food Food diary, products, kitchen stock, hydration, nutrition imports, dietary preferences, API and OAuth
recipes Recipes, composition, variations, cook later, stock use and meal logging
groceries Shopping list, recipe demand and transfer to inventory
home_assistant Per-user connection and to-do sync; separate from MCP
stress, dreams Private journals and API endpoints
mcp_server Separate streamable HTTP process translating MCP calls to the Django API
frontend Vite asset build and HTMX package

Web requests pass through Django middleware, including DemoAccountPolicyMiddleware, timezone selection and API error handling. API views use bearer token scope checks and ownership filters; browser views use sessions, CSRF and per-user queries. The MCP process validates a bearer token through /api/v1/auth/whoami/, then calls API endpoints on loopback. There is no in-process service injection between MCP and Django.

Background work is command/service based rather than Celery. Inspect main/*/management/commands/, home_assistant scheduling code and deployed timers before altering jobs. External integrations include Open Food Facts, optional Gitea contribution data, ntfy and Home Assistant. See configuration, routing and operations.