# rinkokawa/storyengine architecture

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

- Interactive diagram: https://gitdiagram.com/rinkokawa/storyengine
- Repository: https://github.com/rinkokawa/storyengine

## Overview

Novel Editor is a local-first Electron/Vue desktop writing app. Authors open or create a project from the home/project views, then work in its dashboard, manuscript, outline, character, worldview, and notes areas; changes persist as project files, while the manuscript’s AI assistant can request Qwen suggestions. The graph separates the renderer workflow, writing features, Electron IPC, and project storage/integration. Several feature-to-IPC links are documented in the README rather than visible in the sampled excerpts; unsampled details are not inferred beyond that documentation.

Main entry points: [`src/views/editor.vue`](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor.vue) (Editor shell), [`electron/preload.ts`](https://github.com/rinkokawa/storyengine/blob/master/electron/preload.ts) (Renderer bridge), [`src/views/editor/editor_manuscript.vue`](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript.vue) (Manuscript layout), [`src/views/index/index_projects.vue`](https://github.com/rinkokawa/storyengine/blob/master/src/views/index/index_projects.vue) (Project list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_renderer["Project navigation"]
  node_app["App entry<br/>[main.ts]"]
  node_home["Home views<br/>[index.vue]"]
  node_projects["Project list<br/>[index_projects.vue]"]
  node_project_create["Project creation"]
  node_editor_shell["Editor shell<br/>[editor.vue]"]
end

subgraph group_writing["Writing workspace"]
  node_dashboard["Activity dashboard"]
  node_manuscript["Manuscript layout"]
  node_outline["Volume chapter outline"]
  node_outline_items["Outline item views<br/>[volume_item.vue]"]
  node_body["Chapter editor"]
  node_ai["Writing assistant<br/>[manuscript_ai.vue]"]
  node_mentions["Manuscript mentions"]
  node_characters["Character management"]
  node_character_editor["Character editor"]
  node_avatar["Avatar cropper<br/>[avatarCropper.vue]"]
  node_worldview["Worldview entries"]
  node_notes["Notes management<br/>[editor_notes.vue]"]
end

subgraph group_desktop["Desktop services"]
  node_ipc["IPC handlers<br/>[main.ts]"]
  node_preload["Renderer bridge<br/>[preload.ts]"]
  node_qwen{{"Qwen API"}}
end

subgraph group_persistence["Project data"]
  node_service["Project file service<br/>[projectService.ts]"]
  node_project_files[("Project files")]
  node_logs["Operation logs"]
end

node_author(("Author"))

node_author -->|"uses"| node_app
node_app -->|"mounts"| node_home
node_home -->|"routes to"| node_projects
node_projects -->|"opens"| node_project_create
node_projects -->|"invokes project IPC"| node_ipc
node_projects -->|"opens project"| node_editor_shell
node_editor_shell -->|"selects view"| node_dashboard
node_editor_shell -->|"selects view"| node_manuscript
node_editor_shell -->|"selects view"| node_characters
node_editor_shell -->|"selects view"| node_worldview
node_editor_shell -->|"selects view"| node_notes
node_editor_shell -->|"selects view"| node_outline
node_manuscript -->|"renders"| node_outline
node_manuscript -->|"renders"| node_body
node_manuscript -->|"renders"| node_ai
node_manuscript -->|"renders"| node_mentions
node_manuscript -->|"passes chapter"| node_body
node_outline -->|"renders volumes"| node_outline_items
node_characters -->|"renders"| node_character_editor
node_character_editor -->|"uses cropper"| node_avatar
node_outline -->|"invokes outline IPC"| node_preload
node_body -->|"invokes chapter IPC"| node_preload
node_characters -->|"invokes character IPC"| node_preload
node_worldview -->|"invokes worldview IPC"| node_preload
node_notes -->|"invokes notes IPC"| node_preload
node_ai -->|"invokes chat IPC"| node_preload
node_preload -->|"forwards IPC"| node_ipc
node_ipc -->|"calls service"| node_service
node_service -->|"reads and writes"| node_project_files
node_service -->|"writes logs"| node_logs
node_ipc -->|"requests chat"| node_qwen
node_dashboard -->|"requests activity data"| node_preload

click node_app "https://github.com/rinkokawa/storyengine/blob/master/src/main.ts"
click node_home "https://github.com/rinkokawa/storyengine/blob/master/src/views/index.vue"
click node_projects "https://github.com/rinkokawa/storyengine/blob/master/src/views/index/index_projects.vue"
click node_project_create "https://github.com/rinkokawa/storyengine/blob/master/src/views/index/index_create_project.vue"
click node_editor_shell "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor.vue"
click node_dashboard "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_dashboard.vue"
click node_manuscript "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript.vue"
click node_outline "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_outline.vue"
click node_outline_items "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/outline/volume_item.vue"
click node_body "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_body.vue"
click node_ai "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_ai.vue"
click node_mentions "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_mentions.vue"
click node_characters "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_characters.vue"
click node_character_editor "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_characters/editor_character_editor.vue"
click node_avatar "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_characters/avatarCropper.vue"
click node_worldview "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_worldview.vue"
click node_notes "https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_notes.vue"
click node_ipc "https://github.com/rinkokawa/storyengine/blob/master/electron/main.ts"
click node_preload "https://github.com/rinkokawa/storyengine/blob/master/electron/preload.ts"
click node_service "https://github.com/rinkokawa/storyengine/blob/master/electron/service/projectService.ts"

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_home,node_projects,node_project_create,node_editor_shell toneBlue
class node_dashboard,node_manuscript,node_outline,node_outline_items,node_body,node_ai,node_mentions,node_characters,node_character_editor,node_avatar,node_worldview,node_notes toneAmber
class node_ipc,node_preload,node_qwen toneMint
class node_service,node_project_files,node_logs toneRose
class node_author toneIndigo
```

## Components

### Project navigation

- [App entry](https://github.com/rinkokawa/storyengine/blob/master/src/main.ts): `src/main.ts`
- [Home views](https://github.com/rinkokawa/storyengine/blob/master/src/views/index.vue): `src/views/index.vue`
- [Project list](https://github.com/rinkokawa/storyengine/blob/master/src/views/index/index_projects.vue): `src/views/index/index_projects.vue`
- [Project creation](https://github.com/rinkokawa/storyengine/blob/master/src/views/index/index_create_project.vue): `src/views/index/index_create_project.vue`
- [Editor shell](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor.vue): `src/views/editor.vue`

### Writing workspace

- [Activity dashboard](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_dashboard.vue): `src/views/editor/editor_dashboard.vue`
- [Manuscript layout](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript.vue): `src/views/editor/editor_manuscript.vue`
- [Volume chapter outline](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_outline.vue): `src/views/editor/editor_manuscript/manuscript_outline.vue`
- [Outline item views](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/outline/volume_item.vue): `src/views/editor/editor_manuscript/outline/volume_item.vue`
- [Chapter editor](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_body.vue): `src/views/editor/editor_manuscript/manuscript_body.vue`
- [Writing assistant](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_ai.vue): `src/views/editor/editor_manuscript/manuscript_ai.vue`
- [Manuscript mentions](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_manuscript/manuscript_mentions.vue): `src/views/editor/editor_manuscript/manuscript_mentions.vue`
- [Character management](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_characters.vue): `src/views/editor/editor_characters.vue`
- [Character editor](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_characters/editor_character_editor.vue): `src/views/editor/editor_characters/editor_character_editor.vue`
- [Avatar cropper](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_characters/avatarCropper.vue): `src/views/editor/editor_characters/avatarCropper.vue`
- [Worldview entries](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_worldview.vue): `src/views/editor/editor_worldview.vue`
- [Notes management](https://github.com/rinkokawa/storyengine/blob/master/src/views/editor/editor_notes.vue): `src/views/editor/editor_notes.vue`

### Desktop services

- [IPC handlers](https://github.com/rinkokawa/storyengine/blob/master/electron/main.ts): `electron/main.ts`
- [Renderer bridge](https://github.com/rinkokawa/storyengine/blob/master/electron/preload.ts): `electron/preload.ts`
- **Qwen API**

### Project data

- [Project file service](https://github.com/rinkokawa/storyengine/blob/master/electron/service/projectService.ts): `electron/service/projectService.ts`
- **Project files**
- **Operation logs**

### Other components

- **Author**

## Connections

- Author → App entry: uses (evidence: `src/main.ts`)
- App entry → Home views: mounts (evidence: `src/main.ts`)
- Home views → Project list: routes to (evidence: `src/views/index.vue`)
- Project list → Project creation: opens (evidence: `src/views/index/index_projects.vue`)
- Project list → IPC handlers: invokes project IPC (evidence: `src/views/index/index_projects.vue`)
- Project list → Editor shell: opens project (evidence: `src/views/index.vue`)
- Editor shell → Activity dashboard: selects view (evidence: `src/views/editor.vue`)
- Editor shell → Manuscript layout: selects view (evidence: `src/views/editor.vue`)
- Editor shell → Character management: selects view (evidence: `src/views/editor.vue`)
- Editor shell → Worldview entries: selects view (evidence: `src/views/editor.vue`)
- Editor shell → Notes management: selects view (evidence: `src/views/editor.vue`)
- Editor shell → Volume chapter outline: selects view (evidence: `src/views/editor.vue`)
- Manuscript layout → Volume chapter outline: renders (evidence: `src/views/editor/editor_manuscript.vue`)
- Manuscript layout → Chapter editor: renders (evidence: `src/views/editor/editor_manuscript.vue`)
- Manuscript layout → Writing assistant: renders (evidence: `src/views/editor/editor_manuscript.vue`)
- Manuscript layout → Manuscript mentions: renders (evidence: `src/views/editor/editor_manuscript.vue`)
- Manuscript layout → Chapter editor: passes chapter (evidence: `src/views/editor/editor_manuscript.vue`)
- Volume chapter outline → Outline item views: renders volumes (evidence: `src/views/editor/editor_manuscript/manuscript_outline.vue`)
- Character management → Character editor: renders (evidence: `src/views/editor/editor_characters.vue`)
- Character editor → Avatar cropper: uses cropper (evidence: `src/views/editor/editor_characters/editor_character_editor.vue`)
- Volume chapter outline → Renderer bridge: invokes outline IPC (evidence: `README.md`)
- Chapter editor → Renderer bridge: invokes chapter IPC (evidence: `README.md`)
- Character management → Renderer bridge: invokes character IPC (evidence: `README.md`)
- Worldview entries → Renderer bridge: invokes worldview IPC (evidence: `README.md`)
- Notes management → Renderer bridge: invokes notes IPC (evidence: `README.md`)
- Writing assistant → Renderer bridge: invokes chat IPC (evidence: `README.md`)
- Renderer bridge → IPC handlers: forwards IPC (evidence: `README.md`)
- IPC handlers → Project file service: calls service (evidence: `electron/main.ts`)
- Project file service → Project files: reads and writes (evidence: `README.md`)
- Project file service → Operation logs: writes logs (evidence: `README.md`)
- IPC handlers → Qwen API: requests chat (evidence: `README.md`)
- Activity dashboard → Renderer bridge: requests activity data (evidence: `README.md`)
