# jasonkenwayfj/glyph architecture

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

- Interactive diagram: https://gitdiagram.com/jasonkenwayfj/glyph
- Repository: https://github.com/jasonkenwayfj/glyph

## Overview

Glyph is a cross-platform workspace for creative projects, organizing documents, structured entities, tasks, media, and their relationships. The main flow begins in the routed UI, selects or edits a project, and reaches Tauri commands and Rust project/entity state; the desktop layer also loads project data from local files. Separate branches cover account authorization, AI chat, and plugins. The README describes broader linked-object and multi-view goals. Several command handlers and product screens were not excerpted, so their connections are shown only as unverified where appropriate.

Main entry points: [`src-tauri/src/lib.rs`](https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/lib.rs) (Tauri runtime), [`src/router/router.tsx`](https://github.com/jasonkenwayfj/glyph/blob/master/src/router/router.tsx) (Screen router), [`core/src/managers/project_manager.rs`](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/managers/project_manager.rs) (Project manager), [`src/screens/ProjectPage.tsx`](https://github.com/jasonkenwayfj/glyph/blob/master/src/screens/ProjectPage.tsx) (Project screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Workspace UI"]
  node_app["App bootstrap<br/>[App.tsx]"]
  node_router["Screen router<br/>[router.tsx]"]
  node_project_ui["Project screens<br/>[ProjectPage.tsx]"]
  node_entity_ui["Entity views<br/>[EntityPage.tsx]"]
  node_editor_ui["Editor screens<br/>[MainPage.tsx]"]
  node_plugin_ui["Plugin pages<br/>[pluginRouter.tsx]"]
  node_project_state["Project state<br/>[projectStorage.ts]"]
end

subgraph group_desktop["Desktop Bridge"]
  node_tauri_runtime["Tauri runtime<br/>[lib.rs]"]
  node_project_commands["Project commands"]
  node_entity_commands["Entity commands<br/>[commands.rs]"]
  node_auth_commands["Account commands<br/>[user_commands.rs]"]
  node_ai_commands["AI commands"]
  node_plugin_commands["Plugin commands<br/>[plugin_commands.rs]"]
  node_file_io["Project file I/O"]
end

subgraph group_core["Project Core"]
  node_project_manager["Project manager<br/>[project_manager.rs]"]
  node_project_entity["Project model<br/>[project_entity.rs]"]
  node_card_entity["Card model<br/>[card_entity.rs]"]
  node_document_entity["Document model<br/>[document_entity.rs]"]
  node_user_model["User model<br/>[user_entity.rs]"]
  node_entity_contract["Entity contract<br/>[entity_like.rs]"]
  node_entity_kinds["Entity kinds<br/>[entity_type.rs]"]
end

subgraph group_services["Services &amp; Storage"]
  node_authorization["Authorization service"]
  node_api_client["HTTP client<br/>[api_client.rs]"]
  node_ai_manager["AI chat manager<br/>[ai_chat_manager.rs]"]
  node_plugin_manager["Plugin manager<br/>[plugin_manager.rs]"]
end

node_user(("Workspace user"))
node_remote_api["Glyph server"]
node_local_store[("Local project files")]

node_user -->|"uses"| node_router
node_app -->|"renders"| node_router
node_app -->|"loads projects"| node_project_state
node_router -->|"routes to"| node_project_ui
node_router -->|"routes to"| node_entity_ui
node_router -->|"routes to"| node_editor_ui
node_router -->|"routes to"| node_plugin_ui
node_project_ui -.->|"invokes"| node_project_commands
node_entity_ui -.->|"invokes"| node_entity_commands
node_project_commands -.->|"manages projects"| node_project_manager
node_entity_commands -.->|"manages entities"| node_project_manager
node_project_manager -->|"stores"| node_project_entity
node_project_manager -->|"filters entities"| node_entity_contract
node_project_manager -->|"stores"| node_card_entity
node_project_manager -->|"stores"| node_document_entity
node_entity_contract -->|"uses types"| node_entity_kinds
node_tauri_runtime -->|"registers"| node_project_commands
node_tauri_runtime -->|"registers"| node_entity_commands
node_tauri_runtime -->|"registers"| node_auth_commands
node_tauri_runtime -->|"registers"| node_ai_commands
node_tauri_runtime -->|"registers"| node_plugin_commands
node_tauri_runtime -->|"loads data"| node_file_io
node_file_io -.->|"reads/writes"| node_local_store
node_auth_commands -.->|"delegates to"| node_authorization
node_authorization -->|"sends requests"| node_api_client
node_tauri_runtime -->|"configures"| node_api_client
node_api_client -.->|"calls"| node_remote_api
node_ai_commands -.->|"delegates to"| node_ai_manager
node_plugin_commands -.->|"delegates to"| node_plugin_manager
node_tauri_runtime -.->|"emits project events"| node_project_state
node_project_state -.->|"supplies state"| node_project_ui

click node_app "https://github.com/jasonkenwayfj/glyph/blob/master/src/App.tsx"
click node_router "https://github.com/jasonkenwayfj/glyph/blob/master/src/router/router.tsx"
click node_project_ui "https://github.com/jasonkenwayfj/glyph/blob/master/src/screens/ProjectPage.tsx"
click node_entity_ui "https://github.com/jasonkenwayfj/glyph/blob/master/src/screens/EntityPage.tsx"
click node_editor_ui "https://github.com/jasonkenwayfj/glyph/blob/master/src/screens/MainPage.tsx"
click node_plugin_ui "https://github.com/jasonkenwayfj/glyph/blob/master/src/router/pluginRouter.tsx"
click node_project_state "https://github.com/jasonkenwayfj/glyph/blob/master/src/storage/projectStorage.ts"
click node_tauri_runtime "https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/lib.rs"
click node_project_commands "https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/project_commands.rs"
click node_entity_commands "https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/commands.rs"
click node_auth_commands "https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/user_commands.rs"
click node_ai_commands "https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/ai_chat_commands.rs"
click node_plugin_commands "https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/plugin_commands.rs"
click node_file_io "https://github.com/jasonkenwayfj/glyph/tree/master/src-tauri/src/glyph_fs"
click node_project_manager "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/managers/project_manager.rs"
click node_project_entity "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/project_entity.rs"
click node_card_entity "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/card_entity.rs"
click node_document_entity "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/document_entity.rs"
click node_user_model "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/user_entity.rs"
click node_entity_contract "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/traits/entity_like.rs"
click node_entity_kinds "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/enums/entity_type.rs"
click node_authorization "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/network/authorization_service.rs"
click node_api_client "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/network/api_client.rs"
click node_ai_manager "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/managers/ai_chat_manager.rs"
click node_plugin_manager "https://github.com/jasonkenwayfj/glyph/blob/master/core/src/managers/plugin_manager.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_app,node_router,node_project_ui,node_entity_ui,node_editor_ui,node_plugin_ui,node_project_state,node_user toneBlue
class node_tauri_runtime,node_project_commands,node_entity_commands,node_auth_commands,node_ai_commands,node_plugin_commands,node_file_io,node_local_store toneAmber
class node_project_manager,node_project_entity,node_card_entity,node_document_entity,node_user_model,node_entity_contract,node_entity_kinds,node_remote_api toneMint
class node_authorization,node_api_client,node_ai_manager,node_plugin_manager toneRose
```

## Components

### Workspace UI

- [App bootstrap](https://github.com/jasonkenwayfj/glyph/blob/master/src/App.tsx): `src/App.tsx`
- [Screen router](https://github.com/jasonkenwayfj/glyph/blob/master/src/router/router.tsx): `src/router/router.tsx`
- [Project screens](https://github.com/jasonkenwayfj/glyph/blob/master/src/screens/ProjectPage.tsx): `src/screens/ProjectPage.tsx`
- [Entity views](https://github.com/jasonkenwayfj/glyph/blob/master/src/screens/EntityPage.tsx): `src/screens/EntityPage.tsx`
- [Editor screens](https://github.com/jasonkenwayfj/glyph/blob/master/src/screens/MainPage.tsx): `src/screens/MainPage.tsx`
- [Plugin pages](https://github.com/jasonkenwayfj/glyph/blob/master/src/router/pluginRouter.tsx): `src/router/pluginRouter.tsx`
- [Project state](https://github.com/jasonkenwayfj/glyph/blob/master/src/storage/projectStorage.ts): `src/storage/projectStorage.ts`

### Desktop Bridge

- [Tauri runtime](https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Project commands](https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/project_commands.rs): `src-tauri/src/commands/project_commands.rs`
- [Entity commands](https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/commands.rs): `src-tauri/src/commands/commands.rs`
- [Account commands](https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/user_commands.rs): `src-tauri/src/commands/user_commands.rs`
- [AI commands](https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/ai_chat_commands.rs): `src-tauri/src/commands/ai_chat_commands.rs`
- [Plugin commands](https://github.com/jasonkenwayfj/glyph/blob/master/src-tauri/src/commands/plugin_commands.rs): `src-tauri/src/commands/plugin_commands.rs`
- [Project file I/O](https://github.com/jasonkenwayfj/glyph/tree/master/src-tauri/src/glyph_fs): `src-tauri/src/glyph_fs`

### Project Core

- [Project manager](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/managers/project_manager.rs): `core/src/managers/project_manager.rs`
- [Project model](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/project_entity.rs): `core/src/entities/project_entity.rs`
- [Card model](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/card_entity.rs): `core/src/entities/card_entity.rs`
- [Document model](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/document_entity.rs): `core/src/entities/document_entity.rs`
- [User model](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/entities/user_entity.rs): `core/src/entities/user_entity.rs`
- [Entity contract](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/traits/entity_like.rs): `core/src/traits/entity_like.rs`
- [Entity kinds](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/enums/entity_type.rs): `core/src/enums/entity_type.rs`

### Services & Storage

- [Authorization service](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/network/authorization_service.rs): `core/src/network/authorization_service.rs`
- [HTTP client](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/network/api_client.rs): `core/src/network/api_client.rs`
- [AI chat manager](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/managers/ai_chat_manager.rs): `core/src/managers/ai_chat_manager.rs`
- [Plugin manager](https://github.com/jasonkenwayfj/glyph/blob/master/core/src/managers/plugin_manager.rs): `core/src/managers/plugin_manager.rs`

### Other components

- **Workspace user**
- **Glyph server**
- **Local project files**

## Connections

- Workspace user → Screen router: uses (evidence: `src/router/router.tsx`)
- App bootstrap → Screen router: renders (evidence: `src/App.tsx`)
- App bootstrap → Project state: loads projects (evidence: `src/App.tsx`)
- Screen router → Project screens: routes to (evidence: `src/router/router.tsx`)
- Screen router → Entity views: routes to (evidence: `src/router/router.tsx`)
- Screen router → Editor screens: routes to (evidence: `src/router/router.tsx`)
- Screen router → Plugin pages: routes to (evidence: `src/router/router.tsx`)
- Project screens → Project commands: invokes
- Entity views → Entity commands: invokes
- Project commands → Project manager: manages projects
- Entity commands → Project manager: manages entities
- Project manager → Project model: stores (evidence: `core/src/managers/project_manager.rs`)
- Project manager → Entity contract: filters entities (evidence: `core/src/managers/project_manager.rs`)
- Project manager → Card model: stores (evidence: `core/src/managers/project_manager.rs`)
- Project manager → Document model: stores (evidence: `core/src/managers/project_manager.rs`)
- Entity contract → Entity kinds: uses types (evidence: `core/src/traits/entity_like.rs`)
- Tauri runtime → Project commands: registers (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → Entity commands: registers (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → Account commands: registers (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → AI commands: registers (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → Plugin commands: registers (evidence: `src-tauri/src/lib.rs`)
- Tauri runtime → Project file I/O: loads data (evidence: `src-tauri/src/lib.rs`)
- Project file I/O → Local project files: reads/writes
- Account commands → Authorization service: delegates to
- Authorization service → HTTP client: sends requests (evidence: `core/src/network/authorization_service.rs`)
- Tauri runtime → HTTP client: configures (evidence: `src-tauri/src/lib.rs`)
- HTTP client → Glyph server: calls
- AI commands → AI chat manager: delegates to
- Plugin commands → Plugin manager: delegates to
- Tauri runtime → Project state: emits project events
- Project state → Project screens: supplies state
