# maciekt07/todoapp architecture

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

- Interactive diagram: https://gitdiagram.com/maciekt07/todoapp
- Repository: https://github.com/maciekt07/todoapp

## Overview

This is a React todo PWA. Users create and manage tasks and categories, then can share tasks, transfer or sync data between devices, and customize their profile and settings. The runtime entry mounts the app and router; task and user state are persisted locally, with profile images stored separately in IndexedDB. The README documents major features whose implementation was not sampled, so those branches are shown at the documented capability level rather than as verified internal call paths.

Main entry points: [`src/router.tsx`](https://github.com/maciekt07/todoapp/blob/main/src/router.tsx) (Route selection), [`src/contexts/UserProvider.tsx`](https://github.com/maciekt07/todoapp/blob/main/src/contexts/UserProvider.tsx) (User state), [`src/components/settings/SettingsDialog.tsx`](https://github.com/maciekt07/todoapp/blob/main/src/components/settings/SettingsDialog.tsx) (App settings), [`src/components/tasks/TasksList.tsx`](https://github.com/maciekt07/todoapp/blob/main/src/components/tasks/TasksList.tsx) (Task management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.tsx]"]
  node_application["App shell<br/>[App.tsx]"]
  node_router["Route selection<br/>[router.tsx]"]
end

subgraph group_tasks["Tasks and categories"]
  node_home["Task home<br/>[Home.tsx]"]
  node_tasklist["Task management<br/>[TasksList.tsx]"]
  node_taskstate["Task state<br/>[TaskProvider.tsx]"]
  node_localstorage[("Browser storage<br/>[useStorageState.ts]")]
  node_categories["Categories<br/>[Categories.tsx]"]
  node_addtask["Add task<br/>[AddTask.tsx]"]
  node_taskdetails["Task details<br/>[TaskDetails.tsx]"]
end

subgraph group_sharing["Sharing and transfer"]
  node_share["Task sharing<br/>[Share.tsx]"]
  node_sync["Peer sync<br/>[Sync.tsx]"]
  node_transfer["Import and export<br/>[Transfer.tsx]"]
end

subgraph group_preferences["Profile and preferences"]
  node_userstate["User state<br/>[UserProvider.tsx]"]
  node_profile["User profile<br/>[UserProfile.tsx]"]
  node_profiledb[("Profile image store")]
  node_settings["App settings<br/>[SettingsDialog.tsx]"]
  node_emoji["AI emoji suggestions<br/>[EmojiPicker.tsx]"]
  node_readaloud["Read aloud<br/>[ReadAloudTab.tsx]"]
  node_theme["Theme configuration<br/>[themeConfig.ts]"]
end

node_person(("App user"))
node_browser{{"Browser platform"}}
node_peer(("Other device"))

node_person -.->|"opens"| node_entry
node_entry -->|"mounts"| node_application
node_application -->|"renders"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_addtask
node_router -->|"routes to"| node_categories
node_router -->|"routes to"| node_taskdetails
node_router -->|"routes to"| node_share
node_router -->|"routes to"| node_sync
node_router -->|"routes to"| node_transfer
node_router -->|"routes to"| node_profile
node_home -.->|"shows tasks"| node_tasklist
node_tasklist -->|"uses task state"| node_taskstate
node_taskstate -->|"persists state"| node_localstorage
node_userstate -.->|"persists state"| node_localstorage
node_categories -->|"reads user data"| node_userstate
node_tasklist -->|"reads user data"| node_userstate
node_share -.->|"shares by link or QR"| node_person
node_sync -.->|"syncs with"| node_peer
node_sync -.->|"syncs user data"| node_userstate
node_transfer -.->|"imports or exports"| node_person
node_profile -->|"stores images"| node_profiledb
node_profiledb -->|"uses IndexedDB"| node_browser
node_settings -.->|"offers themes"| node_theme
node_settings -.->|"configures speech"| node_readaloud
node_settings -.->|"offers suggestions"| node_emoji

click node_entry "https://github.com/maciekt07/todoapp/blob/main/src/main.tsx"
click node_application "https://github.com/maciekt07/todoapp/blob/main/src/App.tsx"
click node_router "https://github.com/maciekt07/todoapp/blob/main/src/router.tsx"
click node_home "https://github.com/maciekt07/todoapp/blob/main/src/pages/Home.tsx"
click node_tasklist "https://github.com/maciekt07/todoapp/blob/main/src/components/tasks/TasksList.tsx"
click node_taskstate "https://github.com/maciekt07/todoapp/blob/main/src/contexts/TaskProvider.tsx"
click node_userstate "https://github.com/maciekt07/todoapp/blob/main/src/contexts/UserProvider.tsx"
click node_localstorage "https://github.com/maciekt07/todoapp/blob/main/src/hooks/useStorageState.ts"
click node_categories "https://github.com/maciekt07/todoapp/blob/main/src/pages/Categories.tsx"
click node_addtask "https://github.com/maciekt07/todoapp/blob/main/src/pages/AddTask.tsx"
click node_taskdetails "https://github.com/maciekt07/todoapp/blob/main/src/pages/TaskDetails.tsx"
click node_share "https://github.com/maciekt07/todoapp/blob/main/src/pages/Share.tsx"
click node_sync "https://github.com/maciekt07/todoapp/blob/main/src/pages/Sync.tsx"
click node_transfer "https://github.com/maciekt07/todoapp/blob/main/src/pages/Transfer.tsx"
click node_profile "https://github.com/maciekt07/todoapp/blob/main/src/pages/UserProfile.tsx"
click node_profiledb "https://github.com/maciekt07/todoapp/blob/main/src/utils/profilePictureStorage.ts"
click node_settings "https://github.com/maciekt07/todoapp/blob/main/src/components/settings/SettingsDialog.tsx"
click node_emoji "https://github.com/maciekt07/todoapp/blob/main/src/components/EmojiPicker.tsx"
click node_readaloud "https://github.com/maciekt07/todoapp/blob/main/src/components/settings/tabs/ReadAloudTab.tsx"
click node_theme "https://github.com/maciekt07/todoapp/blob/main/src/theme/themeConfig.ts"

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_entry,node_application,node_router,node_person,node_browser toneBlue
class node_home,node_tasklist,node_taskstate,node_localstorage,node_categories,node_addtask,node_taskdetails toneAmber
class node_share,node_sync,node_transfer toneMint
class node_userstate,node_profile,node_profiledb,node_settings,node_emoji,node_readaloud,node_theme toneRose
class node_peer toneIndigo
```

## Components

### Application shell

- [React entry](https://github.com/maciekt07/todoapp/blob/main/src/main.tsx): `src/main.tsx`
- [App shell](https://github.com/maciekt07/todoapp/blob/main/src/App.tsx): `src/App.tsx`
- [Route selection](https://github.com/maciekt07/todoapp/blob/main/src/router.tsx): `src/router.tsx`

### Tasks and categories

- [Task home](https://github.com/maciekt07/todoapp/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Task management](https://github.com/maciekt07/todoapp/blob/main/src/components/tasks/TasksList.tsx): `src/components/tasks/TasksList.tsx`
- [Task state](https://github.com/maciekt07/todoapp/blob/main/src/contexts/TaskProvider.tsx): `src/contexts/TaskProvider.tsx`
- [Browser storage](https://github.com/maciekt07/todoapp/blob/main/src/hooks/useStorageState.ts): `src/hooks/useStorageState.ts`
- [Categories](https://github.com/maciekt07/todoapp/blob/main/src/pages/Categories.tsx): `src/pages/Categories.tsx`
- [Add task](https://github.com/maciekt07/todoapp/blob/main/src/pages/AddTask.tsx): `src/pages/AddTask.tsx`
- [Task details](https://github.com/maciekt07/todoapp/blob/main/src/pages/TaskDetails.tsx): `src/pages/TaskDetails.tsx`

### Sharing and transfer

- [Task sharing](https://github.com/maciekt07/todoapp/blob/main/src/pages/Share.tsx): `src/pages/Share.tsx`
- [Peer sync](https://github.com/maciekt07/todoapp/blob/main/src/pages/Sync.tsx): `src/pages/Sync.tsx`
- [Import and export](https://github.com/maciekt07/todoapp/blob/main/src/pages/Transfer.tsx): `src/pages/Transfer.tsx`

### Profile and preferences

- [User state](https://github.com/maciekt07/todoapp/blob/main/src/contexts/UserProvider.tsx): `src/contexts/UserProvider.tsx`
- [User profile](https://github.com/maciekt07/todoapp/blob/main/src/pages/UserProfile.tsx): `src/pages/UserProfile.tsx`
- [Profile image store](https://github.com/maciekt07/todoapp/blob/main/src/utils/profilePictureStorage.ts): `src/utils/profilePictureStorage.ts`
- [App settings](https://github.com/maciekt07/todoapp/blob/main/src/components/settings/SettingsDialog.tsx): `src/components/settings/SettingsDialog.tsx`
- [AI emoji suggestions](https://github.com/maciekt07/todoapp/blob/main/src/components/EmojiPicker.tsx): `src/components/EmojiPicker.tsx`
- [Read aloud](https://github.com/maciekt07/todoapp/blob/main/src/components/settings/tabs/ReadAloudTab.tsx): `src/components/settings/tabs/ReadAloudTab.tsx`
- [Theme configuration](https://github.com/maciekt07/todoapp/blob/main/src/theme/themeConfig.ts): `src/theme/themeConfig.ts`

### Other components

- **App user**
- **Browser platform**
- **Other device**

## Connections

- App user → React entry: opens
- React entry → App shell: mounts (evidence: `src/main.tsx`)
- App shell → Route selection: renders (evidence: `src/App.tsx`)
- Route selection → Task home: routes to (evidence: `src/router.tsx`)
- Route selection → Add task: routes to (evidence: `src/router.tsx`)
- Route selection → Categories: routes to (evidence: `src/router.tsx`)
- Route selection → Task details: routes to (evidence: `src/router.tsx`)
- Route selection → Task sharing: routes to (evidence: `src/router.tsx`)
- Route selection → Peer sync: routes to (evidence: `src/router.tsx`)
- Route selection → Import and export: routes to (evidence: `src/router.tsx`)
- Route selection → User profile: routes to (evidence: `src/router.tsx`)
- Task home → Task management: shows tasks
- Task management → Task state: uses task state (evidence: `src/components/tasks/TasksList.tsx`)
- Task state → Browser storage: persists state (evidence: `src/contexts/TaskProvider.tsx`)
- User state → Browser storage: persists state
- Categories → User state: reads user data (evidence: `src/pages/Categories.tsx`)
- Task management → User state: reads user data (evidence: `src/components/tasks/TasksList.tsx`)
- Task sharing → App user: shares by link or QR
- Peer sync → Other device: syncs with
- Peer sync → User state: syncs user data
- Import and export → App user: imports or exports
- User profile → Profile image store: stores images (evidence: `src/pages/UserProfile.tsx`)
- Profile image store → Browser platform: uses IndexedDB (evidence: `src/utils/profilePictureStorage.ts`)
- App settings → Theme configuration: offers themes
- App settings → Read aloud: configures speech
- App settings → AI emoji suggestions: offers suggestions
