How mugyen/obsidian-sync-outline works
Outline Sync is an Obsidian plugin that continuously reconciles vault notes with an Outline wiki. A user edits notes or invokes sync; the plugin schedules the engine, which reads local files and merge-base state, fetches Outline revisions, decides push, pull, skip, delete, or conflict, then applies changes. Markdown conversion, nested paths, and attachments support the transfer. Conflicts open a diff-driven decision modal. The graph reflects sampled runtime code and README capabilities; some engine internals are represented at their enclosing source path.
Components 15
Plugin Interaction
- Plugin Runtime
src/main.ts - Settings UI
src/ui/settings-tab.ts - Conflict Modal
src/ui/conflict-modal.ts
Sync Reconciliation
- Sync Engine
src/sync/engine.ts - Markdown Codec
src/sync/markdown.ts - Path Mapper
src/sync/paths.ts - Diff Engine
src/sync/diff.ts - Attachment Handling
src/sync/engine.ts - Sync Actions
src/types.ts
Local Persistence
- Obsidian Vault
- Sync State Store
src/sync/state.ts
Outline Integration
- Outline Client
src/outline/client.ts - Outline Wiki
- Remote Documents
src/types.ts
Other components
- Obsidian User
Connections 18
- Obsidian User → Plugin Runtime: edits/commands
- Plugin Runtime → Settings UI: opens settings
- Settings UI → Outline Client: tests connection
- Plugin Runtime → Sync Engine: runs sync
- Plugin Runtime → Sync Engine: queues edits
- Plugin Runtime → Conflict Modal: asks conflicts
- Conflict Modal → Diff Engine: renders diff
- Sync Engine → Obsidian Vault: reads/writes notes
- Sync Engine → Sync State Store: reads/writes base
- Sync Engine → Markdown Codec: converts content
- Sync Engine → Path Mapper: maps nesting
- Sync Engine → Outline Client: fetches/updates
- Outline Client → Outline Wiki: calls API
- Outline Client → Remote Documents: returns documents
- Sync Engine → Sync Actions: produces actions
- Sync Engine → Attachment Handling: processes images
- Attachment Handling → Obsidian Vault: stores downloads
- Attachment Handling → Outline Client: uploads/downloads