# githubyoon/memo architecture

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

- Interactive diagram: https://gitdiagram.com/githubyoon/memo
- Repository: https://github.com/githubyoon/memo

## Overview

Memo is a Rust command-line application for creating, listing, deleting, and resetting memos stored as JSON, with Korean/English messages and a separate updater. The main workflow dispatches CLI commands to memo operations backed by the local JSON file. Settings also persist the language choice; update checks compare local and remote versions, ask for confirmation, then download and install a release executable. Relationships are based on the sampled source and README; the updater’s service endpoints are explicit in its source.

Main entry points: [`src/main.rs`](https://github.com/githubyoon/memo/blob/main/src/main.rs) (Command dispatcher), [`src/updater.rs`](https://github.com/githubyoon/memo/blob/main/src/updater.rs) (Update workflow), [`src/language/mod.rs`](https://github.com/githubyoon/memo/blob/main/src/language/mod.rs) (Message lookup), [`src/language/en.rs`](https://github.com/githubyoon/memo/blob/main/src/language/en.rs) (English strings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_entry["Command dispatcher<br/>[main.rs]"]
  node_settings["Language settings<br/>[main.rs]"]
end

subgraph group_memos["Memo storage"]
  node_memo_ops["Memo commands<br/>[main.rs]"]
  node_json_data[("Memo JSON")]
end

subgraph group_localization["Localization"]
  node_language_config["Language preference<br/>[main.rs]"]
  node_language_lookup["Message lookup<br/>[mod.rs]"]
  node_english["English strings<br/>[en.rs]"]
  node_korean["Korean strings<br/>[kr.rs]"]
end

subgraph group_updates["Updating"]
  node_updater_launch["Updater launch<br/>[main.rs]"]
  node_updater["Update workflow<br/>[updater.rs]"]
  node_version_data["Version files"]
end

node_user(("CLI user"))
node_version_service["Version host"]
node_github_api["GitHub releases API"]
node_release_binary["Release executable"]
node_installed_binary["Installed executable"]

node_user -->|"runs commands"| node_entry
node_entry -->|"dispatches memo commands"| node_memo_ops
node_memo_ops -->|"reads and writes"| node_json_data
node_entry -->|"loads preference"| node_language_config
node_settings -->|"saves preference"| node_language_config
node_entry -->|"dispatches settings"| node_settings
node_entry -->|"requests messages"| node_language_lookup
node_updater -->|"requests messages"| node_language_lookup
node_language_lookup -->|"selects strings"| node_english
node_language_lookup -->|"selects strings"| node_korean
node_entry -->|"dispatches update"| node_updater_launch
node_updater_launch -->|"spawns updater"| node_updater
node_updater -->|"fetches version"| node_version_service
node_updater -->|"reads and writes"| node_version_data
node_entry -->|"reads and writes"| node_version_data
node_updater -->|"requests release URL"| node_github_api
node_updater -->|"downloads executable"| node_release_binary
node_updater -->|"installs executable"| node_installed_binary

click node_entry "https://github.com/githubyoon/memo/blob/main/src/main.rs"
click node_settings "https://github.com/githubyoon/memo/blob/main/src/main.rs"
click node_memo_ops "https://github.com/githubyoon/memo/blob/main/src/main.rs"
click node_language_config "https://github.com/githubyoon/memo/blob/main/src/main.rs"
click node_language_lookup "https://github.com/githubyoon/memo/blob/main/src/language/mod.rs"
click node_english "https://github.com/githubyoon/memo/blob/main/src/language/en.rs"
click node_korean "https://github.com/githubyoon/memo/blob/main/src/language/kr.rs"
click node_updater_launch "https://github.com/githubyoon/memo/blob/main/src/main.rs"
click node_updater "https://github.com/githubyoon/memo/blob/main/src/updater.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_entry,node_settings,node_user toneBlue
class node_memo_ops,node_json_data toneAmber
class node_language_config,node_language_lookup,node_english,node_korean,node_github_api toneMint
class node_updater_launch,node_updater,node_version_data toneRose
class node_version_service,node_release_binary,node_installed_binary toneIndigo
```

## Components

### CLI

- [Command dispatcher](https://github.com/githubyoon/memo/blob/main/src/main.rs): `src/main.rs`
- [Language settings](https://github.com/githubyoon/memo/blob/main/src/main.rs): `src/main.rs`

### Memo storage

- [Memo commands](https://github.com/githubyoon/memo/blob/main/src/main.rs): `src/main.rs`
- **Memo JSON**

### Localization

- [Language preference](https://github.com/githubyoon/memo/blob/main/src/main.rs): `src/main.rs`
- [Message lookup](https://github.com/githubyoon/memo/blob/main/src/language/mod.rs): `src/language/mod.rs`
- [English strings](https://github.com/githubyoon/memo/blob/main/src/language/en.rs): `src/language/en.rs`
- [Korean strings](https://github.com/githubyoon/memo/blob/main/src/language/kr.rs): `src/language/kr.rs`

### Updating

- [Updater launch](https://github.com/githubyoon/memo/blob/main/src/main.rs): `src/main.rs`
- [Update workflow](https://github.com/githubyoon/memo/blob/main/src/updater.rs): `src/updater.rs`
- **Version files**

### Other components

- **CLI user**
- **Version host**
- **GitHub releases API**
- **Release executable**
- **Installed executable**

## Connections

- CLI user → Command dispatcher: runs commands (evidence: `src/main.rs`)
- Command dispatcher → Memo commands: dispatches memo commands (evidence: `src/main.rs`)
- Memo commands → Memo JSON: reads and writes (evidence: `src/main.rs`)
- Command dispatcher → Language preference: loads preference (evidence: `src/main.rs`)
- Language settings → Language preference: saves preference (evidence: `src/main.rs`)
- Command dispatcher → Language settings: dispatches settings (evidence: `src/main.rs`)
- Command dispatcher → Message lookup: requests messages (evidence: `src/main.rs`)
- Update workflow → Message lookup: requests messages (evidence: `src/updater.rs`)
- Message lookup → English strings: selects strings (evidence: `src/language/mod.rs`)
- Message lookup → Korean strings: selects strings (evidence: `src/language/mod.rs`)
- Command dispatcher → Updater launch: dispatches update (evidence: `src/main.rs`)
- Updater launch → Update workflow: spawns updater (evidence: `src/main.rs`)
- Update workflow → Version host: fetches version (evidence: `src/updater.rs`)
- Update workflow → Version files: reads and writes (evidence: `src/updater.rs`)
- Command dispatcher → Version files: reads and writes (evidence: `src/main.rs`)
- Update workflow → GitHub releases API: requests release URL (evidence: `src/updater.rs`)
- Update workflow → Release executable: downloads executable (evidence: `src/updater.rs`)
- Update workflow → Installed executable: installs executable (evidence: `src/updater.rs`)
