How jfarid27/canonic works
Canonic is a local-first Electron markdown workspace for product teams. The main workflow is choosing a workspace, editing documents, and saving them locally with Git-backed history; users can also search, comment, share with peers, and consult an AI assistant. The graph connects the Vue interface and shared store to the Electron boundary, then shows documented or source-supported service responsibilities. Several subsystem paths are based on the repository tree and README capabilities; unsampled wiring is left out where it cannot be established.
Main entry points: main.js Electron runtime · index.js Application state · MainLayout.vue Workspace layout · Editor.vue Markdown editor
Components 20
Workspace interface
- Workspace layout
src/components/layout/MainLayout.vue - Workspace setup
src/components/layout/WorkspaceSetup.vue - Markdown editor
src/components/editor/Editor.vue - Find and replace
src/components/panels/SearchView.vue
Documents and state
- Application state
src/store/index.js - IPC bridge
electron/preload.js - Electron runtime
electron/main.js - Workspace files
electron/fileIndex.js - Markdown workspace
History and search
- Git operations
electron/git.js - Version history
electron/versions.js - Workspace search
electron/workspace-search.js - Search index
electron/search.js
Collaboration and AI
- Comment sync
electron/comment-sync.js - Peer discovery
electron/discovery.js - Peer sharing
electron/share.js - Peer devices
- AI assistant
src/components/panels/AIChat.vue - AI provider
Other components
- Workspace user
Connections 23
- Workspace user → Workspace setup: chooses workspace
- Workspace user → Workspace layout: uses workspace
- Workspace layout → Markdown editor: presents editor
- Workspace layout → Application state: uses state
- Markdown editor → Application state: updates documents
- Find and replace → Application state: requests search
- Application state → IPC bridge: calls APIs
- IPC bridge → Electron runtime: forwards IPC
- Electron runtime → Workspace files: dispatches file work
- Workspace files → Markdown workspace: reads and writes
- Electron runtime → Git operations: dispatches Git
- Git operations → Markdown workspace: versions files
- Electron runtime → Version history: handles history
- Electron runtime → Workspace search: handles workspace search
- Workspace search → Markdown workspace: searches files
- Electron runtime → Search index: handles indexing
- Electron runtime → Comment sync: handles comments
- Electron runtime → Peer discovery: starts discovery
- Electron runtime → Peer sharing: handles sharing
- Peer sharing → Peer devices: shares workspace
- Peer discovery → Peer devices: discovers peers
- Workspace user → AI assistant: asks assistant
- AI assistant → AI provider: sends prompts