# tangislearning/todolist architecture

> Architecture diagram of the GitHub repository tangislearning/todolist, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tangislearning/todolist
- Repository: https://github.com/tangislearning/todolist

## Overview

TodoList is a local-first, cross-platform task manager with desktop and Android support. Its main workflow is users managing tasks and related features in the JavaScript interface, with backend APIs persisting task data in SQLite; platform services provide device-specific capabilities. Additional branches cover attachments, recurrence, views, export, LAN sharing, WebDAV sync, and storage-location migration. Edges are limited to relationships evidenced by excerpts, the SOURCE INDEX, or README; some frontend-to-backend wiring is not shown and is therefore omitted.

Main entry points: [`backend/features/webdav/webdav_data_sync.py`](https://github.com/tangislearning/todolist/blob/master/backend/features/webdav/webdav_data_sync.py) (WebDAV sync), [`backend/api/todo_api.py`](https://github.com/tangislearning/todolist/blob/master/backend/api/todo_api.py) (Todo API), [`backend/database/todo_database.py`](https://github.com/tangislearning/todolist/blob/master/backend/database/todo_database.py) (SQLite database), [`backend/storage/service.py`](https://github.com/tangislearning/todolist/blob/master/backend/storage/service.py) (Storage facade)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_frontend["Frontend shell<br/>[main.js]"]
  node_task_ui["Task interaction<br/>[todo.js]"]
  node_views["Views and filters<br/>[view-manager.js]"]
  node_settings["Settings<br/>[settings.js]"]
end

subgraph group_api["Application API"]
  node_api["Todo API<br/>[todo_api.py]"]
  node_api_mixins["Feature API mixins"]
  node_attachment_api["Attachment API"]
end

subgraph group_data["Task data"]
  node_db[("SQLite database<br/>[todo_database.py]")]
  node_tasks["Task CRUD<br/>[task_crud_mixin.py]"]
  node_schema["Database schema<br/>[schema.py]"]
  node_recurrence["Recurrence rules"]
  node_attachments["Attachment service"]
end

subgraph group_sync["Data and sync"]
  node_storage["Storage facade<br/>[service.py]"]
  node_config["App configuration<br/>[config_manager.py]"]
  node_export["Data export<br/>[data_export.py]"]
  node_webdav_sync["WebDAV sync"]
  node_webdav_client["WebDAV client<br/>[webdav_client.py]"]
  node_p2p["LAN sharing"]
  node_backend_migrator["Storage migrator<br/>[migrator.py]"]
end

subgraph group_platform["Platform services"]
  node_platform_factory["Platform factory<br/>[factory.py]"]
  node_platform_service["Platform capabilities<br/>[service.py]"]
  node_startup["Backend startup<br/>[start.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_frontend
node_frontend -.->|"loads"| node_task_ui
node_user -->|"manages tasks"| node_task_ui
node_user -->|"selects views"| node_views
node_user -->|"configures"| node_settings
node_api -->|"creates"| node_db
node_api -->|"creates"| node_export
node_api -->|"creates"| node_p2p
node_api -->|"inherits"| node_api_mixins
node_api_mixins -->|"exports"| node_attachment_api
node_attachment_api -->|"calls"| node_attachments
node_attachment_api -->|"reads and writes"| node_db
node_db -->|"initializes"| node_schema
node_db -->|"resolves path"| node_storage
node_tasks -->|"uses rules"| node_recurrence
node_storage -->|"reads settings"| node_config
node_storage -->|"coordinates migration"| node_backend_migrator
node_startup -->|"creates"| node_api
node_startup -->|"creates"| node_db
node_startup -->|"starts"| node_webdav_sync
node_webdav_sync -->|"uses"| node_webdav_client
node_webdav_sync -->|"uses"| node_storage
node_webdav_sync -->|"reads settings"| node_config
node_webdav_sync -->|"uses"| node_platform_factory
node_platform_factory -->|"implements"| node_platform_service
node_config -->|"gets config path"| node_platform_service

click node_frontend "https://github.com/tangislearning/todolist/blob/master/frontend/js/main.js"
click node_task_ui "https://github.com/tangislearning/todolist/blob/master/frontend/js/features/todo/todo.js"
click node_views "https://github.com/tangislearning/todolist/blob/master/frontend/js/features/view-manager.js"
click node_settings "https://github.com/tangislearning/todolist/blob/master/frontend/js/features/settings/settings.js"
click node_api "https://github.com/tangislearning/todolist/blob/master/backend/api/todo_api.py"
click node_api_mixins "https://github.com/tangislearning/todolist/tree/master/backend/api/mixins"
click node_attachment_api "https://github.com/tangislearning/todolist/blob/master/backend/api/mixins/attachment_api_mixin.py"
click node_db "https://github.com/tangislearning/todolist/blob/master/backend/database/todo_database.py"
click node_tasks "https://github.com/tangislearning/todolist/blob/master/backend/database/mixins/task_crud_mixin.py"
click node_schema "https://github.com/tangislearning/todolist/blob/master/backend/database/schema.py"
click node_recurrence "https://github.com/tangislearning/todolist/tree/master/backend/features/recurrence"
click node_attachments "https://github.com/tangislearning/todolist/blob/master/backend/features/attachment/attachment_service.py"
click node_storage "https://github.com/tangislearning/todolist/blob/master/backend/storage/service.py"
click node_config "https://github.com/tangislearning/todolist/blob/master/backend/config_manager.py"
click node_export "https://github.com/tangislearning/todolist/blob/master/backend/storage/data_export.py"
click node_webdav_sync "https://github.com/tangislearning/todolist/blob/master/backend/features/webdav/webdav_data_sync.py"
click node_webdav_client "https://github.com/tangislearning/todolist/blob/master/backend/features/webdav/webdav_client.py"
click node_p2p "https://github.com/tangislearning/todolist/tree/master/backend/features/p2p"
click node_backend_migrator "https://github.com/tangislearning/todolist/blob/master/backend/storage/migrator.py"
click node_platform_factory "https://github.com/tangislearning/todolist/blob/master/backend/platforms/core/factory.py"
click node_platform_service "https://github.com/tangislearning/todolist/blob/master/backend/platforms/interface/service.py"
click node_startup "https://github.com/tangislearning/todolist/blob/master/backend/start.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_frontend,node_task_ui,node_views,node_settings,node_user toneBlue
class node_api,node_api_mixins,node_attachment_api toneAmber
class node_db,node_tasks,node_schema,node_recurrence,node_attachments toneMint
class node_storage,node_config,node_export,node_webdav_sync,node_webdav_client,node_p2p,node_backend_migrator toneRose
class node_platform_factory,node_platform_service,node_startup toneIndigo
```

## Components

### User interface

- [Frontend shell](https://github.com/tangislearning/todolist/blob/master/frontend/js/main.js): `frontend/js/main.js`
- [Task interaction](https://github.com/tangislearning/todolist/blob/master/frontend/js/features/todo/todo.js): `frontend/js/features/todo/todo.js`
- [Views and filters](https://github.com/tangislearning/todolist/blob/master/frontend/js/features/view-manager.js): `frontend/js/features/view-manager.js`
- [Settings](https://github.com/tangislearning/todolist/blob/master/frontend/js/features/settings/settings.js): `frontend/js/features/settings/settings.js`

### Application API

- [Todo API](https://github.com/tangislearning/todolist/blob/master/backend/api/todo_api.py): `backend/api/todo_api.py`
- [Feature API mixins](https://github.com/tangislearning/todolist/tree/master/backend/api/mixins): `backend/api/mixins`
- [Attachment API](https://github.com/tangislearning/todolist/blob/master/backend/api/mixins/attachment_api_mixin.py): `backend/api/mixins/attachment_api_mixin.py`

### Task data

- [SQLite database](https://github.com/tangislearning/todolist/blob/master/backend/database/todo_database.py): `backend/database/todo_database.py`
- [Task CRUD](https://github.com/tangislearning/todolist/blob/master/backend/database/mixins/task_crud_mixin.py): `backend/database/mixins/task_crud_mixin.py`
- [Database schema](https://github.com/tangislearning/todolist/blob/master/backend/database/schema.py): `backend/database/schema.py`
- [Recurrence rules](https://github.com/tangislearning/todolist/tree/master/backend/features/recurrence): `backend/features/recurrence`
- [Attachment service](https://github.com/tangislearning/todolist/blob/master/backend/features/attachment/attachment_service.py): `backend/features/attachment/attachment_service.py`

### Data and sync

- [Storage facade](https://github.com/tangislearning/todolist/blob/master/backend/storage/service.py): `backend/storage/service.py`
- [App configuration](https://github.com/tangislearning/todolist/blob/master/backend/config_manager.py): `backend/config_manager.py`
- [Data export](https://github.com/tangislearning/todolist/blob/master/backend/storage/data_export.py): `backend/storage/data_export.py`
- [WebDAV sync](https://github.com/tangislearning/todolist/blob/master/backend/features/webdav/webdav_data_sync.py): `backend/features/webdav/webdav_data_sync.py`
- [WebDAV client](https://github.com/tangislearning/todolist/blob/master/backend/features/webdav/webdav_client.py): `backend/features/webdav/webdav_client.py`
- [LAN sharing](https://github.com/tangislearning/todolist/tree/master/backend/features/p2p): `backend/features/p2p`
- [Storage migrator](https://github.com/tangislearning/todolist/blob/master/backend/storage/migrator.py): `backend/storage/migrator.py`

### Platform services

- [Platform factory](https://github.com/tangislearning/todolist/blob/master/backend/platforms/core/factory.py): `backend/platforms/core/factory.py`
- [Platform capabilities](https://github.com/tangislearning/todolist/blob/master/backend/platforms/interface/service.py): `backend/platforms/interface/service.py`
- [Backend startup](https://github.com/tangislearning/todolist/blob/master/backend/start.py): `backend/start.py`

### Other components

- **User**

## Connections

- User → Frontend shell: uses (evidence: `README.md`)
- Frontend shell → Task interaction: loads
- User → Task interaction: manages tasks (evidence: `README.md`)
- User → Views and filters: selects views (evidence: `README.md`)
- User → Settings: configures (evidence: `README.md`)
- Todo API → SQLite database: creates (evidence: `backend/api/todo_api.py`)
- Todo API → Data export: creates (evidence: `backend/api/todo_api.py`)
- Todo API → LAN sharing: creates (evidence: `backend/api/todo_api.py`)
- Todo API → Feature API mixins: inherits (evidence: `backend/api/todo_api.py`)
- Feature API mixins → Attachment API: exports (evidence: `backend/api/mixins/__init__.py`)
- Attachment API → Attachment service: calls (evidence: `backend/api/mixins/attachment_api_mixin.py`)
- Attachment API → SQLite database: reads and writes (evidence: `backend/api/mixins/attachment_api_mixin.py`)
- SQLite database → Database schema: initializes (evidence: `backend/database/todo_database.py`)
- SQLite database → Storage facade: resolves path (evidence: `backend/database/todo_database.py`)
- Task CRUD → Recurrence rules: uses rules (evidence: `backend/database/mixins/task_crud_mixin.py`)
- Storage facade → App configuration: reads settings (evidence: `backend/storage/service.py`)
- Storage facade → Storage migrator: coordinates migration (evidence: `backend/storage/service.py`)
- Backend startup → Todo API: creates (evidence: `backend/start.py`)
- Backend startup → SQLite database: creates (evidence: `backend/start.py`)
- Backend startup → WebDAV sync: starts (evidence: `backend/start.py`)
- WebDAV sync → WebDAV client: uses (evidence: `backend/features/webdav/webdav_data_sync.py`)
- WebDAV sync → Storage facade: uses (evidence: `backend/features/webdav/webdav_data_sync.py`)
- WebDAV sync → App configuration: reads settings (evidence: `backend/features/webdav/webdav_data_sync.py`)
- WebDAV sync → Platform factory: uses (evidence: `backend/features/webdav/webdav_data_sync.py`)
- Platform factory → Platform capabilities: implements (evidence: `backend/platforms/core/factory.py`)
- App configuration → Platform capabilities: gets config path (evidence: `backend/config_manager.py`)
