# dariiolopeez/easy-notes architecture

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

- Interactive diagram: https://gitdiagram.com/dariiolopeez/easy-notes
- Repository: https://github.com/dariiolopeez/easy-notes

## Overview

easy-notes is a local terminal note manager: users invoke commands to create, list, view, edit, and categorize Markdown notes, with YAML configuration for storage location and editor choice. The root command initializes configuration and filesystem storage; command handlers use those shared dependencies, while the note model parses and serializes frontmatter and the editor adapter launches an external editor. The README documents configuration display and Unix-tool workflows; the configuration command implementation was not sampled, so its connection is shown as unverified.

Main entry points: [`cmd/root/root.go`](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/root.go) (Root setup), [`internal/storage/fs_storage.go`](https://github.com/dariiolopeez/easy-notes/blob/main/internal/storage/fs_storage.go) (Filesystem storage), [`cmd/root/new.go`](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/new.go) (Create note), [`cmd/root/edit.go`](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/edit.go) (Edit note)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI commands"]
  node_entry["CLI entry<br/>[main.go]"]
  node_root["Root setup<br/>[root.go]"]
  node_create["Create note<br/>[new.go]"]
  node_list["List notes<br/>[list.go]"]
  node_view["View note<br/>[view.go]"]
  node_edit["Edit note<br/>[edit.go]"]
  node_category["Manage categories<br/>[category.go]"]
  node_configcmd["Show configuration<br/>[config_cmd.go]"]
end

subgraph group_domain["Note domain"]
  node_model["Note model<br/>[note.go]"]
end

subgraph group_runtime["Runtime services"]
  node_config["Configuration<br/>[config.go]"]
  node_editor["Editor launcher<br/>[editor.go]"]
end

subgraph group_state["Local files"]
  node_storage["Filesystem storage<br/>[fs_storage.go]"]
  node_notesfs[("Markdown note files")]
  node_configfs["YAML config file"]
end

node_user(("Terminal user"))
node_terminal_editor(("External editor"))
node_glamour["Markdown renderer"]

node_user -->|"runs"| node_entry
node_entry -->|"executes"| node_root
node_root -->|"loads"| node_config
node_root -->|"initializes"| node_storage
node_root -->|"registers"| node_create
node_root -->|"registers"| node_list
node_root -->|"registers"| node_view
node_root -->|"registers"| node_edit
node_root -->|"registers"| node_category
node_root -.->|"registers"| node_configcmd
node_config -->|"reads/writes"| node_configfs
node_create -->|"builds note"| node_model
node_create -->|"saves"| node_storage
node_create -->|"resolves editor"| node_config
node_create -->|"opens"| node_editor
node_list -->|"lists"| node_storage
node_view -->|"finds note"| node_storage
node_view -->|"renders with"| node_glamour
node_edit -->|"finds and saves"| node_storage
node_edit -->|"resolves editor"| node_config
node_edit -->|"opens"| node_editor
node_edit -->|"parses note"| node_model
node_category -->|"creates category"| node_storage
node_storage -->|"reads/writes"| node_notesfs
node_storage -->|"parses and marshals"| node_model
node_editor -->|"launches"| node_terminal_editor
node_configcmd -.->|"displays"| node_config

click node_entry "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/easy-notes/main.go"
click node_root "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/root.go"
click node_create "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/new.go"
click node_list "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/list.go"
click node_view "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/view.go"
click node_edit "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/edit.go"
click node_category "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/category.go"
click node_configcmd "https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/config_cmd.go"
click node_model "https://github.com/dariiolopeez/easy-notes/blob/main/internal/note/note.go"
click node_config "https://github.com/dariiolopeez/easy-notes/blob/main/internal/config/config.go"
click node_editor "https://github.com/dariiolopeez/easy-notes/blob/main/internal/editor/editor.go"
click node_storage "https://github.com/dariiolopeez/easy-notes/blob/main/internal/storage/fs_storage.go"

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_root,node_create,node_list,node_view,node_edit,node_category,node_configcmd,node_user toneBlue
class node_model toneAmber
class node_config,node_editor toneMint
class node_storage,node_notesfs,node_configfs toneRose
class node_terminal_editor,node_glamour toneIndigo
```

## Components

### CLI commands

- [CLI entry](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/easy-notes/main.go): `cmd/easy-notes/main.go`
- [Root setup](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/root.go): `cmd/root/root.go`
- [Create note](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/new.go): `cmd/root/new.go`
- [List notes](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/list.go): `cmd/root/list.go`
- [View note](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/view.go): `cmd/root/view.go`
- [Edit note](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/edit.go): `cmd/root/edit.go`
- [Manage categories](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/category.go): `cmd/root/category.go`
- [Show configuration](https://github.com/dariiolopeez/easy-notes/blob/main/cmd/root/config_cmd.go): `cmd/root/config_cmd.go`

### Note domain

- [Note model](https://github.com/dariiolopeez/easy-notes/blob/main/internal/note/note.go): `internal/note/note.go`

### Runtime services

- [Configuration](https://github.com/dariiolopeez/easy-notes/blob/main/internal/config/config.go): `internal/config/config.go`
- [Editor launcher](https://github.com/dariiolopeez/easy-notes/blob/main/internal/editor/editor.go): `internal/editor/editor.go`

### Local files

- [Filesystem storage](https://github.com/dariiolopeez/easy-notes/blob/main/internal/storage/fs_storage.go): `internal/storage/fs_storage.go`
- **Markdown note files**
- **YAML config file**

### Other components

- **Terminal user**
- **External editor**
- **Markdown renderer**

## Connections

- Terminal user → CLI entry: runs (evidence: `README.md`)
- CLI entry → Root setup: executes (evidence: `cmd/easy-notes/main.go`)
- Root setup → Configuration: loads (evidence: `cmd/root/root.go`)
- Root setup → Filesystem storage: initializes (evidence: `cmd/root/root.go`)
- Root setup → Create note: registers (evidence: `cmd/root/new.go`)
- Root setup → List notes: registers (evidence: `cmd/root/list.go`)
- Root setup → View note: registers (evidence: `cmd/root/view.go`)
- Root setup → Edit note: registers (evidence: `cmd/root/edit.go`)
- Root setup → Manage categories: registers (evidence: `cmd/root/category.go`)
- Root setup → Show configuration: registers (evidence: `README.md`)
- Configuration → YAML config file: reads/writes (evidence: `internal/config/config.go`)
- Create note → Note model: builds note (evidence: `cmd/root/new.go`)
- Create note → Filesystem storage: saves (evidence: `cmd/root/new.go`)
- Create note → Configuration: resolves editor (evidence: `cmd/root/new.go`)
- Create note → Editor launcher: opens (evidence: `cmd/root/new.go`)
- List notes → Filesystem storage: lists (evidence: `cmd/root/list.go`)
- View note → Filesystem storage: finds note (evidence: `cmd/root/view.go`)
- View note → Markdown renderer: renders with (evidence: `cmd/root/view.go`)
- Edit note → Filesystem storage: finds and saves (evidence: `cmd/root/edit.go`)
- Edit note → Configuration: resolves editor (evidence: `cmd/root/edit.go`)
- Edit note → Editor launcher: opens (evidence: `cmd/root/edit.go`)
- Edit note → Note model: parses note (evidence: `cmd/root/edit.go`)
- Manage categories → Filesystem storage: creates category (evidence: `cmd/root/category.go`)
- Filesystem storage → Markdown note files: reads/writes (evidence: `internal/storage/fs_storage.go`)
- Filesystem storage → Note model: parses and marshals (evidence: `internal/storage/fs_storage.go`)
- Editor launcher → External editor: launches (evidence: `internal/editor/editor.go`)
- Show configuration → Configuration: displays
