How aki-008/svelte-study works
This repository appears to be a desktop word-processing editor with a local workspace, DOCX import/export, and an optional AI editing sidecar. The likely user flow is editing paginated documents, saving them locally, and importing or exporting DOCX; the sidecar can read/write documents and run agent edits. The README provides no product overview, so capabilities are inferred from the source index and excerpts. Several UI and workspace connections are unsampled; uncertain links are omitted rather than inferred.
Main entry points: index.ts DOCX Importer · run.ts Agent Run Loop · pageSpecs.ts Page Geometry · main.ts Sidecar Entry Point
Components 24
Document Editing
- Rich Text Editor
editor/src/lib/Tiptap.svelte - Editing Commands
editor/src/lib/commands.ts - Ribbon Controls
editor/src/lib/ribbon/groups/HomeParagraphGroup.svelte - Paragraph Dialog
editor/src/lib/ribbon/dialogs/ParagraphDialog.svelte - Page Geometry
editor/src/lib/pageSpecs.ts - Headers and Footers
editor/src/lib/headerFooter.ts - Editor State
editor/src/lib/editorStore.svelte.ts
Document Formats
- DOCX Importer
editor/src/lib/import/index.ts - OOXML Parsing
editor/src/lib/import/ooxml.ts - Style Parsing
editor/src/lib/import/styles.ts - Table Parsing
editor/src/lib/import/tables.ts - DOCX Exporter
editor/src/lib/exportDocx.ts
Workspace Storage
- Document Contract
editor/src/lib/docEnvelope.ts - Browser Document Store
editor/src/lib/stores/documentStore.ts - Workspace Persistence
editor/src/lib/stores/workspaceLocal.svelte.ts
AI Sidecar
- Sidecar Entry Point
editor/server/main.ts - Sidecar HTTP API
editor/server/app.ts - File Document Store
editor/server/store.ts - Agent Run Loop
editor/src/lib/agent/run.ts - Document Edit Tools
editor/src/lib/agent/tools.ts - Model Configuration
editor/server/agent/fromEnv.ts - OpenAI Adapter
editor/server/agent/openai.ts
Other components
- Editor User
- Configured Model
Connections 27
- Editor User → Rich Text Editor: edits in
- Ribbon Controls → Editing Commands: invokes
editor/src/lib/ribbon/groups/HomeParagraphGroup.svelte - Paragraph Dialog → Editing Commands: invokes
editor/src/lib/ribbon/dialogs/ParagraphDialog.svelte - Paragraph Dialog → Page Geometry: converts units
editor/src/lib/ribbon/dialogs/ParagraphDialog.svelte - Rich Text Editor → Editor State: uses
- Rich Text Editor → Page Geometry: uses
- DOCX Importer → OOXML Parsing: parses XML with
editor/src/lib/import/index.ts - DOCX Importer → Style Parsing: reads styles with
editor/src/lib/import/index.ts - DOCX Importer → Table Parsing: reads tables with
editor/src/lib/import/index.ts - DOCX Importer → Page Geometry: uses
editor/src/lib/import/index.ts - DOCX Importer → Headers and Footers: uses
editor/src/lib/import/index.ts - DOCX Importer → DOCX Exporter: references
editor/src/lib/import/index.ts - DOCX Exporter → Page Geometry: uses
editor/src/lib/exportDocx.ts - DOCX Exporter → Headers and Footers: uses
editor/src/lib/exportDocx.ts - Workspace Persistence → Browser Document Store: uses
editor/src/lib/stores/workspaceLocal.svelte.ts - Browser Document Store → Document Contract: validates envelope
editor/src/lib/stores/documentStore.ts - Sidecar Entry Point → Sidecar HTTP API: starts server
editor/server/main.ts - Sidecar Entry Point → File Document Store: configures store
editor/server/main.ts - Sidecar Entry Point → Model Configuration: loads model config
editor/server/main.ts - Sidecar HTTP API → File Document Store: reads and writes
editor/server/app.ts - Sidecar HTTP API → Agent Run Loop: runs agent
editor/server/app.ts - File Document Store → Document Contract: migrates and validates
editor/server/store.ts - Agent Run Loop → Document Edit Tools: dispatches tools
editor/src/lib/agent/run.ts - Agent Run Loop → Document Contract: uses document contract
editor/src/lib/agent/run.ts - Document Edit Tools → Agent Run Loop: returns tool results
editor/src/lib/agent/run.ts - Model Configuration → OpenAI Adapter: configures adapter
editor/server/agent/fromEnv.ts - OpenAI Adapter → Configured Model: calls model