# ntrospect0/glint architecture

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

- Interactive diagram: https://gitdiagram.com/ntrospect0/glint
- Repository: https://github.com/ntrospect0/glint

## Overview

glint is a keyboard-driven terminal dashboard composed from configurable widget panes and stacks. The main workflow loads a profile and layout, creates registered widgets, periodically updates them from local or upstream data, and renders their results in the terminal; users can focus, zoom, and interact with panes. The setup wizard configures profiles, layout, widgets, and credentials. The README documents additional widget capabilities beyond the sampled source, so those branches are shown at subsystem level; their internal call wiring is not inferred.

Main entry points: [`src/widgets/mod.rs`](https://github.com/ntrospect0/glint/blob/main/src/widgets/mod.rs) (Widget manager), [`src/app.rs`](https://github.com/ntrospect0/glint/blob/main/src/app.rs) (App loop), [`src/cache/mod.rs`](https://github.com/ntrospect0/glint/blob/main/src/cache/mod.rs) (Persistent cache), [`src/main.rs`](https://github.com/ntrospect0/glint/blob/main/src/main.rs) (CLI startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Dashboard runtime"]
  node_main["CLI startup<br/>[main.rs]"]
  node_app["App loop<br/>[app.rs]"]
  node_widget_manager["Widget manager<br/>[mod.rs]"]
  node_ui["Dashboard renderer<br/>[mod.rs]"]
  node_zoom["Focus zoom<br/>[zoom.rs]"]
  node_events["Input events<br/>[event.rs]"]
end

subgraph group_widgets["Dashboard widgets"]
  node_clock["Clock and timer<br/>[mod.rs]"]
  node_calendar["Calendar<br/>[mod.rs]"]
  node_news_feeds["News and feeds<br/>[mod.rs]"]
  node_market_widgets["Stocks and forex<br/>[mod.rs]"]
  node_weather["Weather<br/>[mod.rs]"]
  node_email["Email<br/>[mod.rs]"]
  node_notes["Notes<br/>[mod.rs]"]
  node_resources["System resources<br/>[mod.rs]"]
  node_gallery["Image gallery<br/>[mod.rs]"]
end

subgraph group_services["Data and services"]
  node_cache[("Persistent cache<br/>[mod.rs]")]
  node_auth["OAuth authentication<br/>[mod.rs]"]
  node_market_data["Market data<br/>[mod.rs]"]
  node_llm["LLM providers<br/>[mod.rs]"]
end

subgraph group_setup["Setup and configuration"]
  node_config["Profile configuration<br/>[mod.rs]"]
  node_wizard["Setup wizard<br/>[app.rs]"]
  node_theme["Themes<br/>[mod.rs]"]
end

node_user(("Terminal user"))
node_upstream{{"External data services"}}
node_terminal{{"Terminal"}}
node_local_files[("Local config and credentials")]

node_user -->|"launches"| node_main
node_main -->|"selects profile"| node_config
node_main -->|"starts setup"| node_wizard
node_main -->|"starts dashboard"| node_app
node_config -->|"reads and writes"| node_local_files
node_wizard -->|"manages profiles"| node_config
node_wizard -->|"persists setup"| node_local_files
node_app -->|"updates widgets"| node_widget_manager
node_app -->|"handles input"| node_events
node_events -->|"dispatches events"| node_app
node_app -->|"requests render"| node_ui
node_app -->|"manages zoom"| node_zoom
node_ui -->|"renders widgets"| node_widget_manager
node_ui -->|"paints dashboard"| node_terminal
node_app -->|"applies schemes"| node_theme
node_widget_manager -->|"dispatches updates"| node_clock
node_widget_manager -->|"dispatches updates"| node_calendar
node_widget_manager -->|"dispatches updates"| node_news_feeds
node_widget_manager -->|"dispatches updates"| node_market_widgets
node_widget_manager -->|"dispatches updates"| node_weather
node_widget_manager -->|"dispatches updates"| node_email
node_widget_manager -->|"dispatches updates"| node_notes
node_widget_manager -->|"dispatches updates"| node_resources
node_widget_manager -->|"dispatches updates"| node_gallery
node_calendar -.->|"uses OAuth"| node_auth
node_email -.->|"uses OAuth"| node_auth
node_calendar -.->|"fetches events"| node_upstream
node_news_feeds -.->|"fetches feeds"| node_upstream
node_weather -.->|"fetches forecasts"| node_upstream
node_market_data -.->|"fetches quotes"| node_upstream
node_market_widgets -->|"requests quotes"| node_market_data
node_news_feeds -.->|"requests summaries"| node_llm
node_llm -.->|"calls provider"| node_upstream
node_clock -.->|"persists state"| node_cache
node_calendar -.->|"caches data"| node_cache
node_news_feeds -.->|"caches articles"| node_cache
node_market_data -.->|"caches quotes"| node_cache
node_weather -.->|"caches results"| node_cache

click node_main "https://github.com/ntrospect0/glint/blob/main/src/main.rs"
click node_app "https://github.com/ntrospect0/glint/blob/main/src/app.rs"
click node_widget_manager "https://github.com/ntrospect0/glint/blob/main/src/widgets/mod.rs"
click node_ui "https://github.com/ntrospect0/glint/blob/main/src/ui/mod.rs"
click node_zoom "https://github.com/ntrospect0/glint/blob/main/src/zoom.rs"
click node_events "https://github.com/ntrospect0/glint/blob/main/src/event.rs"
click node_clock "https://github.com/ntrospect0/glint/blob/main/src/widgets/clock/mod.rs"
click node_calendar "https://github.com/ntrospect0/glint/blob/main/src/widgets/calendar/mod.rs"
click node_news_feeds "https://github.com/ntrospect0/glint/blob/main/src/widgets/news/mod.rs"
click node_market_widgets "https://github.com/ntrospect0/glint/blob/main/src/widgets/stocks/mod.rs"
click node_weather "https://github.com/ntrospect0/glint/blob/main/src/widgets/weather/mod.rs"
click node_email "https://github.com/ntrospect0/glint/blob/main/src/widgets/email/mod.rs"
click node_notes "https://github.com/ntrospect0/glint/blob/main/src/widgets/notes/mod.rs"
click node_resources "https://github.com/ntrospect0/glint/blob/main/src/widgets/resources/mod.rs"
click node_gallery "https://github.com/ntrospect0/glint/blob/main/src/widgets/gallery/mod.rs"
click node_config "https://github.com/ntrospect0/glint/blob/main/src/config/mod.rs"
click node_wizard "https://github.com/ntrospect0/glint/blob/main/src/wizard/app.rs"
click node_theme "https://github.com/ntrospect0/glint/blob/main/src/theme/mod.rs"
click node_cache "https://github.com/ntrospect0/glint/blob/main/src/cache/mod.rs"
click node_auth "https://github.com/ntrospect0/glint/blob/main/src/auth/mod.rs"
click node_market_data "https://github.com/ntrospect0/glint/blob/main/src/market_data/mod.rs"
click node_llm "https://github.com/ntrospect0/glint/blob/main/src/llm/mod.rs"

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_app,node_widget_manager,node_ui,node_zoom,node_events,node_user toneBlue
class node_clock,node_calendar,node_news_feeds,node_market_widgets,node_weather,node_email,node_notes,node_resources,node_gallery,node_local_files toneAmber
class node_cache,node_auth,node_market_data,node_llm toneMint
class node_config,node_wizard,node_theme toneRose
class node_upstream,node_terminal toneIndigo
```

## Components

### Dashboard runtime

- [CLI startup](https://github.com/ntrospect0/glint/blob/main/src/main.rs): `src/main.rs`
- [App loop](https://github.com/ntrospect0/glint/blob/main/src/app.rs): `src/app.rs`
- [Widget manager](https://github.com/ntrospect0/glint/blob/main/src/widgets/mod.rs): `src/widgets/mod.rs`
- [Dashboard renderer](https://github.com/ntrospect0/glint/blob/main/src/ui/mod.rs): `src/ui/mod.rs`
- [Focus zoom](https://github.com/ntrospect0/glint/blob/main/src/zoom.rs): `src/zoom.rs`
- [Input events](https://github.com/ntrospect0/glint/blob/main/src/event.rs): `src/event.rs`

### Dashboard widgets

- [Clock and timer](https://github.com/ntrospect0/glint/blob/main/src/widgets/clock/mod.rs): `src/widgets/clock/mod.rs`
- [Calendar](https://github.com/ntrospect0/glint/blob/main/src/widgets/calendar/mod.rs): `src/widgets/calendar/mod.rs`
- [News and feeds](https://github.com/ntrospect0/glint/blob/main/src/widgets/news/mod.rs): `src/widgets/news/mod.rs`
- [Stocks and forex](https://github.com/ntrospect0/glint/blob/main/src/widgets/stocks/mod.rs): `src/widgets/stocks/mod.rs`
- [Weather](https://github.com/ntrospect0/glint/blob/main/src/widgets/weather/mod.rs): `src/widgets/weather/mod.rs`
- [Email](https://github.com/ntrospect0/glint/blob/main/src/widgets/email/mod.rs): `src/widgets/email/mod.rs`
- [Notes](https://github.com/ntrospect0/glint/blob/main/src/widgets/notes/mod.rs): `src/widgets/notes/mod.rs`
- [System resources](https://github.com/ntrospect0/glint/blob/main/src/widgets/resources/mod.rs): `src/widgets/resources/mod.rs`
- [Image gallery](https://github.com/ntrospect0/glint/blob/main/src/widgets/gallery/mod.rs): `src/widgets/gallery/mod.rs`

### Data and services

- [Persistent cache](https://github.com/ntrospect0/glint/blob/main/src/cache/mod.rs): `src/cache/mod.rs`
- [OAuth authentication](https://github.com/ntrospect0/glint/blob/main/src/auth/mod.rs): `src/auth/mod.rs`
- [Market data](https://github.com/ntrospect0/glint/blob/main/src/market_data/mod.rs): `src/market_data/mod.rs`
- [LLM providers](https://github.com/ntrospect0/glint/blob/main/src/llm/mod.rs): `src/llm/mod.rs`

### Setup and configuration

- [Profile configuration](https://github.com/ntrospect0/glint/blob/main/src/config/mod.rs): `src/config/mod.rs`
- [Setup wizard](https://github.com/ntrospect0/glint/blob/main/src/wizard/app.rs): `src/wizard/app.rs`
- [Themes](https://github.com/ntrospect0/glint/blob/main/src/theme/mod.rs): `src/theme/mod.rs`

### Other components

- **Terminal user**
- **External data services**
- **Terminal**
- **Local config and credentials**

## Connections

- Terminal user → CLI startup: launches
- CLI startup → Profile configuration: selects profile
- CLI startup → Setup wizard: starts setup
- CLI startup → App loop: starts dashboard
- Profile configuration → Local config and credentials: reads and writes
- Setup wizard → Profile configuration: manages profiles
- Setup wizard → Local config and credentials: persists setup
- App loop → Widget manager: updates widgets
- App loop → Input events: handles input
- Input events → App loop: dispatches events
- App loop → Dashboard renderer: requests render
- App loop → Focus zoom: manages zoom
- Dashboard renderer → Widget manager: renders widgets
- Dashboard renderer → Terminal: paints dashboard
- App loop → Themes: applies schemes
- Widget manager → Clock and timer: dispatches updates
- Widget manager → Calendar: dispatches updates
- Widget manager → News and feeds: dispatches updates
- Widget manager → Stocks and forex: dispatches updates
- Widget manager → Weather: dispatches updates
- Widget manager → Email: dispatches updates
- Widget manager → Notes: dispatches updates
- Widget manager → System resources: dispatches updates
- Widget manager → Image gallery: dispatches updates
- Calendar → OAuth authentication: uses OAuth
- Email → OAuth authentication: uses OAuth
- Calendar → External data services: fetches events
- News and feeds → External data services: fetches feeds
- Weather → External data services: fetches forecasts
- Market data → External data services: fetches quotes
- Stocks and forex → Market data: requests quotes
- News and feeds → LLM providers: requests summaries
- LLM providers → External data services: calls provider
- Clock and timer → Persistent cache: persists state
- Calendar → Persistent cache: caches data
- News and feeds → Persistent cache: caches articles
- Market data → Persistent cache: caches quotes
- Weather → Persistent cache: caches results
