# morepancakestacks/java-notes-diary architecture

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

- Interactive diagram: https://gitdiagram.com/morepancakestacks/java-notes-diary
- Repository: https://github.com/morepancakestacks/java-notes-diary

## Overview

NotesDump is a console-based Java notes manager. The user selects actions in the menu; Main dispatches them to Diary, which handles timestamped add, list, edit, delete, insert, and exit behavior. Diary delegates file creation and line-level reads and writes to FileHandler, using the plain-text notes file for persistence. The README documents these capabilities; the shown source supports the menu dispatch and storage calls. The repository is small, so components share paths where one class owns multiple domain actions.

Main entry points: [`src/diaryapp/Main.java`](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/Main.java) (Menu and dispatch), [`src/diaryapp/Diary.java`](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/Diary.java) (Note operations), [`src/diaryapp/FileHandler.java`](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/FileHandler.java) (File access), [`src/data/notes.txt`](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/data/notes.txt) (Notes text file)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Console entry"]
  node_main["Menu and dispatch<br/>[Main.java]"]
end

subgraph group_notes["Note operations"]
  node_diary["Note operations<br/>[Diary.java]"]
end

subgraph group_storage["File storage"]
  node_filehandler["File access<br/>[FileHandler.java]"]
  node_notesfile["Notes text file<br/>[notes.txt]"]
end

node_user(("Terminal user"))

node_user -->|"chooses action"| node_main
node_main -->|"dispatches add"| node_diary
node_main -->|"dispatches view"| node_diary
node_main -->|"dispatches edit"| node_diary
node_main -->|"dispatches delete"| node_diary
node_main -->|"dispatches insert"| node_diary
node_main -->|"dispatches exit"| node_diary
node_main -->|"checks file"| node_diary
node_diary -->|"requests file operations"| node_filehandler
node_filehandler -->|"creates, appends, writes"| node_notesfile
node_notesfile -->|"provides lines"| node_filehandler

click node_main "https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/Main.java"
click node_diary "https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/Diary.java"
click node_filehandler "https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/FileHandler.java"
click node_notesfile "https://github.com/morepancakestacks/java-notes-diary/blob/main/src/data/notes.txt"

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_main,node_user toneBlue
class node_diary toneAmber
class node_filehandler,node_notesfile toneMint
```

## Components

### Console entry

- [Menu and dispatch](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/Main.java): `src/diaryapp/Main.java`

### Note operations

- [Note operations](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/Diary.java): `src/diaryapp/Diary.java`

### File storage

- [File access](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/diaryapp/FileHandler.java): `src/diaryapp/FileHandler.java`
- [Notes text file](https://github.com/morepancakestacks/java-notes-diary/blob/main/src/data/notes.txt): `src/data/notes.txt`

### Other components

- **Terminal user**

## Connections

- Terminal user → Menu and dispatch: chooses action (evidence: `src/diaryapp/Main.java`)
- Menu and dispatch → Note operations: dispatches add (evidence: `src/diaryapp/Main.java`)
- Menu and dispatch → Note operations: dispatches view (evidence: `src/diaryapp/Main.java`)
- Menu and dispatch → Note operations: dispatches edit (evidence: `src/diaryapp/Main.java`)
- Menu and dispatch → Note operations: dispatches delete (evidence: `src/diaryapp/Main.java`)
- Menu and dispatch → Note operations: dispatches insert (evidence: `src/diaryapp/Main.java`)
- Menu and dispatch → Note operations: dispatches exit (evidence: `src/diaryapp/Main.java`)
- Menu and dispatch → Note operations: checks file (evidence: `src/diaryapp/Main.java`)
- Note operations → File access: requests file operations (evidence: `src/diaryapp/Diary.java`)
- File access → Notes text file: creates, appends, writes (evidence: `src/diaryapp/FileHandler.java`)
- Notes text file → File access: provides lines (evidence: `src/diaryapp/FileHandler.java`)
