Architecture
The parts of Glint and how a frame becomes speech.
Glint is an Electron app in plain TypeScript. Everything runs on the user's computer.
The three parts
| Part | Path | Job |
|---|---|---|
| Main | src/main/ | Runs the SDK's native side. Owns camera permission, the settings file, the clipboard and the espeak-ng fallback. |
| Preload | src/preload/ | The bridge: the SDK's own preload, plus a small window.glint API. |
| Renderer | src/renderer/ | The app itself: screens, gestures, board and signal sources. Sandboxed, with no file access. |
Main and the renderer are separate operating-system processes. The preload runs inside the renderer's process, in its own isolated JavaScript world.
The screens
app.ts is a state machine with three phases:
Stop, Esc and any error that ends the session all return to consent and release the camera. A recoverable problem only pauses the board. The camera is opened in exactly one place, liveSource in signals/presage.ts, and that is reached only from the consent screen's button.
Pure logic, thin shell
The parts that need to be right are pure functions with no knowledge of Electron or the camera: the detectors, the scanner and the settings sanitizer. That is why they can be tested on a recording in milliseconds.