# elijah-mclellan/tailburrow architecture

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

- Interactive diagram: https://gitdiagram.com/elijah-mclellan/tailburrow
- Repository: https://github.com/elijah-mclellan/tailburrow

## Overview

TailBurrow is a local-first Tauri desktop archive for browsing and managing furry-art media. Users configure a library and source credentials, import or sync favorites, then search, view, edit, and organize archived items; e621 feeds and comics/pools add remote browsing paths. The graph distinguishes the React entry and feature surfaces from the Rust command boundary, storage, and source adapters. Several backend and UI files were not sampled, so uncertain internal call wiring is omitted; documented capabilities are represented without asserting unverified call sequences.

Main entry points: [`src-tauri/src/commands.rs`](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/commands.rs) (Tauri commands), [`src/App.tsx`](https://github.com/elijah-mclellan/tailburrow/blob/main/src/App.tsx) (React app entry), [`src-tauri/src/library.rs`](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/library.rs) (Library files), [`src/components/SettingsPanel.tsx`](https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/SettingsPanel.tsx) (Settings panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop experience"]
  node_app["React app entry<br/>[App.tsx]"]
  node_favorites["Library workspace"]
  node_settings["Settings panel<br/>[SettingsPanel.tsx]"]
end

subgraph group_library["Library workflow"]
  node_library_hook["Library state<br/>[useLibraryData.ts]"]
  node_library_panel["Library browsing<br/>[LibraryPanel.tsx]"]
  node_viewer["Media viewer<br/>[ViewerOverlay.tsx]"]
  node_comics["Comic reader<br/>[ComicsPanel.tsx]"]
end

subgraph group_sources["Sources and sync"]
  node_feeds["e621 feeds<br/>[FeedsPanel.tsx]"]
  node_sync_hook["Sync controls<br/>[useSyncState.ts]"]
  node_fa["FurAffinity adapter<br/>[fa.rs]"]
  node_twitter["Twitter adapter<br/>[twitter.rs]"]
  node_e621["e621 service"]
end

subgraph group_backend["Rust services"]
  node_lock_hook["Lock state<br/>[useAppLock.ts]"]
  node_commands["Tauri commands<br/>[commands.rs]"]
  node_db[("SQLite database<br/>[db.rs]")]
  node_library_service["Library files<br/>[library.rs]"]
  node_config["App configuration<br/>[config.rs]"]
  node_media_store[("Local media files")]
  node_comics_cache[("Pool cache<br/>[db.rs]")]
end

node_user(("Desktop user"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_favorites
node_library_hook -->|"invokes"| node_commands
node_sync_hook -->|"invokes"| node_commands
node_lock_hook -->|"invokes"| node_commands
node_settings -->|"invokes"| node_commands
node_feeds -.->|"searches"| node_e621
node_commands -->|"reads and writes"| node_db
node_commands -->|"manages files"| node_library_service
node_commands -->|"loads and saves"| node_config
node_commands -->|"dispatches sync"| node_fa
node_commands -->|"dispatches sync"| node_twitter
node_commands -->|"fetches and syncs"| node_e621
node_library_service -->|"stores media"| node_media_store
node_commands -->|"caches pools"| node_comics_cache

click node_app "https://github.com/elijah-mclellan/tailburrow/blob/main/src/App.tsx"
click node_favorites "https://github.com/elijah-mclellan/tailburrow/blob/main/src/FavoritesViewer.tsx"
click node_settings "https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/SettingsPanel.tsx"
click node_library_hook "https://github.com/elijah-mclellan/tailburrow/blob/main/src/hooks/useLibraryData.ts"
click node_library_panel "https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/LibraryPanel.tsx"
click node_viewer "https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/ViewerOverlay.tsx"
click node_comics "https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/ComicsPanel.tsx"
click node_feeds "https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/FeedsPanel.tsx"
click node_sync_hook "https://github.com/elijah-mclellan/tailburrow/blob/main/src/hooks/useSyncState.ts"
click node_lock_hook "https://github.com/elijah-mclellan/tailburrow/blob/main/src/hooks/useAppLock.ts"
click node_commands "https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/commands.rs"
click node_db "https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/db.rs"
click node_library_service "https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/library.rs"
click node_config "https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/config.rs"
click node_fa "https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/fa.rs"
click node_twitter "https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/twitter.rs"
click node_comics_cache "https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/db.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_favorites,node_settings,node_user toneBlue
class node_library_hook,node_library_panel,node_viewer,node_comics toneAmber
class node_feeds,node_sync_hook,node_fa,node_twitter,node_e621 toneMint
class node_lock_hook,node_commands,node_db,node_library_service,node_config,node_media_store,node_comics_cache toneRose
```

## Components

### Desktop experience

- [React app entry](https://github.com/elijah-mclellan/tailburrow/blob/main/src/App.tsx): `src/App.tsx`
- [Library workspace](https://github.com/elijah-mclellan/tailburrow/blob/main/src/FavoritesViewer.tsx): `src/FavoritesViewer.tsx`
- [Settings panel](https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/SettingsPanel.tsx): `src/components/SettingsPanel.tsx`

### Library workflow

- [Library state](https://github.com/elijah-mclellan/tailburrow/blob/main/src/hooks/useLibraryData.ts): `src/hooks/useLibraryData.ts`
- [Library browsing](https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/LibraryPanel.tsx): `src/components/LibraryPanel.tsx`
- [Media viewer](https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/ViewerOverlay.tsx): `src/components/ViewerOverlay.tsx`
- [Comic reader](https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/ComicsPanel.tsx): `src/components/ComicsPanel.tsx`

### Sources and sync

- [e621 feeds](https://github.com/elijah-mclellan/tailburrow/blob/main/src/components/FeedsPanel.tsx): `src/components/FeedsPanel.tsx`
- [Sync controls](https://github.com/elijah-mclellan/tailburrow/blob/main/src/hooks/useSyncState.ts): `src/hooks/useSyncState.ts`
- [FurAffinity adapter](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/fa.rs): `src-tauri/src/fa.rs`
- [Twitter adapter](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/twitter.rs): `src-tauri/src/twitter.rs`
- **e621 service**

### Rust services

- [Lock state](https://github.com/elijah-mclellan/tailburrow/blob/main/src/hooks/useAppLock.ts): `src/hooks/useAppLock.ts`
- [Tauri commands](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/commands.rs): `src-tauri/src/commands.rs`
- [SQLite database](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/db.rs): `src-tauri/src/db.rs`
- [Library files](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/library.rs): `src-tauri/src/library.rs`
- [App configuration](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/config.rs): `src-tauri/src/config.rs`
- **Local media files**
- [Pool cache](https://github.com/elijah-mclellan/tailburrow/blob/main/src-tauri/src/db.rs): `src-tauri/src/db.rs`

### Other components

- **Desktop user**

## Connections

- Desktop user → React app entry: opens
- React app entry → Library workspace: renders
- Library state → Tauri commands: invokes
- Sync controls → Tauri commands: invokes
- Lock state → Tauri commands: invokes
- Settings panel → Tauri commands: invokes
- e621 feeds → e621 service: searches
- Tauri commands → SQLite database: reads and writes
- Tauri commands → Library files: manages files
- Tauri commands → App configuration: loads and saves
- Tauri commands → FurAffinity adapter: dispatches sync
- Tauri commands → Twitter adapter: dispatches sync
- Tauri commands → e621 service: fetches and syncs
- Library files → Local media files: stores media
- Tauri commands → Pool cache: caches pools
