Logseq is a local-first, open-source knowledge management tool designed for thinkers, researchers, and professionals who want full control over their notes without cloud dependency. It combines the simplicity of Markdown and Org-mode with a bidirectional knowledge graph, allowing users to link ideas across notes and visualize relationships. Built with ClojureScript and Electron, it runs natively on desktop and mobile while keeping all data stored locally by default.
The platform supports plugins, themes, and real-time collaboration (RTC) via its DB version, which uses SQLite for data storage and enables syncing across devices. Logseq’s architecture prioritizes data longevity and user ownership, making it ideal for those who reject SaaS lock-in and want a future-proof system for managing complex knowledge.
What You Get
- Bidirectional Knowledge Graph - Automatically links notes via double-bracket references [[Page Name]] and visualizes connections in a graph view, enabling non-linear thinking and idea discovery.
- Local-First Storage - All notes are stored as plain Markdown and Org-mode files on your device, ensuring privacy and long-term accessibility without vendor lock-in.
- Real-Time Collaboration (RTC) - Experimental feature allowing multiple users to edit the same graph simultaneously via WebRTC, with data synced through peer-to-peer or self-hosted servers.
- Plugin API - Extensible system with a documented API (plugins-doc.logseq.com) to add custom functionality like calendar integrations, AI tools, or export formats.
- PDF Annotation - Native support for highlighting and annotating PDFs directly within Logseq, with annotations linked to your knowledge graph.
- Task Management with Prioritization - Built-in task system with checkboxes, due dates, and priority tags (e.g., #high, #medium) that sync across notes and views.
Common Use Cases
- Researcher building a literature review - A PhD student uses Logseq to link papers, annotations, and personal insights into a graph, enabling cross-referencing and discovery of hidden connections.
- Developer documenting codebases - A software engineer stores code snippets, API docs, and project notes in Markdown files, using Logseq’s graph to map dependencies and recall context.
- Writer managing a long-form project - A novelist organizes character arcs, plot points, and worldbuilding notes in linked pages, using tasks and tags to track progress.
- Team collaborating on internal wikis - A remote team uses Logseq’s RTC feature to co-edit project documentation in real time while keeping data self-hosted and private.
Under The Hood
Architecture
- Built on a ClojureScript frontend with clear separation between UI components and data layer logic, leveraging Datascript for graph-based in-memory state management
- Employs unidirectional data flow via centralized state atoms and event publishing, minimizing side effects and ensuring predictable state transitions
- Plugin and SDK abstractions enable cross-platform functionality through standardized IPC channels, decoupling native capabilities from core logic
- Dependency injection is handled implicitly via namespace-level references, prioritizing simplicity over testability
- Transitive serialization and DOM sanitization are strategically applied across threads and UI layers to enhance security and performance
Tech Stack
- Primary language is Clojure(Script) with shadow-cljs for compilation and cljs.test for testing, integrated with Webpack for asset bundling
- Desktop application built on Electron with Node.js, using better-sqlite3 for local persistence
- Tailwind CSS with custom plugins and PostCSS tooling manages styling through Gulp pipelines
- Multi-platform deployment uses Docker with Clojure on Temurin JDK, Nginx for static serving, and Capacitor for mobile integration
- Build automation is powered by Yarn, Webpack, and Gulp to coordinate frontend compilation, CSS processing, and platform-specific packaging
- Playwright enables end-to-end testing, complemented by an EDN-based configuration system for code style and typo validation
Code Quality
- Comprehensive test suite spans unit, integration, and edge cases with strong coverage of data operations and UI behavior
- Modular test namespaces align with domain components, ensuring focused validation of state integrity and data transformations
- Defensive data validation and transactional semantics enforce consistency, though custom error types are not used
- Consistent naming conventions and explicit namespace prefixes enhance readability and maintainability
- Type safety is reinforced through Datascript schemas and property metadata, with tests validating cardinality and case-sensitive lookups
- Linting and test hygiene are maintained via annotations and fixture patterns that guarantee clean test isolation
What Makes It Unique
- Implements native end-to-end encrypted graph synchronization with per-graph key negotiation, enabling secure decentralized collaboration
- Embeds a full ClojureScript macro system via SCI, allowing users to write dynamic data transformations directly within Markdown blocks
- Uses distributed worker coordination with BroadcastChannel and navigator.locks to prevent race conditions across browser tabs
- Treats every property as a first-class graph entity, enabling rich relational modeling within a note-taking interface
- Introduces a clipboard inspection tool that captures and structures paste events into JSON for deep bug analysis
- Generates metadata as dynamic blocks, creating a self-referential knowledge graph where structure and data are inseparable