How logseq/logseq works
Logseq is a privacy-focused knowledge-management and collaboration application for desktop, web, and mobile. Its central workflow is to open a graph, create and organize notes and tasks, then search and work with that knowledge; the README also highlights PDF annotation, Markdown/Org-mode support, plugins, and real-time collaboration. The tree and README support these product areas, but sampled sources are sparse for the main frontend and database runtime, so their internal call wiring is intentionally not detailed.
Main entry points: frontend Open graph · AppViewController.swift Native mobile host · worker Real-time sync · src Plugin API
Components 17
User applications
- Logseq application
src/main/frontend
Knowledge workflows
- Open graph
src/main/frontend - Notes and pages
src/main/frontend - Task management
src/main/frontend - Search and queries
src/main/frontend - PDF annotation
src/main/frontend/extensions/pdf - Markdown and Org
src/main/frontend
Graph storage
- Graph database
deps/db - File worker
resources/js/worker.js
Collaboration and extensions
- Real-time sync
deps/db-sync/worker - Plugin API
libs/src - Plugin storage
libs/src/modules/LSPlugin.Storage.ts - Embedding service
sidecar/embedding_server.py
Native platform
- Native mobile host
ios/App/App/AppViewController.swift - iOS share extension
ios/App/ShareViewController/ShareViewController.swift
Other components
- User
- Sync service
Connections 18
- User → Logseq application: uses
- Logseq application → Open graph: opens
- Open graph → Notes and pages: creates and organizes
- Open graph → Task management: manages
- Open graph → Search and queries: searches
- Open graph → PDF annotation: annotates
- Open graph → Markdown and Org: supports
- Open graph → Graph database: stores graph data
- Open graph → File worker: uses file operations
- Logseq application → Plugin API: supports extensions
- Plugin API → Plugin storage: requests storage
- Open graph → Real-time sync: synchronizes
- Real-time sync → Sync service: communicates with
- User → Native mobile host: uses
- Native mobile host → Logseq application: hosts
- User → iOS share extension: shares content
- iOS share extension → Native mobile host: passes shared data
- Logseq application → Embedding service: requests embeddings