# sioodmy/todo architecture

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

- Interactive diagram: https://gitdiagram.com/sioodmy/todo
- Repository: https://github.com/sioodmy/todo

## Overview

todo is a small Rust command-line task manager. The user invokes a command; `src/main.rs` constructs `Todo` and dispatches to its operations in `src/lib.rs`, which reads and updates a plain-text task file and prints results. The README documents add, edit, list, done, remove, reset/restore, sort, and raw-output capabilities. Source excerpts show task-file handling and reset backups; restore is documented but its implementation was not shown, so that relationship is unverified.

Main entry points: [`src/lib.rs`](https://github.com/sioodmy/todo/blob/master/src/lib.rs) (Todo manager), [`src/main.rs`](https://github.com/sioodmy/todo/blob/master/src/main.rs) (Command dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry"]
  node_cli["Command dispatch<br/>[main.rs]"]
end

subgraph group_tasks["Task operations"]
  node_manager["Todo manager<br/>[lib.rs]"]
  node_entries["Task entries<br/>[lib.rs]"]
end

subgraph group_storage["Local storage"]
  node_taskfile[("Task file")]
  node_backup[("Backup file")]
end

node_user(("User"))
node_terminal["Terminal output"]

node_user -->|"runs command"| node_cli
node_cli -->|"constructs and dispatches"| node_manager
node_manager -->|"loads and updates"| node_taskfile
node_manager -->|"parses and formats"| node_entries
node_manager -->|"backs up on reset"| node_backup
node_manager -.->|"restores backup"| node_backup
node_manager -->|"prints task output"| node_terminal

click node_cli "https://github.com/sioodmy/todo/blob/master/src/main.rs"
click node_manager "https://github.com/sioodmy/todo/blob/master/src/lib.rs"
click node_entries "https://github.com/sioodmy/todo/blob/master/src/lib.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_cli,node_user toneBlue
class node_manager,node_entries toneAmber
class node_taskfile,node_backup toneMint
class node_terminal toneIndigo
```

## Components

### CLI entry

- [Command dispatch](https://github.com/sioodmy/todo/blob/master/src/main.rs): `src/main.rs`

### Task operations

- [Todo manager](https://github.com/sioodmy/todo/blob/master/src/lib.rs): `src/lib.rs`
- [Task entries](https://github.com/sioodmy/todo/blob/master/src/lib.rs): `src/lib.rs`

### Local storage

- **Task file**
- **Backup file**

### Other components

- **User**
- **Terminal output**

## Connections

- User → Command dispatch: runs command (evidence: `README.md`)
- Command dispatch → Todo manager: constructs and dispatches (evidence: `src/main.rs`)
- Todo manager → Task file: loads and updates (evidence: `src/lib.rs`)
- Todo manager → Task entries: parses and formats (evidence: `src/lib.rs`)
- Todo manager → Backup file: backs up on reset (evidence: `src/lib.rs`)
- Todo manager → Backup file: restores backup
- Todo manager → Terminal output: prints task output (evidence: `src/lib.rs`)
