# 1145141919810tonny/shiori-editor architecture

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

- Interactive diagram: https://gitdiagram.com/1145141919810tonny/shiori-editor
- Repository: https://github.com/1145141919810tonny/shiori-editor

## Overview

Shiori Editor is a WPF visual novel project editor. Its main workflow is to edit character and engine configuration, open scene files in the visual scene editor, parse and modify story entries, and save scene or configuration changes. The sampled code shows the scene editor using file-management and parsing components, while the character editor references autosave and an embedded HTTP server. The README gives no further capability details; several connections are supported only by the source index, so unsampled behavior is not expanded.

Main entry points: [`CharEditorWindow.xaml.cs`](https://github.com/1145141919810tonny/shiori-editor/blob/main/CharEditorWindow.xaml.cs) (Character Editor), [`SceneEditorControl.xaml.cs`](https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneEditorControl.xaml.cs) (Scene Editor), [`SceneParser.cs`](https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneParser.cs) (Scene Parser), [`EngineValidationResult.cs`](https://github.com/1145141919810tonny/shiori-editor/blob/main/EngineValidationResult.cs) (Engine Validation Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editing["Project Editing"]
  node_character_editor["Character Editor"]
  node_config_autosave["Config Autosave<br/>[AutoSaveService.cs]"]
  node_command_translator["Command Translator"]
end

subgraph group_scene["Scene Workflow"]
  node_scene_editor["Scene Editor"]
  node_scene_files["Scene Files"]
  node_scene_parser["Scene Parser<br/>[SceneParser.cs]"]
  node_scene_model["Scene Data Model<br/>[SceneDataModel.cs]"]
end

subgraph group_support["Validation and Help"]
  node_engine_validation["Engine Validation Data"]
  node_help_window["Help Window<br/>[HelpWindow.xaml.cs]"]
  node_validation_details["Validation Details"]
end

subgraph group_serving["Local Serving"]
  node_http_server["Local HTTP Server<br/>[HttpServer.cs]"]
end

node_user(("Editor User"))

node_user -->|"edits project"| node_character_editor
node_character_editor -->|"initializes"| node_scene_editor
node_character_editor -->|"initializes"| node_config_autosave
node_character_editor -->|"references"| node_http_server
node_scene_editor -->|"manages files"| node_scene_files
node_scene_editor -->|"parses scenes"| node_scene_parser
node_scene_editor -->|"uses data"| node_scene_model
node_scene_files -->|"parses files"| node_scene_parser
node_scene_parser -->|"creates data"| node_scene_model
node_character_editor -->|"references"| node_engine_validation
node_help_window -->|"displays result"| node_engine_validation
node_help_window -->|"opens details"| node_validation_details
node_validation_details -->|"reads result"| node_engine_validation

click node_character_editor "https://github.com/1145141919810tonny/shiori-editor/blob/main/CharEditorWindow.xaml.cs"
click node_config_autosave "https://github.com/1145141919810tonny/shiori-editor/blob/main/Services/AutoSaveService.cs"
click node_command_translator "https://github.com/1145141919810tonny/shiori-editor/blob/main/CommandTranslator.cs"
click node_scene_editor "https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneEditorControl.xaml.cs"
click node_scene_files "https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneFileManager.cs"
click node_scene_parser "https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneParser.cs"
click node_scene_model "https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneDataModel.cs"
click node_engine_validation "https://github.com/1145141919810tonny/shiori-editor/blob/main/EngineValidationResult.cs"
click node_help_window "https://github.com/1145141919810tonny/shiori-editor/blob/main/HelpWindow.xaml.cs"
click node_validation_details "https://github.com/1145141919810tonny/shiori-editor/blob/main/ValidationDetailWindow.xaml.cs"
click node_http_server "https://github.com/1145141919810tonny/shiori-editor/blob/main/HttpServer.cs"

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_character_editor,node_config_autosave,node_command_translator,node_user toneBlue
class node_scene_editor,node_scene_files,node_scene_parser,node_scene_model toneAmber
class node_engine_validation,node_help_window,node_validation_details toneMint
class node_http_server toneRose
```

## Components

### Project Editing

- [Character Editor](https://github.com/1145141919810tonny/shiori-editor/blob/main/CharEditorWindow.xaml.cs): `CharEditorWindow.xaml.cs`
- [Config Autosave](https://github.com/1145141919810tonny/shiori-editor/blob/main/Services/AutoSaveService.cs): `Services/AutoSaveService.cs`
- [Command Translator](https://github.com/1145141919810tonny/shiori-editor/blob/main/CommandTranslator.cs): `CommandTranslator.cs`

### Scene Workflow

- [Scene Editor](https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneEditorControl.xaml.cs): `SceneEditorControl.xaml.cs`
- [Scene Files](https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneFileManager.cs): `SceneFileManager.cs`
- [Scene Parser](https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneParser.cs): `SceneParser.cs`
- [Scene Data Model](https://github.com/1145141919810tonny/shiori-editor/blob/main/SceneDataModel.cs): `SceneDataModel.cs`

### Validation and Help

- [Engine Validation Data](https://github.com/1145141919810tonny/shiori-editor/blob/main/EngineValidationResult.cs): `EngineValidationResult.cs`
- [Help Window](https://github.com/1145141919810tonny/shiori-editor/blob/main/HelpWindow.xaml.cs): `HelpWindow.xaml.cs`
- [Validation Details](https://github.com/1145141919810tonny/shiori-editor/blob/main/ValidationDetailWindow.xaml.cs): `ValidationDetailWindow.xaml.cs`

### Local Serving

- [Local HTTP Server](https://github.com/1145141919810tonny/shiori-editor/blob/main/HttpServer.cs): `HttpServer.cs`

### Other components

- **Editor User**

## Connections

- Editor User → Character Editor: edits project
- Character Editor → Scene Editor: initializes (evidence: `CharEditorWindow.xaml.cs`)
- Character Editor → Config Autosave: initializes (evidence: `CharEditorWindow.xaml.cs`)
- Character Editor → Local HTTP Server: references (evidence: `CharEditorWindow.xaml.cs`)
- Scene Editor → Scene Files: manages files (evidence: `SceneEditorControl.xaml.cs`)
- Scene Editor → Scene Parser: parses scenes (evidence: `SceneEditorControl.xaml.cs`)
- Scene Editor → Scene Data Model: uses data (evidence: `SceneEditorControl.xaml.cs`)
- Scene Files → Scene Parser: parses files (evidence: `SceneFileManager.cs`)
- Scene Parser → Scene Data Model: creates data (evidence: `SceneParser.cs`)
- Character Editor → Engine Validation Data: references (evidence: `CharEditorWindow.xaml.cs`)
- Help Window → Engine Validation Data: displays result (evidence: `HelpWindow.xaml.cs`)
- Help Window → Validation Details: opens details (evidence: `HelpWindow.xaml.cs`)
- Validation Details → Engine Validation Data: reads result (evidence: `ValidationDetailWindow.xaml.cs`)
