# deepsavage/storyforge architecture

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

- Interactive diagram: https://gitdiagram.com/deepsavage/storyforge
- Repository: https://github.com/deepsavage/storyforge

## Overview

Narrative Tale Studios is a browser-based visual story builder, documented as a single-file application. Its main workflow is creating and saving scenes, then viewing and arranging their branching structure on a node map. The README also describes themes, local persistence, and story import/export. No source excerpts were provided, so the components and relationships below reflect documented capabilities rather than inspected implementation details.

Main entry points: [`index.html`](https://github.com/deepsavage/storyforge/blob/main/index.html) (Scene Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Story Authoring"]
  node_scene_editor["Scene Editor<br/>[index.html]"]
  node_scene_content["Scene Content<br/>[index.html]"]
  node_branching_choices["Branching Choices<br/>[index.html]"]
  node_continue_flow["Continue Flow<br/>[index.html]"]
  node_timed_scenes["Timed Scenes<br/>[index.html]"]
end

subgraph group_visualization["Story Visualization"]
  node_story_map["Node Map<br/>[index.html]"]
  node_map_layout["Auto Layout<br/>[index.html]"]
  node_map_navigation["Map Navigation<br/>[index.html]"]
  node_connection_feedback["Connection Feedback<br/>[index.html]"]
end

subgraph group_data_preferences["Data &amp; Preferences"]
  node_story_import["Story Import<br/>[index.html]"]
  node_story_export["JSON Export<br/>[index.html]"]
  node_local_story_data[("Browser Story Data<br/>[index.html]")]
  node_theme_system["Theme System<br/>[index.html]"]
end

node_writer(("Story Designer"))

node_writer -->|"authors scenes"| node_scene_editor
node_scene_editor -->|"saves scene details"| node_scene_content
node_scene_editor -->|"defines choices"| node_branching_choices
node_scene_editor -->|"sets progression"| node_continue_flow
node_scene_editor -->|"sets timers"| node_timed_scenes
node_scene_editor -->|"updates map"| node_story_map
node_writer -->|"navigates map"| node_story_map
node_writer -->|"requests layout"| node_map_layout
node_writer -->|"zooms and pans"| node_map_navigation
node_writer -->|"focuses nodes"| node_connection_feedback
node_story_import -->|"loads stories"| node_local_story_data
node_local_story_data -->|"provides story data"| node_story_export
node_writer -->|"imports stories"| node_story_import
node_writer -->|"exports JSON"| node_story_export
node_writer -->|"selects theme"| node_theme_system
node_theme_system -->|"persists preference"| node_local_story_data
node_scene_editor -->|"saves locally"| node_local_story_data

click node_scene_editor "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_scene_content "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_branching_choices "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_continue_flow "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_timed_scenes "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_story_map "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_map_layout "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_map_navigation "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_connection_feedback "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_story_import "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_story_export "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_local_story_data "https://github.com/deepsavage/storyforge/blob/main/index.html"
click node_theme_system "https://github.com/deepsavage/storyforge/blob/main/index.html"

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_scene_editor,node_scene_content,node_branching_choices,node_continue_flow,node_timed_scenes toneBlue
class node_story_map,node_map_layout,node_map_navigation,node_connection_feedback toneAmber
class node_story_import,node_story_export,node_local_story_data,node_theme_system toneMint
class node_writer toneIndigo
```

## Components

### Story Authoring

- [Scene Editor](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Scene Content](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Branching Choices](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Continue Flow](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Timed Scenes](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`

### Story Visualization

- [Node Map](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Auto Layout](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Map Navigation](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Connection Feedback](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`

### Data & Preferences

- [Story Import](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [JSON Export](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Browser Story Data](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`
- [Theme System](https://github.com/deepsavage/storyforge/blob/main/index.html): `index.html`

### Other components

- **Story Designer**

## Connections

- Story Designer → Scene Editor: authors scenes (evidence: `README.md`)
- Scene Editor → Scene Content: saves scene details (evidence: `README.md`)
- Scene Editor → Branching Choices: defines choices (evidence: `README.md`)
- Scene Editor → Continue Flow: sets progression (evidence: `README.md`)
- Scene Editor → Timed Scenes: sets timers (evidence: `README.md`)
- Scene Editor → Node Map: updates map (evidence: `README.md`)
- Story Designer → Node Map: navigates map (evidence: `README.md`)
- Story Designer → Auto Layout: requests layout (evidence: `README.md`)
- Story Designer → Map Navigation: zooms and pans (evidence: `README.md`)
- Story Designer → Connection Feedback: focuses nodes (evidence: `README.md`)
- Story Import → Browser Story Data: loads stories (evidence: `README.md`)
- Browser Story Data → JSON Export: provides story data (evidence: `README.md`)
- Story Designer → Story Import: imports stories (evidence: `README.md`)
- Story Designer → JSON Export: exports JSON (evidence: `README.md`)
- Story Designer → Theme System: selects theme (evidence: `README.md`)
- Theme System → Browser Story Data: persists preference (evidence: `README.md`)
- Scene Editor → Browser Story Data: saves locally (evidence: `README.md`)
