Establish Git-first TasksNest documentation and audit baseline
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# Configuration and dependencies
|
||||
|
||||
`main/requirements.txt` pins Django 6.1.1, uvicorn, WhiteNoise, django-oauth-toolkit, MCP 2.3.0, cryptography, Pillow, Markdown, nh3 and h3. `main/frontend/package.json` uses Vite 7, Sass and HTMX 2. `tasksnest-host` is the host virtual environment; dependencies should be checked against lock or requirements files before upgrading.
|
||||
|
||||
`main/tasksnest/settings.py` reads `DJANGO_SECRET_KEY` and `DJANGO_DEBUG` from the process environment or ignored root `.env`; missing secret key is fatal. It uses SQLite at `main/db.sqlite3`, private uploads under `main/private_media`, collected static files under `main/staticfiles`, and `Europe/Amsterdam` as the default time zone. Production enables secure cookies and HTTPS redirection; a trusted reverse proxy supplies HTTPS headers.
|
||||
|
||||
Relevant optional settings include `TASKNEST_DEMO_PASSWORD`, `TASKNEST_RECIPE_MATCH_DEMO_USERNAME`, `TASKNEST_MCP_PUBLIC_URL`, `TASKNEST_OAUTH_ISSUER_URL`, `TASKNEST_API_BASE_URL`, `TASKNEST_MCP_FILE_HOSTS`, `OPENFOODFACTS_*`, `GITEA_*`, and `VITE_*`. The MCP process reads its own environment in `mcp_server/server.py`. Never copy values from `.env` or token storage into documentation.
|
||||
@@ -0,0 +1,18 @@
|
||||
# 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](configuration.md), [routing](../api/routing.md) and [operations](../operations/overview.md).
|
||||
Reference in New Issue
Block a user