# 0x7c13/notepads architecture

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

- Interactive diagram: https://gitdiagram.com/0x7c13/notepads
- Repository: https://github.com/0x7c13/notepads

## Overview

Notepads is a lightweight Windows text editor organized around launching or opening files, editing them in tabbed Sets, and preserving or exporting work. The README documents Markdown preview, side-by-side diff, command-line launch, handwriting, and session snapshots; the tree identifies their implementation areas. The graph connects only relationships supported by the README or the supplied source index/excerpts. Several feature implementations were not sampled, so their internal call paths are left unspecified.

Main entry points: [`src/Notepads/App.xaml.cs`](https://github.com/0x7c13/notepads/blob/master/src/Notepads/App.xaml.cs) (Application startup), [`src/Notepads/Views/MainPage/NotepadsMainPage.xaml.cs`](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Views/MainPage/NotepadsMainPage.xaml.cs) (Main page), [`src/Notepads/Services/ActivationService.cs`](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/ActivationService.cs) (Activation service), [`src/Notepads/Controls/TextEditor/TextEditorCore.cs`](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Controls/TextEditor/TextEditorCore.cs) (Text editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App lifecycle"]
  node_app["Application startup<br/>[App.xaml.cs]"]
  node_activation["Activation service"]
  node_mainpage["Main page"]
  node_sets["Tabbed Sets<br/>[SetsView.cs]"]
end

subgraph group_edit["Editing and files"]
  node_editor["Text editor<br/>[TextEditorCore.cs]"]
  node_textfile["Text file model<br/>[TextFile.cs]"]
  node_fileio["File operations"]
  node_filesystem["Filesystem utilities"]
  node_session["Session snapshots<br/>[SessionManager.cs]"]
  node_sessiondata["Session metadata"]
end

subgraph group_features["Editor features"]
  node_markdown["Markdown preview"]
  node_markdownui["Markdown control"]
  node_diff["Diff viewer"]
  node_find["Find and replace"]
  node_commands["Command handlers"]
end

subgraph group_platform["Settings and services"]
  node_settings["Application settings"]
  node_theme["Theme settings"]
  node_analytics["Usage telemetry"]
end

node_user(("Editor user"))
node_cli(("CLI launch"))

node_user -.->|"launches"| node_app
node_cli -->|"launches"| node_app
node_app -->|"activates"| node_activation
node_activation -.->|"routes to"| node_mainpage
node_mainpage -.->|"hosts tabs"| node_sets
node_user -.->|"edits text"| node_editor
node_mainpage -.->|"opens and saves"| node_fileio
node_fileio -.->|"uses"| node_filesystem
node_editor -->|"edits"| node_textfile
node_mainpage -.->|"snapshots session"| node_session
node_session -->|"stores"| node_sessiondata
node_user -->|"previews Markdown"| node_markdownui
node_markdownui -.->|"parses"| node_markdown
node_user -->|"compares changes"| node_diff
node_user -.->|"searches text"| node_find
node_user -->|"uses shortcuts"| node_commands
node_app -->|"initializes"| node_settings
node_app -->|"initializes"| node_theme
node_app -->|"tracks events"| node_analytics

click node_app "https://github.com/0x7c13/notepads/blob/master/src/Notepads/App.xaml.cs"
click node_activation "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/ActivationService.cs"
click node_mainpage "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Views/MainPage/NotepadsMainPage.xaml.cs"
click node_sets "https://github.com/0x7c13/notepads/blob/master/src/Notepads.Controls/SetsView/SetsView.cs"
click node_editor "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Controls/TextEditor/TextEditorCore.cs"
click node_textfile "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Models/TextFile.cs"
click node_fileio "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Views/MainPage/NotepadsMainPage.IO.cs"
click node_filesystem "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Utilities/FileSystemUtility.cs"
click node_session "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Core/SessionManager.cs"
click node_sessiondata "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Core/SessionDataModels/NotepadsSessionData.cs"
click node_markdown "https://github.com/0x7c13/notepads/blob/master/src/Notepads.Controls/MarkdownTextBlock/Markdown/MarkdownDocument.cs"
click node_markdownui "https://github.com/0x7c13/notepads/blob/master/src/Notepads.Controls/MarkdownTextBlock/MarkdownTextBlock.cs"
click node_diff "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Controls/DiffViewer/SideBySideDiffViewer.xaml.cs"
click node_find "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Controls/FindAndReplace/FindAndReplaceControl.xaml.cs"
click node_commands "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Commands/KeyboardCommandHandler.cs"
click node_settings "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/AppSettingsService.cs"
click node_theme "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/ThemeSettingsService.cs"
click node_analytics "https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/AnalyticsService.cs"

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_app,node_activation,node_mainpage,node_sets,node_user toneBlue
class node_editor,node_textfile,node_fileio,node_filesystem,node_session,node_sessiondata toneAmber
class node_markdown,node_markdownui,node_diff,node_find,node_commands toneMint
class node_settings,node_theme,node_analytics toneRose
class node_cli toneIndigo
```

## Components

### App lifecycle

- [Application startup](https://github.com/0x7c13/notepads/blob/master/src/Notepads/App.xaml.cs): `src/Notepads/App.xaml.cs`
- [Activation service](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/ActivationService.cs): `src/Notepads/Services/ActivationService.cs`
- [Main page](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Views/MainPage/NotepadsMainPage.xaml.cs): `src/Notepads/Views/MainPage/NotepadsMainPage.xaml.cs`
- [Tabbed Sets](https://github.com/0x7c13/notepads/blob/master/src/Notepads.Controls/SetsView/SetsView.cs): `src/Notepads.Controls/SetsView/SetsView.cs`

### Editing and files

- [Text editor](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Controls/TextEditor/TextEditorCore.cs): `src/Notepads/Controls/TextEditor/TextEditorCore.cs`
- [Text file model](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Models/TextFile.cs): `src/Notepads/Models/TextFile.cs`
- [File operations](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Views/MainPage/NotepadsMainPage.IO.cs): `src/Notepads/Views/MainPage/NotepadsMainPage.IO.cs`
- [Filesystem utilities](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Utilities/FileSystemUtility.cs): `src/Notepads/Utilities/FileSystemUtility.cs`
- [Session snapshots](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Core/SessionManager.cs): `src/Notepads/Core/SessionManager.cs`
- [Session metadata](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Core/SessionDataModels/NotepadsSessionData.cs): `src/Notepads/Core/SessionDataModels/NotepadsSessionData.cs`

### Editor features

- [Markdown preview](https://github.com/0x7c13/notepads/blob/master/src/Notepads.Controls/MarkdownTextBlock/Markdown/MarkdownDocument.cs): `src/Notepads.Controls/MarkdownTextBlock/Markdown/MarkdownDocument.cs`
- [Markdown control](https://github.com/0x7c13/notepads/blob/master/src/Notepads.Controls/MarkdownTextBlock/MarkdownTextBlock.cs): `src/Notepads.Controls/MarkdownTextBlock/MarkdownTextBlock.cs`
- [Diff viewer](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Controls/DiffViewer/SideBySideDiffViewer.xaml.cs): `src/Notepads/Controls/DiffViewer/SideBySideDiffViewer.xaml.cs`
- [Find and replace](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Controls/FindAndReplace/FindAndReplaceControl.xaml.cs): `src/Notepads/Controls/FindAndReplace/FindAndReplaceControl.xaml.cs`
- [Command handlers](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Commands/KeyboardCommandHandler.cs): `src/Notepads/Commands/KeyboardCommandHandler.cs`

### Settings and services

- [Application settings](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/AppSettingsService.cs): `src/Notepads/Services/AppSettingsService.cs`
- [Theme settings](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/ThemeSettingsService.cs): `src/Notepads/Services/ThemeSettingsService.cs`
- [Usage telemetry](https://github.com/0x7c13/notepads/blob/master/src/Notepads/Services/AnalyticsService.cs): `src/Notepads/Services/AnalyticsService.cs`

### Other components

- **Editor user**
- **CLI launch**

## Connections

- Editor user → Application startup: launches (evidence: `README.md`)
- CLI launch → Application startup: launches (evidence: `README.md`)
- Application startup → Activation service: activates (evidence: `src/Notepads/App.xaml.cs`)
- Activation service → Main page: routes to
- Main page → Tabbed Sets: hosts tabs (evidence: `README.md`)
- Editor user → Text editor: edits text (evidence: `README.md`)
- Main page → File operations: opens and saves (evidence: `README.md`)
- File operations → Filesystem utilities: uses
- Text editor → Text file model: edits
- Main page → Session snapshots: snapshots session (evidence: `README.md`)
- Session snapshots → Session metadata: stores (evidence: `src/Notepads/Core/SessionManager.cs`)
- Editor user → Markdown control: previews Markdown (evidence: `README.md`)
- Markdown control → Markdown preview: parses
- Editor user → Diff viewer: compares changes (evidence: `README.md`)
- Editor user → Find and replace: searches text
- Editor user → Command handlers: uses shortcuts (evidence: `README.md`)
- Application startup → Application settings: initializes (evidence: `src/Notepads/App.xaml.cs`)
- Application startup → Theme settings: initializes (evidence: `src/Notepads/App.xaml.cs`)
- Application startup → Usage telemetry: tracks events (evidence: `src/Notepads/App.xaml.cs`)
