# usrdefault/tally architecture

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

- Interactive diagram: https://gitdiagram.com/usrdefault/tally
- Repository: https://github.com/usrdefault/tally

## Overview

Tally is a task-list app for Windows and the web. Users add, categorize, date, filter, complete, and manually reorder tasks; local changes persist automatically. Optional accounts add Discord sign-in, cross-device synchronization, invitations, and shared-task state. The frontend also provides settings and localized desktop behavior. The graph includes documented product branches whose detailed implementations were not sampled; those links are cited to the README rather than implying source inspection.

Main entry points: [`src/App.tsx`](https://github.com/usrdefault/tally/blob/main/src/App.tsx) (App shell), [`api/index.php`](https://github.com/usrdefault/tally/blob/main/api/index.php) (API router), [`src/components/SettingsPanel.tsx`](https://github.com/usrdefault/tally/blob/main/src/components/SettingsPanel.tsx) (Settings panel), [`src/hooks/useTasks.ts`](https://github.com/usrdefault/tally/blob/main/src/hooks/useTasks.ts) (Task state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Task experience"]
  node_app["App shell<br/>[App.tsx]"]
  node_taskui["Task interface<br/>[TaskList.tsx]"]
  node_taskrow["Task row<br/>[TaskRow.tsx]"]
  node_composer["Task composer<br/>[TaskComposer.tsx]"]
  node_filters["Filters and progress<br/>[FilterBar.tsx]"]
  node_settingsui["Settings panel<br/>[SettingsPanel.tsx]"]
  node_sharingui["Sharing interface<br/>[Sharing.tsx]"]
end

subgraph group_data["Local data and account"]
  node_taskstate["Task state<br/>[useTasks.ts]"]
  node_taskmodel["Task operations<br/>[tasks.ts]"]
  node_localstore[("Browser storage<br/>[storage.ts]")]
  node_categories["Category state<br/>[categories.ts]"]
  node_accountstate["Account and sync state<br/>[useAccount.ts]"]
  node_accountclient["Account API client<br/>[account.ts]"]
end

subgraph group_server["Web service"]
  node_api["API router<br/>[index.php]"]
  node_auth["Authentication<br/>[auth.php]"]
  node_discord["Discord login<br/>[discord.php]"]
  node_sync["Synchronization<br/>[sync.php]"]
  node_sharing["Sharing service<br/>[share.php]"]
  node_serverstore[("Server data store<br/>[store.php]")]
end

subgraph group_desktop["Desktop runtime"]
  node_desktop["Tauri desktop shell<br/>[lib.rs]"]
  node_desktopprefs["Desktop preferences<br/>[autostart.rs]"]
  node_updates["Update checker<br/>[update_checker.rs]"]
end

node_user(("User"))
node_discordservice(("Discord"))

node_user -->|"uses"| node_app
node_app -->|"loads"| node_taskstate
node_app -.->|"shows"| node_taskui
node_app -.->|"offers"| node_composer
node_app -.->|"offers"| node_filters
node_app -.->|"offers"| node_settingsui
node_taskui -.->|"renders"| node_taskrow
node_taskrow -->|"renders"| node_sharingui
node_taskstate -->|"updates with"| node_taskmodel
node_taskstate -->|"reads and writes"| node_localstore
node_app -->|"loads"| node_categories
node_app -->|"loads"| node_accountstate
node_accountstate -->|"calls"| node_accountclient
node_settingsui -->|"configures"| node_accountstate
node_sharingui -->|"uses"| node_accountclient
node_accountclient -->|"requests"| node_api
node_api -->|"dispatches to"| node_auth
node_api -->|"dispatches to"| node_discord
node_api -->|"dispatches to"| node_sync
node_api -->|"dispatches to"| node_sharing
node_api -->|"uses"| node_serverstore
node_discord -.->|"authenticates with"| node_discordservice
node_app -.->|"runs in"| node_desktop
node_settingsui -->|"sets autostart"| node_desktopprefs
node_app -->|"checks updates"| node_updates

click node_app "https://github.com/usrdefault/tally/blob/main/src/App.tsx"
click node_taskui "https://github.com/usrdefault/tally/blob/main/src/components/TaskList.tsx"
click node_taskrow "https://github.com/usrdefault/tally/blob/main/src/components/TaskRow.tsx"
click node_composer "https://github.com/usrdefault/tally/blob/main/src/components/TaskComposer.tsx"
click node_filters "https://github.com/usrdefault/tally/blob/main/src/components/FilterBar.tsx"
click node_settingsui "https://github.com/usrdefault/tally/blob/main/src/components/SettingsPanel.tsx"
click node_sharingui "https://github.com/usrdefault/tally/blob/main/src/components/Sharing.tsx"
click node_taskstate "https://github.com/usrdefault/tally/blob/main/src/hooks/useTasks.ts"
click node_taskmodel "https://github.com/usrdefault/tally/blob/main/src/lib/tasks.ts"
click node_localstore "https://github.com/usrdefault/tally/blob/main/src/lib/storage.ts"
click node_categories "https://github.com/usrdefault/tally/blob/main/src/lib/categories.ts"
click node_accountstate "https://github.com/usrdefault/tally/blob/main/src/hooks/useAccount.ts"
click node_accountclient "https://github.com/usrdefault/tally/blob/main/src/lib/account.ts"
click node_api "https://github.com/usrdefault/tally/blob/main/api/index.php"
click node_auth "https://github.com/usrdefault/tally/blob/main/api/lib/auth.php"
click node_discord "https://github.com/usrdefault/tally/blob/main/api/lib/discord.php"
click node_sync "https://github.com/usrdefault/tally/blob/main/api/lib/sync.php"
click node_sharing "https://github.com/usrdefault/tally/blob/main/api/lib/share.php"
click node_serverstore "https://github.com/usrdefault/tally/blob/main/api/lib/store.php"
click node_desktop "https://github.com/usrdefault/tally/blob/main/src-tauri/src/lib.rs"
click node_desktopprefs "https://github.com/usrdefault/tally/blob/main/src-tauri/src/autostart.rs"
click node_updates "https://github.com/usrdefault/tally/blob/main/src-tauri/src/updates/update_checker.rs"

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_app,node_taskui,node_taskrow,node_composer,node_filters,node_settingsui,node_sharingui,node_user toneBlue
class node_taskstate,node_taskmodel,node_localstore,node_categories,node_accountstate,node_accountclient toneAmber
class node_api,node_auth,node_discord,node_sync,node_sharing,node_serverstore toneMint
class node_desktop,node_desktopprefs,node_updates toneRose
class node_discordservice toneIndigo
```

## Components

### Task experience

- [App shell](https://github.com/usrdefault/tally/blob/main/src/App.tsx): `src/App.tsx`
- [Task interface](https://github.com/usrdefault/tally/blob/main/src/components/TaskList.tsx): `src/components/TaskList.tsx`
- [Task row](https://github.com/usrdefault/tally/blob/main/src/components/TaskRow.tsx): `src/components/TaskRow.tsx`
- [Task composer](https://github.com/usrdefault/tally/blob/main/src/components/TaskComposer.tsx): `src/components/TaskComposer.tsx`
- [Filters and progress](https://github.com/usrdefault/tally/blob/main/src/components/FilterBar.tsx): `src/components/FilterBar.tsx`
- [Settings panel](https://github.com/usrdefault/tally/blob/main/src/components/SettingsPanel.tsx): `src/components/SettingsPanel.tsx`
- [Sharing interface](https://github.com/usrdefault/tally/blob/main/src/components/Sharing.tsx): `src/components/Sharing.tsx`

### Local data and account

- [Task state](https://github.com/usrdefault/tally/blob/main/src/hooks/useTasks.ts): `src/hooks/useTasks.ts`
- [Task operations](https://github.com/usrdefault/tally/blob/main/src/lib/tasks.ts): `src/lib/tasks.ts`
- [Browser storage](https://github.com/usrdefault/tally/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [Category state](https://github.com/usrdefault/tally/blob/main/src/lib/categories.ts): `src/lib/categories.ts`
- [Account and sync state](https://github.com/usrdefault/tally/blob/main/src/hooks/useAccount.ts): `src/hooks/useAccount.ts`
- [Account API client](https://github.com/usrdefault/tally/blob/main/src/lib/account.ts): `src/lib/account.ts`

### Web service

- [API router](https://github.com/usrdefault/tally/blob/main/api/index.php): `api/index.php`
- [Authentication](https://github.com/usrdefault/tally/blob/main/api/lib/auth.php): `api/lib/auth.php`
- [Discord login](https://github.com/usrdefault/tally/blob/main/api/lib/discord.php): `api/lib/discord.php`
- [Synchronization](https://github.com/usrdefault/tally/blob/main/api/lib/sync.php): `api/lib/sync.php`
- [Sharing service](https://github.com/usrdefault/tally/blob/main/api/lib/share.php): `api/lib/share.php`
- [Server data store](https://github.com/usrdefault/tally/blob/main/api/lib/store.php): `api/lib/store.php`

### Desktop runtime

- [Tauri desktop shell](https://github.com/usrdefault/tally/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Desktop preferences](https://github.com/usrdefault/tally/blob/main/src-tauri/src/autostart.rs): `src-tauri/src/autostart.rs`
- [Update checker](https://github.com/usrdefault/tally/blob/main/src-tauri/src/updates/update_checker.rs): `src-tauri/src/updates/update_checker.rs`

### Other components

- **User**
- **Discord**

## Connections

- User → App shell: uses
- App shell → Task state: loads (evidence: `src/App.tsx`)
- App shell → Task interface: shows (evidence: `src/App.tsx`)
- App shell → Task composer: offers (evidence: `src/App.tsx`)
- App shell → Filters and progress: offers (evidence: `src/App.tsx`)
- App shell → Settings panel: offers (evidence: `src/App.tsx`)
- Task interface → Task row: renders
- Task row → Sharing interface: renders (evidence: `src/components/TaskRow.tsx`)
- Task state → Task operations: updates with (evidence: `src/hooks/useTasks.ts`)
- Task state → Browser storage: reads and writes (evidence: `src/hooks/useTasks.ts`)
- App shell → Category state: loads (evidence: `src/App.tsx`)
- App shell → Account and sync state: loads (evidence: `src/App.tsx`)
- Account and sync state → Account API client: calls (evidence: `src/hooks/useAccount.ts`)
- Settings panel → Account and sync state: configures (evidence: `src/components/SettingsPanel.tsx`)
- Sharing interface → Account API client: uses (evidence: `src/components/Sharing.tsx`)
- Account API client → API router: requests (evidence: `src/lib/account.ts`)
- API router → Authentication: dispatches to (evidence: `api/index.php`)
- API router → Discord login: dispatches to (evidence: `api/index.php`)
- API router → Synchronization: dispatches to (evidence: `api/index.php`)
- API router → Sharing service: dispatches to (evidence: `api/index.php`)
- API router → Server data store: uses (evidence: `api/index.php`)
- Discord login → Discord: authenticates with
- App shell → Tauri desktop shell: runs in
- Settings panel → Desktop preferences: sets autostart (evidence: `src/components/SettingsPanel.tsx`)
- App shell → Update checker: checks updates (evidence: `src/App.tsx`)
