# mate-academy/git-playground-task5 architecture

> Architecture diagram of the GitHub repository mate-academy/git-playground-task5, 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/mate-academy/git-playground-task5
- Repository: https://github.com/mate-academy/git-playground-task5

## Overview

This is a small command-line notes manager. The user invokes `notes.js` to add, list, search, or delete notes; the entry point delegates note operations to `lib/store.js`, which reads and writes the local JSON store. `lib/config.js` supplies the session-timeout value shown by the default command response. The README documents all four commands; source excerpts confirm their dispatch and storage behavior. The generated notes file is not present in the supplied tree, so its path is unspecified.

Main entry points: [`notes.js`](https://github.com/mate-academy/git-playground-task5/blob/main/notes.js) (Command entry), [`lib/store.js`](https://github.com/mate-academy/git-playground-task5/blob/main/lib/store.js) (Notes store), [`lib/config.js`](https://github.com/mate-academy/git-playground-task5/blob/main/lib/config.js) (App config)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("CLI user"))
node_cli["Command entry<br/>[notes.js]"]
node_store["Notes store<br/>[store.js]"]
node_config["App config<br/>[config.js]"]
node_notes_data[("Notes JSON")]

node_user -->|"runs command"| node_cli
node_cli -->|"dispatches add/list/search/delete"| node_store
node_store -->|"reads and writes"| node_notes_data
node_store -->|"returns notes/results"| node_cli
node_cli -->|"reads timeout"| node_config
node_cli -->|"prints output"| node_user

click node_cli "https://github.com/mate-academy/git-playground-task5/blob/main/notes.js"
click node_store "https://github.com/mate-academy/git-playground-task5/blob/main/lib/store.js"
click node_config "https://github.com/mate-academy/git-playground-task5/blob/main/lib/config.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_user toneBlue
class node_cli,node_store,node_config toneTeal
class node_notes_data toneAmber
```

## Components

### Other components

- **CLI user**
- [Command entry](https://github.com/mate-academy/git-playground-task5/blob/main/notes.js): `notes.js`
- [Notes store](https://github.com/mate-academy/git-playground-task5/blob/main/lib/store.js): `lib/store.js`
- [App config](https://github.com/mate-academy/git-playground-task5/blob/main/lib/config.js): `lib/config.js`
- **Notes JSON**

## Connections

- CLI user → Command entry: runs command
- Command entry → Notes store: dispatches add/list/search/delete
- Notes store → Notes JSON: reads and writes
- Notes store → Command entry: returns notes/results
- Command entry → App config: reads timeout
- Command entry → CLI user: prints output
