How dukechristyd/garlea-storywriter works
Garlea Storywriter is a collaborative interactive-fiction editor. Writers enter through Google sign-in or sandbox preview, then select and edit stories and chapters, manage cast and suggestions, and optionally playtest Ink-style branches. The app persists work locally and can sync it to Firebase, while version history supports rollback and Discord can announce activity. The graph reflects calls visible in excerpts and component references in the source index; README documentation was empty, so unsampled capabilities are represented only where the index and excerpts support them.
Main entry points: App.tsx Workspace Controller · story.ts Story Types · versionService.ts Version Service · firebase.ts Firebase Auth and DB
Components 22
Writer Workflow
- Workspace Controller
garlea-storywriter/src/App.tsx - Login Screen
garlea-storywriter/src/components/IntroLoginScreen.tsx - Chapter Navigator
garlea-storywriter/src/components/ChapterList.tsx - Story Tabs
garlea-storywriter/src/components/ChromeTabSidebar.tsx - Story Editor
garlea-storywriter/src/components/StoryEditor.tsx - Cast Manager
garlea-storywriter/src/components/CharactersDrawer.tsx - Suggestions
garlea-storywriter/src/components/SuggestionsDrawer.tsx - Sync Conflicts
garlea-storywriter/src/components/SyncConflictModal.tsx - Version History
garlea-storywriter/src/components/VersionHistoryModal.tsx - Workspace Settings
garlea-storywriter/src/components/SettingsModal.tsx
Persistence and Identity
- Story Storage
garlea-storywriter/src/services/storageService.ts - Version Service
garlea-storywriter/src/services/versionService.ts - Firebase Auth and DB
garlea-storywriter/src/services/firebase.ts - Firestore
- Browser Storage
Playtest and Integrations
- Ink Playtest UI
garlea-storywriter/src/components/InkPlaytestModal.tsx - Ink Parser
garlea-storywriter/src/services/inkEngine.ts - Discord Notifier
garlea-storywriter/src/services/discordService.ts - Discord Webhook
- Custom Story API
Story Domain
- Story Types
garlea-storywriter/src/types/story.ts
Other components
- Writer
Connections 35
- Writer → Login Screen: starts with
garlea-storywriter/src/components/IntroLoginScreen.tsx - Workspace Controller → Login Screen: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Firebase Auth and DB: signs in via
garlea-storywriter/src/App.tsx - Workspace Controller → Story Storage: loads and saves
garlea-storywriter/src/App.tsx - Workspace Controller → Story Tabs: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Chapter Navigator: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Story Editor: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Cast Manager: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Suggestions: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Sync Conflicts: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Version History: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Workspace Settings: renders
garlea-storywriter/src/App.tsx - Workspace Controller → Version Service: creates snapshots
garlea-storywriter/src/App.tsx - Workspace Controller → Version Service: fetches history
garlea-storywriter/src/App.tsx - Story Storage → Firebase Auth and DB: gets instances
garlea-storywriter/src/services/storageService.ts - Story Storage → Firestore: syncs stories
garlea-storywriter/src/services/storageService.ts - Story Storage → Browser Storage: persists settings and stories
garlea-storywriter/src/services/storageService.ts - Version Service → Firebase Auth and DB: gets instances
garlea-storywriter/src/services/versionService.ts - Version Service → Firestore: stores snapshots
garlea-storywriter/src/services/versionService.ts - Version Service → Browser Storage: caches snapshots
garlea-storywriter/src/services/versionService.ts - Firebase Auth and DB → Firestore: initializes database
garlea-storywriter/src/services/firebase.ts - Firebase Auth and DB → Writer: authenticates
garlea-storywriter/src/services/firebase.ts - Workspace Controller → Story Types: updates story data
garlea-storywriter/src/App.tsx - Story Editor → Story Types: edits chapters
garlea-storywriter/src/components/StoryEditor.tsx - Chapter Navigator → Story Types: navigates chapters
garlea-storywriter/src/components/ChapterList.tsx - Cast Manager → Story Types: manages cast
garlea-storywriter/src/components/CharactersDrawer.tsx - Suggestions → Story Types: manages suggestions
garlea-storywriter/src/components/SuggestionsDrawer.tsx - Version History → Story Types: displays versions
garlea-storywriter/src/components/VersionHistoryModal.tsx - Ink Playtest UI → Ink Parser: parses chapter
garlea-storywriter/src/components/InkPlaytestModal.tsx - Story Editor → Ink Playtest UI: opens playtest
garlea-storywriter/src/components/StoryEditor.tsx - Story Editor → Custom Story API: requests assistance
- Workspace Settings → Discord Notifier: tests webhook
garlea-storywriter/src/components/SettingsModal.tsx - Workspace Controller → Discord Notifier: notifies activity
garlea-storywriter/src/App.tsx - Discord Notifier → Discord Webhook: posts webhook
garlea-storywriter/src/services/discordService.ts - Workspace Settings → Story Types: configures workspace
garlea-storywriter/src/components/SettingsModal.tsx