How lokus-ai/lokus works
Lokus is a local-first Markdown note-taking desktop app. A user opens or creates a workspace, then works with Markdown notes through the editor and workspace UI; notes remain ordinary local files. The README also documents organization and extension capabilities, including search, graphs, databases, templates, calendars, plugins, and optional encrypted sync. The graph combines these documented product branches with source-index-supported frontend/backend relationships. Several backend and feature implementations were not sampled, so their internal call paths are not asserted.
Main entry points: useWorkspaceSession.js Workspace session · App.jsx Application shell · Editor.jsx Markdown editor · NoteMutationClient.js Note mutations
Components 23
App entry
- Application shell
src/App.jsx - Workspace session
src/features/workspace/useWorkspaceSession.js
Notes and editing
- File tree
src/features/file-tree/FileTreeView.jsx - Markdown editor
src/editor/components/Editor.jsx - Note mutations
src/core/notes/NoteMutationClient.js - Markdown pipeline
src/core/markdown/lokus-md-pipeline.js
Knowledge organization
- Full-text search
src/core/search/search-engine.js - Knowledge graph
src/core/graph2/graphEngine.js - Database views
src/bases/core/BaseManager.js - Base validation
src/bases/core/BaseValidator.js - Templates
src/core/templates/manager.js - Calendar views
src/components/Calendar/CalendarView.jsx
Extensions and integrations
- Plugin manager
src/components/PluginManager.jsx - Plugin host
src/core/plugin-v3/host.js - Encrypted cloud sync
src/core/sync/SyncEngine.js - Cloud file storage
src/core/sync/StorageManager.js
Desktop runtime
- Note engine
src-tauri/src/note_engine - Calendar integration
src-tauri/src/calendar_v2 - Calendar sync
src-tauri/src/calendar/sync/engine.rs - Local Markdown files
- Tauri runtime
src-tauri/src/lib.rs
Other components
- Workspace user
- Cloud storage
Connections 21
- Workspace user → Application shell: opens workspace
README.md - Application shell → Workspace session: activates workspace
src/App.jsx - Workspace session → Tauri runtime: loads and saves session
src/features/workspace/useWorkspaceSession.js - Workspace session → Local Markdown files: reads note files
src/features/workspace/useWorkspaceSession.js - Workspace user → Markdown editor: writes notes
README.md - Markdown editor → Markdown pipeline: renders Markdown
README.md - File tree → Note mutations: moves notes
- Note mutations → Note engine: mutates notes
- Workspace user → Full-text search: searches notes
README.md - Workspace user → Knowledge graph: explores links
README.md - Workspace user → Database views: views databases
README.md - Database views → Base validation: validates configuration
src/bases/core/BaseManager.js - Workspace user → Templates: uses templates
README.md - Workspace user → Calendar views: views calendar
README.md - Calendar views → Calendar integration: loads calendar data
- Calendar integration → Calendar sync: uses legacy provider
src-tauri/src/calendar_v2/commands.rs - Workspace user → Plugin manager: manages plugins
README.md - Plugin manager → Plugin host: loads plugin state
src/components/PluginManager.jsx - Workspace user → Encrypted cloud sync: enables optional sync
README.md - Encrypted cloud sync → Cloud file storage: transfers files
src/core/sync/StorageManager.js - Cloud file storage → Cloud storage: reads and writes
src/core/sync/StorageManager.js