# swbuana661/git-playground-task4 architecture

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

- Interactive diagram: https://gitdiagram.com/swbuana661/git-playground-task4
- Repository: https://github.com/swbuana661/git-playground-task4

## Overview

This is a small command-line notes app: users add, list, search, and delete notes, with results or status printed to the terminal. The CLI dispatches each command to the store; the store persists notes in a JSON file. The sampled source shows the storage and dispatch behavior; no separate search or domain layer is needed.

Main entry points: [`notes.js`](https://github.com/swbuana661/git-playground-task4/blob/main/notes.js) (CLI commands), [`lib/store.js`](https://github.com/swbuana661/git-playground-task4/blob/main/lib/store.js) (Note store), [`lib/config.js`](https://github.com/swbuana661/git-playground-task4/blob/main/lib/config.js) (App settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command line"]
  node_cli["CLI commands<br/>[notes.js]"]
  node_config["App settings<br/>[config.js]"]
end

subgraph group_notes["Notes and storage"]
  node_store["Note store<br/>[store.js]"]
  node_data[("Notes JSON")]
end

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

node_user -->|"runs command"| node_cli
node_cli -->|"adds notes"| node_store
node_cli -->|"lists notes"| node_store
node_cli -->|"searches notes"| node_store
node_cli -->|"deletes notes"| node_store
node_cli -->|"reads setting"| node_config
node_store -->|"reads and writes"| node_data
node_cli -->|"prints results"| node_terminal

click node_cli "https://github.com/swbuana661/git-playground-task4/blob/main/notes.js"
click node_config "https://github.com/swbuana661/git-playground-task4/blob/main/lib/config.js"
click node_store "https://github.com/swbuana661/git-playground-task4/blob/main/lib/store.js"

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_config,node_user toneBlue
class node_store,node_data toneAmber
class node_terminal toneIndigo
```

## Components

### Command line

- [CLI commands](https://github.com/swbuana661/git-playground-task4/blob/main/notes.js): `notes.js`
- [App settings](https://github.com/swbuana661/git-playground-task4/blob/main/lib/config.js): `lib/config.js`

### Notes and storage

- [Note store](https://github.com/swbuana661/git-playground-task4/blob/main/lib/store.js): `lib/store.js`
- **Notes JSON**

### Other components

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

## Connections

- User → CLI commands: runs command
- CLI commands → Note store: adds notes
- CLI commands → Note store: lists notes
- CLI commands → Note store: searches notes
- CLI commands → Note store: deletes notes
- CLI commands → App settings: reads setting
- Note store → Notes JSON: reads and writes
- CLI commands → Terminal output: prints results
