# koljapluemer/thia architecture

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

- Interactive diagram: https://gitdiagram.com/koljapluemer/thia
- Repository: https://github.com/koljapluemer/thia

## Overview

thia is a semantic-YAML learning platform: people author and organize notes, build interactive views and lessons in the workshop, then review or publish results for learners to run. The shared Rust core models and stores content; apps, plugins and learning packages provide the authoring and practice experience. The teacher server supports class lessons and submissions, while the public site presents catalogs, views and lessons. Folder/device sync and local model bridges are optional integrations. The overview follows the README and shown references; several subsystem internals were not sampled, so undocumented connections are omitted.

Main entry points: [`web/app/src/workshop/Workshop.tsx`](https://github.com/koljapluemer/thia/blob/main/web/app/src/workshop/Workshop.tsx) (Workshop), [`web/app/src/App.tsx`](https://github.com/koljapluemer/thia/blob/main/web/app/src/App.tsx) (Web App), [`crates/core/src/gestalt.rs`](https://github.com/koljapluemer/thia/blob/main/crates/core/src/gestalt.rs) (Semantic Core), [`web/site/src/main.tsx`](https://github.com/koljapluemer/thia/blob/main/web/site/src/main.tsx) (Public Site)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content Core"]
  node_core["Semantic Core<br/>[gestalt.rs]"]
  node_yml["YAML Model<br/>[yml.rs]"]
  node_merge["Content Merge<br/>[merge.rs]"]
  node_storage["Storage Port<br/>[storage.rs]"]
end

subgraph group_apps["Apps And Views"]
  node_webapp["Web App<br/>[App.tsx]"]
  node_client["Repository Client<br/>[core.ts]"]
  node_host["Plugin Host<br/>[usePluginRepo.ts]"]
  node_views["View Contract<br/>[types.ts]"]
  node_plugins["Interactive Plugins"]
  node_learning["Practice Engine<br/>[learning.ts]"]
end

subgraph group_authoring["Workshop And Teaching"]
  node_workshop["Workshop<br/>[Workshop.tsx]"]
  node_agents["Workshop Agents"]
  node_teacher["Teacher Server<br/>[main.rs]"]
  node_review["Submission Review<br/>[Review.tsx]"]
end

subgraph group_distribution["Published Learning"]
  node_site["Public Site<br/>[main.tsx]"]
  node_catalog["View Catalog<br/>[Catalog.tsx]"]
  node_siteplay["View And Lesson Run<br/>[Run.tsx]"]
end

subgraph group_integrations["Local Integrations"]
  node_node["Folder Node<br/>[server.rs]"]
  node_peer["Paired Device Sync<br/>[lib.rs]"]
  node_claude["Claude Bridge<br/>[server.rs]"]
  node_ollama["Ollama Bridge<br/>[server.rs]"]
end

node_learner(("Learner"))
node_author(("Teacher / Author"))

node_author -->|"authors in"| node_webapp
node_learner -->|"uses"| node_webapp
node_webapp -.->|"opens repositories"| node_client
node_client -->|"uses shared model"| node_core
node_core -->|"models as"| node_yml
node_core -->|"uses storage port"| node_storage
node_core -->|"merges content"| node_merge
node_webapp -->|"mounts plugins"| node_host
node_host -->|"opens repository"| node_client
node_host -->|"loads views"| node_plugins
node_plugins -->|"implements views"| node_views
node_plugins -.->|"supports practice"| node_learning
node_author -->|"creates lessons"| node_workshop
node_workshop -->|"uses agents"| node_agents
node_workshop -->|"syncs drafts"| node_teacher
node_teacher -.->|"serves submissions"| node_review
node_author -->|"reviews results"| node_review
node_teacher -->|"publishes lessons"| node_site
node_learner -->|"browses and plays"| node_site
node_site -->|"routes to catalog"| node_catalog
node_site -->|"routes to runs"| node_siteplay
node_webapp -.->|"connects to folder"| node_node
node_node -->|"syncs paired devices"| node_peer
node_workshop -->|"may invoke local agent"| node_claude
node_workshop -->|"may invoke local model"| node_ollama

click node_core "https://github.com/koljapluemer/thia/blob/main/crates/core/src/gestalt.rs"
click node_yml "https://github.com/koljapluemer/thia/blob/main/crates/core/src/yml.rs"
click node_merge "https://github.com/koljapluemer/thia/blob/main/crates/core/src/merge.rs"
click node_storage "https://github.com/koljapluemer/thia/blob/main/crates/core/src/storage.rs"
click node_webapp "https://github.com/koljapluemer/thia/blob/main/web/app/src/App.tsx"
click node_client "https://github.com/koljapluemer/thia/blob/main/packages/client/src/core.ts"
click node_host "https://github.com/koljapluemer/thia/blob/main/packages/host/src/usePluginRepo.ts"
click node_views "https://github.com/koljapluemer/thia/blob/main/packages/view/src/types.ts"
click node_plugins "https://github.com/koljapluemer/thia/tree/main/plugins"
click node_learning "https://github.com/koljapluemer/thia/blob/main/packages/learning/src/learning.ts"
click node_workshop "https://github.com/koljapluemer/thia/blob/main/web/app/src/workshop/Workshop.tsx"
click node_agents "https://github.com/koljapluemer/thia/tree/main/packages/workshop/src/agents"
click node_teacher "https://github.com/koljapluemer/thia/blob/main/web/server/src/main.rs"
click node_review "https://github.com/koljapluemer/thia/blob/main/web/app/src/review/Review.tsx"
click node_site "https://github.com/koljapluemer/thia/blob/main/web/site/src/main.tsx"
click node_catalog "https://github.com/koljapluemer/thia/blob/main/web/site/src/Catalog.tsx"
click node_siteplay "https://github.com/koljapluemer/thia/blob/main/web/site/src/Run.tsx"
click node_node "https://github.com/koljapluemer/thia/blob/main/crates/node/src/server.rs"
click node_peer "https://github.com/koljapluemer/thia/blob/main/crates/peer/src/lib.rs"
click node_claude "https://github.com/koljapluemer/thia/blob/main/installables/claude-bridge/src/server.rs"
click node_ollama "https://github.com/koljapluemer/thia/blob/main/installables/ollama-bridge/src/server.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_core,node_yml,node_merge,node_storage toneBlue
class node_webapp,node_client,node_host,node_views,node_plugins,node_learning toneAmber
class node_workshop,node_agents,node_teacher,node_review toneMint
class node_site,node_catalog,node_siteplay toneRose
class node_node,node_peer,node_claude,node_ollama,node_learner,node_author toneIndigo
```

## Components

### Content Core

- [Semantic Core](https://github.com/koljapluemer/thia/blob/main/crates/core/src/gestalt.rs): `crates/core/src/gestalt.rs`
- [YAML Model](https://github.com/koljapluemer/thia/blob/main/crates/core/src/yml.rs): `crates/core/src/yml.rs`
- [Content Merge](https://github.com/koljapluemer/thia/blob/main/crates/core/src/merge.rs): `crates/core/src/merge.rs`
- [Storage Port](https://github.com/koljapluemer/thia/blob/main/crates/core/src/storage.rs): `crates/core/src/storage.rs`

### Apps And Views

- [Web App](https://github.com/koljapluemer/thia/blob/main/web/app/src/App.tsx): `web/app/src/App.tsx`
- [Repository Client](https://github.com/koljapluemer/thia/blob/main/packages/client/src/core.ts): `packages/client/src/core.ts`
- [Plugin Host](https://github.com/koljapluemer/thia/blob/main/packages/host/src/usePluginRepo.ts): `packages/host/src/usePluginRepo.ts`
- [View Contract](https://github.com/koljapluemer/thia/blob/main/packages/view/src/types.ts): `packages/view/src/types.ts`
- [Interactive Plugins](https://github.com/koljapluemer/thia/tree/main/plugins): `plugins`
- [Practice Engine](https://github.com/koljapluemer/thia/blob/main/packages/learning/src/learning.ts): `packages/learning/src/learning.ts`

### Workshop And Teaching

- [Workshop](https://github.com/koljapluemer/thia/blob/main/web/app/src/workshop/Workshop.tsx): `web/app/src/workshop/Workshop.tsx`
- [Workshop Agents](https://github.com/koljapluemer/thia/tree/main/packages/workshop/src/agents): `packages/workshop/src/agents`
- [Teacher Server](https://github.com/koljapluemer/thia/blob/main/web/server/src/main.rs): `web/server/src/main.rs`
- [Submission Review](https://github.com/koljapluemer/thia/blob/main/web/app/src/review/Review.tsx): `web/app/src/review/Review.tsx`

### Published Learning

- [Public Site](https://github.com/koljapluemer/thia/blob/main/web/site/src/main.tsx): `web/site/src/main.tsx`
- [View Catalog](https://github.com/koljapluemer/thia/blob/main/web/site/src/Catalog.tsx): `web/site/src/Catalog.tsx`
- [View And Lesson Run](https://github.com/koljapluemer/thia/blob/main/web/site/src/Run.tsx): `web/site/src/Run.tsx`

### Local Integrations

- [Folder Node](https://github.com/koljapluemer/thia/blob/main/crates/node/src/server.rs): `crates/node/src/server.rs`
- [Paired Device Sync](https://github.com/koljapluemer/thia/blob/main/crates/peer/src/lib.rs): `crates/peer/src/lib.rs`
- [Claude Bridge](https://github.com/koljapluemer/thia/blob/main/installables/claude-bridge/src/server.rs): `installables/claude-bridge/src/server.rs`
- [Ollama Bridge](https://github.com/koljapluemer/thia/blob/main/installables/ollama-bridge/src/server.rs): `installables/ollama-bridge/src/server.rs`

### Other components

- **Learner**
- **Teacher / Author**

## Connections

- Teacher / Author → Web App: authors in
- Learner → Web App: uses
- Web App → Repository Client: opens repositories
- Repository Client → Semantic Core: uses shared model
- Semantic Core → YAML Model: models as (evidence: `crates/core/src/yml.rs`)
- Semantic Core → Storage Port: uses storage port (evidence: `crates/core/src/storage.rs`)
- Semantic Core → Content Merge: merges content (evidence: `crates/core/src/decks.rs`)
- Web App → Plugin Host: mounts plugins (evidence: `web/app/src/App.tsx`)
- Plugin Host → Repository Client: opens repository (evidence: `packages/host/src/usePluginRepo.ts`)
- Plugin Host → Interactive Plugins: loads views
- Interactive Plugins → View Contract: implements views
- Interactive Plugins → Practice Engine: supports practice
- Teacher / Author → Workshop: creates lessons
- Workshop → Workshop Agents: uses agents
- Workshop → Teacher Server: syncs drafts
- Teacher Server → Submission Review: serves submissions
- Teacher / Author → Submission Review: reviews results
- Teacher Server → Public Site: publishes lessons
- Learner → Public Site: browses and plays
- Public Site → View Catalog: routes to catalog (evidence: `web/site/src/main.tsx`)
- Public Site → View And Lesson Run: routes to runs (evidence: `web/site/src/main.tsx`)
- Web App → Folder Node: connects to folder
- Folder Node → Paired Device Sync: syncs paired devices
- Workshop → Claude Bridge: may invoke local agent
- Workshop → Ollama Bridge: may invoke local model
