# cluesurf/tone architecture

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

- Interactive diagram: https://gitdiagram.com/cluesurf/tone
- Repository: https://github.com/cluesurf/tone

## Overview

Tone is a phonetic writing-system package whose core workflow converts Talk Text-style input into Tone-compatible glyph encoding, backed by a catalog of sound symbols and variations. The README also presents the script’s font and a Keyman keyboard as user-facing capabilities. The sampled source shows the converter and keyboard runtime registration; the README documents the font and broader phonology and numerology material. Other site/editor behavior is not represented because its implementation is not shown.

Main entry points: [`index.ts`](https://github.com/cluesurf/tone/blob/make/index.ts) (Text converter), [`text/keyboard/tone.js`](https://github.com/cluesurf/tone/blob/make/text/keyboard/tone.js) (Tone keyboard), [`text/ToneEtch.otf`](https://github.com/cluesurf/tone/blob/make/text/ToneEtch.otf) (ToneEtch font)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Script and encoding"]
  node_converter["Text converter<br/>[index.ts]"]
  node_symbols["Sound symbols<br/>[index.ts]"]
end

subgraph group_access["User-facing resources"]
  node_font["ToneEtch font<br/>[ToneEtch.otf]"]
  node_keyboard["Tone keyboard<br/>[tone.js]"]
  node_phonology["Phonology guide<br/>[readme.md]"]
  node_numerology["Numerology guide<br/>[readme.md]"]
end

node_user(("Writer"))
node_script_tree["Script-tree library"]
node_keyman["KeymanWeb runtime"]

node_user -->|"provides text"| node_converter
node_converter -->|"encodes from"| node_symbols
node_converter -->|"forms text"| node_script_tree
node_user -->|"uses glyphs"| node_font
node_keyboard -->|"registers with"| node_keyman
node_user -.->|"types with"| node_keyboard

click node_converter "https://github.com/cluesurf/tone/blob/make/index.ts"
click node_symbols "https://github.com/cluesurf/tone/blob/make/index.ts"
click node_font "https://github.com/cluesurf/tone/blob/make/text/ToneEtch.otf"
click node_keyboard "https://github.com/cluesurf/tone/blob/make/text/keyboard/tone.js"
click node_phonology "https://github.com/cluesurf/tone/blob/make/readme.md"
click node_numerology "https://github.com/cluesurf/tone/blob/make/readme.md"

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_converter,node_symbols toneBlue
class node_font,node_keyboard,node_phonology,node_numerology toneAmber
class node_user,node_script_tree,node_keyman toneIndigo
```

## Components

### Script and encoding

- [Text converter](https://github.com/cluesurf/tone/blob/make/index.ts): `index.ts`
- [Sound symbols](https://github.com/cluesurf/tone/blob/make/index.ts): `index.ts`

### User-facing resources

- [ToneEtch font](https://github.com/cluesurf/tone/blob/make/text/ToneEtch.otf): `text/ToneEtch.otf`
- [Tone keyboard](https://github.com/cluesurf/tone/blob/make/text/keyboard/tone.js): `text/keyboard/tone.js`
- [Phonology guide](https://github.com/cluesurf/tone/blob/make/readme.md): `readme.md`
- [Numerology guide](https://github.com/cluesurf/tone/blob/make/readme.md): `readme.md`

### Other components

- **Writer**
- **Script-tree library**
- **KeymanWeb runtime**

## Connections

- Writer → Text converter: provides text (evidence: `readme.md`)
- Text converter → Sound symbols: encodes from (evidence: `index.ts`)
- Text converter → Script-tree library: forms text (evidence: `index.ts`)
- Writer → ToneEtch font: uses glyphs (evidence: `readme.md`)
- Tone keyboard → KeymanWeb runtime: registers with (evidence: `text/keyboard/tone.js`)
- Writer → Tone keyboard: types with
