# whitemsf/folio architecture

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

- Interactive diagram: https://gitdiagram.com/whitemsf/folio
- Repository: https://github.com/whitemsf/folio

## Overview

Folio is a small native Windows text editor. The documented user workflow is editing text, opening or saving UTF-8 files, and safely replacing files; Unicode filenames are supported. Its Windows UI uses the native EDIT control, while text conversion is kept separate from Windows-specific code. The tree identifies the main, text, and title assembly files, but no source excerpts were provided, so implementation ownership and internal call relationships cannot be verified; edges below reflect README-level capabilities only.

Main entry points: [`src/main.asm`](https://github.com/whitemsf/folio/blob/master/src/main.asm) (Folio editor), [`src/text.asm`](https://github.com/whitemsf/folio/blob/master/src/text.asm) (Text conversion), [`src/title.asm`](https://github.com/whitemsf/folio/blob/master/src/title.asm) (Unicode filenames)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editor["Editor"]
  node_app["Folio editor<br/>[main.asm]"]
  node_edit_control["Win32 EDIT control"]
end

subgraph group_text["Text handling"]
  node_conversion["Text conversion<br/>[text.asm]"]
end

subgraph group_files["File handling"]
  node_file_io["UTF-8 open/save<br/>[main.asm]"]
  node_replacement["Safe replacement<br/>[main.asm]"]
  node_unicode_paths["Unicode filenames<br/>[title.asm]"]
end

node_user(("Editor user"))

node_user -->|"uses"| node_app
node_app -->|"uses"| node_edit_control
node_app -->|"separates"| node_conversion
node_app -->|"opens and saves"| node_file_io
node_app -->|"supports"| node_replacement
node_app -->|"supports"| node_unicode_paths

click node_app "https://github.com/whitemsf/folio/blob/master/src/main.asm"
click node_conversion "https://github.com/whitemsf/folio/blob/master/src/text.asm"
click node_file_io "https://github.com/whitemsf/folio/blob/master/src/main.asm"
click node_replacement "https://github.com/whitemsf/folio/blob/master/src/main.asm"
click node_unicode_paths "https://github.com/whitemsf/folio/blob/master/src/title.asm"

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_edit_control,node_user toneBlue
class node_conversion toneAmber
class node_file_io,node_replacement,node_unicode_paths toneMint
```

## Components

### Editor

- [Folio editor](https://github.com/whitemsf/folio/blob/master/src/main.asm): `src/main.asm`
- **Win32 EDIT control**

### Text handling

- [Text conversion](https://github.com/whitemsf/folio/blob/master/src/text.asm): `src/text.asm`

### File handling

- [UTF-8 open/save](https://github.com/whitemsf/folio/blob/master/src/main.asm): `src/main.asm`
- [Safe replacement](https://github.com/whitemsf/folio/blob/master/src/main.asm): `src/main.asm`
- [Unicode filenames](https://github.com/whitemsf/folio/blob/master/src/title.asm): `src/title.asm`

### Other components

- **Editor user**

## Connections

- Editor user → Folio editor: uses (evidence: `README.md`)
- Folio editor → Win32 EDIT control: uses (evidence: `README.md`)
- Folio editor → Text conversion: separates (evidence: `README.md`)
- Folio editor → UTF-8 open/save: opens and saves (evidence: `README.md`)
- Folio editor → Safe replacement: supports (evidence: `README.md`)
- Folio editor → Unicode filenames: supports (evidence: `README.md`)
