# mountea-framework/mounteadialoguer architecture

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

- Interactive diagram: https://gitdiagram.com/mountea-framework/mounteadialoguer
- Repository: https://github.com/mountea-framework/mounteadialoguer

## Overview

Mountea Dialoguer is a visual dialogue-design platform for creating, organizing, previewing, validating, and handing off branching conversations. The main workflow starts with a project, proceeds through dialogue graph authoring and metadata, then previews or exports the resulting content. Local project persistence and optional cloud sync support that workflow. The graph reflects the README and shown excerpts; several UI and sync subsystems are represented at directory level because their implementation was not sampled.

Main entry points: [`src/routes/projects/$projectId/dialogue/$dialogueId/index.jsx`](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/projects/%24projectId/dialogue/%24dialogueId/index.jsx) (Graph editor), [`src/lib/persistence/projectRepository.js`](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/persistence/projectRepository.js) (Project repository), [`src/routes/index.jsx`](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/index.jsx) (Project home), [`src/stores/syncStore.js`](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/stores/syncStore.js) (Sync state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Project authoring"]
  node_project_home["Project home<br/>[index.jsx]"]
  node_project_details["Project workspace<br/>[index.jsx]"]
  node_project_store["Project state<br/>[projectStore.js]"]
  node_metadata["Reusable metadata"]
end

subgraph group_runtime["Dialogue design"]
  node_dialogue_editor["Graph editor<br/>[index.jsx]"]
  node_dialogue_store["Dialogue state<br/>[dialogueStore.js]"]
  node_graph_nodes["Dialogue nodes"]
  node_graph_conditions["Branch conditions<br/>[ConditionEdge.jsx]"]
  node_preview["Flow preview"]
  node_preview_engine["Preview evaluation"]
end

subgraph group_persistence["Project data"]
  node_validation["Project validation"]
  node_archive_handoff["Import and export<br/>[projectArchive.js]"]
  node_repository["Project repository"]
  node_database[("Profile database<br/>[db.js]")]
end

subgraph group_sync["Cloud sync"]
  node_sync_controls["Sync controls"]
  node_sync_store["Sync state<br/>[syncStore.js]"]
  node_sync_engine["Sync planning<br/>[syncEngine.js]"]
  node_sync_storage["Sync records<br/>[syncStorage.js]"]
  node_sync_providers["Cloud providers"]
end

subgraph group_desktop["Desktop runtime"]
  node_electron_shell["Electron desktop<br/>[main.cjs]"]
end

node_writer(("Narrative designer"))
node_google_drive[("Google Drive")]
node_steam_cloud[("Steam Cloud")]
node_oauth["Google OAuth"]

node_writer -->|"opens projects"| node_project_home
node_project_home -->|"manages projects"| node_project_store
node_project_home -->|"imports archives"| node_archive_handoff
node_project_store -.->|"persists projects"| node_repository
node_project_home -->|"opens workspace"| node_project_details
node_project_details -->|"opens dialogue"| node_dialogue_editor
node_project_details -->|"organizes metadata"| node_metadata
node_dialogue_editor -->|"edits graph"| node_dialogue_store
node_dialogue_editor -->|"renders nodes"| node_graph_nodes
node_dialogue_editor -->|"edits branches"| node_graph_conditions
node_dialogue_store -->|"commits changes"| node_repository
node_dialogue_editor -->|"previews flow"| node_preview
node_preview -->|"evaluates graph"| node_preview_engine
node_preview_engine -.->|"reads conditions"| node_graph_conditions
node_repository -->|"validates snapshots"| node_validation
node_repository -->|"reads and writes"| node_database
node_archive_handoff -.->|"imports project data"| node_repository
node_sync_controls -.->|"configures sync"| node_sync_store
node_sync_store -->|"starts sign-in"| node_oauth
node_electron_shell -->|"relays OAuth"| node_oauth
node_sync_store -->|"manages sync state"| node_sync_storage
node_sync_engine -.->|"plans sync"| node_sync_storage
node_sync_providers -.->|"uses provider"| node_google_drive
node_sync_providers -.->|"uses provider"| node_steam_cloud
node_sync_store -.->|"dispatches sync"| node_sync_providers

click node_project_home "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/index.jsx"
click node_project_details "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/projects/%24projectId/index.jsx"
click node_project_store "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/stores/projectStore.js"
click node_metadata "https://github.com/mountea-framework/mounteadialoguer/tree/master/src/stores"
click node_dialogue_editor "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/projects/%24projectId/dialogue/%24dialogueId/index.jsx"
click node_dialogue_store "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/stores/dialogueStore.js"
click node_graph_nodes "https://github.com/mountea-framework/mounteadialoguer/tree/master/src/components/dialogue/nodes"
click node_graph_conditions "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/components/dialogue/edges/ConditionEdge.jsx"
click node_preview "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/components/dialogue/DialoguePreviewOverlay.jsx"
click node_preview_engine "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/dialoguePreviewEngine.js"
click node_validation "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/persistence/canonicalProject.js"
click node_archive_handoff "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/persistence/projectArchive.js"
click node_repository "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/persistence/projectRepository.js"
click node_database "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/db.js"
click node_sync_controls "https://github.com/mountea-framework/mounteadialoguer/tree/master/src/components/sync"
click node_sync_store "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/stores/syncStore.js"
click node_sync_engine "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/sync/syncEngine.js"
click node_sync_storage "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/sync/syncStorage.js"
click node_sync_providers "https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/sync/providers/storageProviders.js"
click node_electron_shell "https://github.com/mountea-framework/mounteadialoguer/blob/master/electron/main.cjs"

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_project_home,node_project_details,node_project_store,node_metadata toneBlue
class node_dialogue_editor,node_dialogue_store,node_graph_nodes,node_graph_conditions,node_preview,node_preview_engine,node_google_drive,node_steam_cloud toneAmber
class node_validation,node_archive_handoff,node_repository,node_database toneMint
class node_sync_controls,node_sync_store,node_sync_engine,node_sync_storage,node_sync_providers toneRose
class node_electron_shell,node_writer,node_oauth toneIndigo
```

## Components

### Project authoring

- [Project home](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/index.jsx): `src/routes/index.jsx`
- [Project workspace](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/projects/%24projectId/index.jsx): `src/routes/projects/$projectId/index.jsx`
- [Project state](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/stores/projectStore.js): `src/stores/projectStore.js`
- [Reusable metadata](https://github.com/mountea-framework/mounteadialoguer/tree/master/src/stores): `src/stores`

### Dialogue design

- [Graph editor](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/routes/projects/%24projectId/dialogue/%24dialogueId/index.jsx): `src/routes/projects/$projectId/dialogue/$dialogueId/index.jsx`
- [Dialogue state](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/stores/dialogueStore.js): `src/stores/dialogueStore.js`
- [Dialogue nodes](https://github.com/mountea-framework/mounteadialoguer/tree/master/src/components/dialogue/nodes): `src/components/dialogue/nodes`
- [Branch conditions](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/components/dialogue/edges/ConditionEdge.jsx): `src/components/dialogue/edges/ConditionEdge.jsx`
- [Flow preview](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/components/dialogue/DialoguePreviewOverlay.jsx): `src/components/dialogue/DialoguePreviewOverlay.jsx`
- [Preview evaluation](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/dialoguePreviewEngine.js): `src/lib/dialoguePreviewEngine.js`

### Project data

- [Project validation](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/persistence/canonicalProject.js): `src/lib/persistence/canonicalProject.js`
- [Import and export](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/persistence/projectArchive.js): `src/lib/persistence/projectArchive.js`
- [Project repository](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/persistence/projectRepository.js): `src/lib/persistence/projectRepository.js`
- [Profile database](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/db.js): `src/lib/db.js`

### Cloud sync

- [Sync controls](https://github.com/mountea-framework/mounteadialoguer/tree/master/src/components/sync): `src/components/sync`
- [Sync state](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/stores/syncStore.js): `src/stores/syncStore.js`
- [Sync planning](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/sync/syncEngine.js): `src/lib/sync/syncEngine.js`
- [Sync records](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/sync/syncStorage.js): `src/lib/sync/syncStorage.js`
- [Cloud providers](https://github.com/mountea-framework/mounteadialoguer/blob/master/src/lib/sync/providers/storageProviders.js): `src/lib/sync/providers/storageProviders.js`

### Desktop runtime

- [Electron desktop](https://github.com/mountea-framework/mounteadialoguer/blob/master/electron/main.cjs): `electron/main.cjs`

### Other components

- **Narrative designer**
- **Google Drive**
- **Steam Cloud**
- **Google OAuth**

## Connections

- Narrative designer → Project home: opens projects
- Project home → Project state: manages projects (evidence: `src/routes/index.jsx`)
- Project home → Import and export: imports archives (evidence: `src/routes/index.jsx`)
- Project state → Project repository: persists projects
- Project home → Project workspace: opens workspace
- Project workspace → Graph editor: opens dialogue
- Project workspace → Reusable metadata: organizes metadata
- Graph editor → Dialogue state: edits graph
- Graph editor → Dialogue nodes: renders nodes
- Graph editor → Branch conditions: edits branches
- Dialogue state → Project repository: commits changes (evidence: `src/stores/dialogueStore.js`)
- Graph editor → Flow preview: previews flow
- Flow preview → Preview evaluation: evaluates graph (evidence: `src/components/dialogue/DialoguePreviewOverlay.jsx`)
- Preview evaluation → Branch conditions: reads conditions
- Project repository → Project validation: validates snapshots (evidence: `src/lib/persistence/projectRepository.js`)
- Project repository → Profile database: reads and writes (evidence: `src/lib/persistence/projectRepository.js`)
- Import and export → Project repository: imports project data
- Sync controls → Sync state: configures sync
- Sync state → Google OAuth: starts sign-in (evidence: `src/stores/syncStore.js`)
- Electron desktop → Google OAuth: relays OAuth (evidence: `electron/main.cjs`)
- Sync state → Sync records: manages sync state (evidence: `src/stores/syncStore.js`)
- Sync planning → Sync records: plans sync
- Cloud providers → Google Drive: uses provider
- Cloud providers → Steam Cloud: uses provider
- Sync state → Cloud providers: dispatches sync
