Storyteller Suite - Project Structure
Root Directory
storyteller-suite/
├── manifest.json # Obsidian plugin manifest
├── package.json # Node.js dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── esbuild.config.mjs # Build configuration
├── vitest.config.ts # Test configuration
├── main.css # Global styles (input)
├── versions.json # Version history for Obsidian
├── README.md # User documentation
├── CHANGELOG.md # Version changelog
├── CONTRIBUTING.md # Contribution guidelines
├── TRANSLATION_GUIDE.md # i18n instructions
└── src/ # Source code
Source Code Structure (src/)
Entry Points
| File | Purpose |
|---|---|
main.ts |
Main plugin class StorytellerSuitePlugin |
types.ts |
Core TypeScript interfaces for all entities |
Modals (src/modals/)
Modal dialogs for entity CRUD operations:
modals/
├── ResponsiveModal.ts # Base class with mobile support
├── DashboardModal.ts # Main dashboard interface
├── CharacterModal.ts # Character create/edit
├── LocationModal.ts # Location create/edit
├── EventModal.ts # Event create/edit
├── SceneModal.ts # Scene create/edit
├── ChapterModal.ts # Chapter create/edit
├── GroupModal.ts # Group create/edit
├── MapModal.ts # Map create/edit
├── TimelineModal.ts # Timeline viewer
├── NetworkGraphModal.ts # Relationship graph
├── GalleryModal.ts # Image gallery
├── ImportConfigModal.ts # Document import wizard
├── TemplateLibraryModal.ts # Template browser
├── *ListModal.ts # Entity list views
├── *SuggestModal.ts # Entity selection dropdowns
└── ui/
├── ConfirmModal.ts # Confirmation dialogs
└── PromptModal.ts # Input prompts
Views (src/views/)
Obsidian workspace views:
| File | Purpose |
|---|---|
AnalyticsDashboardView.ts |
Main dashboard pane |
TimelineView.ts |
Timeline/Gantt visualization |
NetworkGraphView.ts |
Cytoscape relationship graph |
Compile System (src/compile/)
Manuscript compilation and export:
compile/
├── CompileEngine.ts # Workflow execution engine
├── SceneOrderManager.ts # Scene/chapter ordering
├── WordCountTracker.ts # Word count analytics
└── index.ts # Exports
Import System (src/import/)
Document parsing and import:
import/
├── ImportManager.ts # Import orchestration
├── ImportTypes.ts # Import interfaces
├── EntityExtractor.ts # Character/location detection
└── parsers/
├── DocxParser.ts # Microsoft Word
├── EpubParser.ts # EPUB ebooks
├── PdfParser.ts # PDF documents
├── MarkdownParser.ts # Markdown files
├── HtmlParser.ts # HTML documents
├── RtfParser.ts # Rich Text Format
├── OdtParser.ts # OpenDocument Text
├── FountainParser.ts # Screenplay format
├── JsonParser.ts # JSON data
└── PlainTextParser.ts # Plain text
Leaflet Map System (src/leaflet/)
Interactive map integration:
leaflet/
├── processor.ts # Map code block processor
├── EntityMarkerDiscovery.ts # Auto-detect map markers
├── EntityLinker.ts # Entity-marker linking
├── MapEntityRenderer.ts # Marker rendering
├── ObsidianTileLayer.ts # Custom tile loading
├── TileGenerator.ts # Tile generation
├── types.ts # Map interfaces
└── utils/
├── parser.ts # Map config parsing
└── RasterCoords.ts # Coordinate utilities
Template System (src/templates/)
Template management:
templates/
├── TemplateTypes.ts # Template interfaces
├── TemplateApplicator.ts # Apply templates to entities
├── TemplateStorageManager.ts # Save/load templates
├── TemplateValidator.ts # Template validation
├── TemplateMigrator.ts # Version migration
├── NoteToTemplateConverter.ts # Note → template conversion
├── EntityToTemplateConverter.ts # Entity → template
├── VariableSubstitution.ts # {{variable}} processing
├── modals/
│ ├── StoryTemplateGalleryModal.ts
│ └── StoryTemplateDetailModal.ts
└── prebuilt/
├── CharacterTemplates.ts
├── LocationTemplates.ts
├── EventTemplates.ts
├── GroupTemplates.ts
├── ItemTemplates.ts
├── MapTemplates.ts
├── FantasyKingdom.ts # Full world template
├── CyberpunkMetropolis.ts # Full world template
├── MurderMystery.ts # Story structure
├── StoryStructureTemplates.ts
└── WorldbuildingTemplates.ts
Internationalization (src/i18n/)
Multi-language support:
i18n/
├── strings.ts # Language loader and t() function
└── locales/
├── en.json # English (base)
├── zh.json # Chinese (existing)
├── de.json.template # German (template)
├── es.json.template # Spanish (template)
├── fr.json.template # French (template)
├── ja.json.template # Japanese (template)
├── ko.json.template # Korean (template)
├── pt.json.template # Portuguese (template)
├── README.md
└── PRIORITY_LANGUAGES.md
Utilities (src/utils/)
Helper functions and managers:
utils/
├── frontmatter.ts # YAML frontmatter parsing
├── YamlSerializer.ts # YAML serialization
├── DateParsing.ts # Natural language dates
├── EntityTemplates.ts # Entity scaffolding
├── FolderResolver.ts # Custom folder paths
├── MapManager.ts # Map CRUD operations
├── MapHierarchyManager.ts # Map parent/child relations
├── EraManager.ts # Historical eras
├── ConflictDetector.ts # Data conflict detection
├── GraphUtils.ts # Network graph helpers
├── TimelineRenderer.ts # Timeline rendering
├── TimelineFilterBuilder.ts # Timeline filters
├── TimelineControlsBuilder.ts # Timeline controls
├── TimelineTrackManager.ts # Multi-track timelines
├── StoryBoardGenerator.ts # Canvas story boards
├── TagEventGenerator.ts # Tag-based events
├── TagTimelineGenerator.ts # Tag-based timelines
├── PlatformUtils.ts # Mobile/desktop detection
├── ImageSelectionHelper.ts # Image picker utilities
├── LocationMigration.ts # Data migration
├── TemplateBackgrounds.ts # Template preview images
├── TemplatePreviewRenderer.ts # Template previews
├── dataview.ts # DataView integration
└── log.ts # Debug logging
Services (src/services/)
Business logic services:
| File | Purpose |
|---|---|
LocationService.ts |
Location CRUD and hierarchy |
Components (src/components/)
Reusable UI components:
| File | Purpose |
|---|---|
LocationPicker.ts |
Location selection widget |
Commands (src/commands/)
Command palette actions:
| File | Purpose |
|---|---|
SaveNoteAsTemplateCommand.ts |
Save current note as template |
Folders (src/folders/)
Folder resolution logic:
| File | Purpose |
|---|---|
FolderResolver.ts |
Custom folder path resolution |
YAML (src/yaml/)
YAML section handling:
| File | Purpose |
|---|---|
EntitySections.ts |
Parse/serialize entity sections |
Test Structure (test/)
test/
├── __mocks__/
│ └── obsidian.ts # Obsidian API mock
├── folders/
│ └── FolderResolver.test.ts
├── utils/
│ ├── DateParsing.test.ts
│ ├── EntityTemplates.test.ts
│ └── YamlSerializer.test.ts
├── yaml/
│ └── EntitySections.test.ts
└── integration/
└── empty-fields-preservation.test.ts
Template Storage (StorytellerSuite/)
User-created templates:
StorytellerSuite/
└── Templates/
└── Notes/
├── Characters/
│ ├── hero-character-template.md
│ └── simple-character-template.md
└── Locations/
└── castle-template.md
Build Outputs
| File | Generated By |
|---|---|
main.js |
esbuild (bundled plugin) |
styles.css |
esbuild (from main.css) |
Configuration Files
| File | Purpose |
|---|---|
.editorconfig |
Editor settings (tabs, line endings) |
.eslintrc |
ESLint rules |
.eslintignore |
ESLint exclusions |
.npmrc |
npm configuration |
.mailmap |
Git author mapping |
renovate.json |
Dependency update bot |
tsconfig.vitest.json |
Vitest TypeScript config |
GitHub Workflows (.github/)
.github/
├── dependabot.yml # Dependency updates
├── RELEASE_GUIDE.md # Release instructions
├── chatmodes/
│ └── plan.chatmode.md
└── workflows/
└── release.yml # Automated release workflow