How sneharathi24/storystitch works
StoryStitch is a browser-based AI writing companion. Authors capture rough notes, which are categorized into an Idea Vault; they can brainstorm questions, draft and save chapters, inspect each chapter’s Origin/Beats/Resolution context, and request context-aware rewrites. A separate analysis action checks pacing and continuity. FastAPI routes own the backend workflow, StoryStore persists ideas and chapters in SQLite, and LLMClient supplies local heuristics or optional hosted-model responses. The sampled files show the main route and call structure; some UI wiring and provider details are only partially excerpted.
Main entry points: app.js StoryStitch UI · app.py Idea & brainstorm API · llm_client.py LLM workflows · story_store.py Chapter records
Components 16
Writing experience
- StoryStitch UI
public/app.js - Web interface
public/index.html
API workflows
- Idea & brainstorm API
app.py - Chapter API
app.py - Rewrite API
app.py - Analysis API
app.py
Story context
- Idea Vault
story_store.py - Chapter records
story_store.py - Tri-Pillar context
story_store.py
Writing intelligence
- LLM workflows
llm_client.py - Brainstorm questions
llm_client.py - Stitch & Polish
llm_client.py - Pacing & continuity
llm_client.py
Persistence
- SQLite store
story_store.py
Other components
- Author
- Hosted model
Connections 26
- Author → StoryStitch UI: uses
README.md - StoryStitch UI → Web interface: renders
public/app.js - StoryStitch UI → Idea & brainstorm API: requests ideas
public/app.js - StoryStitch UI → Idea & brainstorm API: requests questions
public/app.js - StoryStitch UI → Chapter API: saves chapters
public/app.js - StoryStitch UI → Chapter API: loads context
public/app.js - StoryStitch UI → Rewrite API: requests rewrites
public/app.js - StoryStitch UI → Analysis API: requests analysis
public/app.js - Idea & brainstorm API → LLM workflows: categorizes notes
app.py - Idea & brainstorm API → Idea Vault: stores and lists
app.py - Idea & brainstorm API → Brainstorm questions: gets questions
app.py - Brainstorm questions → LLM workflows: generates questions
llm_client.py - Chapter API → Chapter records: creates and updates
app.py - Chapter API → Tri-Pillar context: builds context
app.py - Rewrite API → Chapter records: loads chapter
app.py - Rewrite API → Tri-Pillar context: builds context
app.py - Rewrite API → Stitch & Polish: requests options
app.py - Stitch & Polish → LLM workflows: generates rewrites
llm_client.py - Analysis API → Chapter records: loads draft
app.py - Analysis API → Tri-Pillar context: builds context
app.py - Analysis API → Pacing & continuity: requests review
app.py - Pacing & continuity → LLM workflows: analyzes draft
llm_client.py - Idea Vault → SQLite store: reads and writes
story_store.py - Chapter records → SQLite store: reads and writes
story_store.py - Tri-Pillar context → Idea Vault: selects notes
story_store.py - LLM workflows → Hosted model: calls when configured
llm_client.py