Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Monorepo Structure

The workspace is a pnpm monorepo. pnpm-workspace.yaml includes both packages/* and packages/plugins/*, so the nested plugin packages participate in local workspace resolution.

PathRoleNotes
package.jsonRoot orchestrationDefines top-level build, lint, test, and format commands.
packages/apiShared runtimeOwns the application model and most Obsidian-like primitives.
packages/uiShared design systemWraps Bits UI and Tailwind-based components for the rest of the repo.
packages/diffmergeDiff / merge UISvelte 5 two- and three-pane merge editors and line-diff helpers (vendored from mismerge); consumed as @lapis-notes/diffmerge. See Diffmerge.
packages/notebook/coreShared notebook contractsOwns notebook output protocol types and pure lapis output helpers extracted from the bundled notebook plugin.
packages/notebook/duckdbShared notebook DuckDB contractsOwns reusable DuckDB runtime contracts, query-result types, DuckDB type mapping, and pure query normalization helpers.
packages/notebook/duckdb-assetsShared notebook DuckDB assetsOwns browser/PWA DuckDB-Wasm and DuckDB worker asset URL resolution for notebook DuckDB runtimes.
packages/notebook/inputShared notebook input helpersOwns host-neutral Observable-style viewof transforms, DOM runtime loading, input node binding, and callback-driven view runtime helpers consumed by notebook runtimes.
packages/notebook/stdlibShared notebook builtin contractsOwns current Lapis builtin names, documented bare notebook globals, dependency-global validation helpers, and source-level runtime feature detection.
packages/notebook/workerShared notebook worker contractsOwns generic worker transport message contracts for notebook runtimes.
packages/webBrowser/PWA hostOwns the installable browser host, manifest/service worker generation, cross-origin-isolation headers, and first-load offline shell caching around the shared renderer.
packages/lapis.mdPublic docs siteOwns the static Astro + Starlight site for lapis.md: landing page, user help (/help/), and developer docs (/developers/), styled with shared UI theme tokens.
packages/workspaceRenderer shellOwns the shared Svelte renderer, vault bootstrap, layout shell, and bundled-plugin composition that host packages mount.
packages/plugins/plugin-markdownFirst-party feature pluginRegisters markdown, media, properties, and outline views plus editor behavior.
packages/plugins/plugin-graphFirst-party feature pluginAdds global and local graph views driven by the metadata cache and a D3 force layout.
packages/plugins/plugin-searchFirst-party feature pluginMaintains the search view and routes indexing/query work through AppDatabase and the per-vault SQLite/IndexedDB search state.
packages/plugins/plugin-basesFirst-party feature pluginAdds .bases and .base views and structured data presentation.
packages/plugins/plugin-spellcheckerObsidian-targeted pluginHarper-based grammar and spell checking plugin for Obsidian.
packages/desktop-electronFirst-party desktop hostElectron desktop shell that mounts @lapis-notes/workspace. First-party native target per ADR-003.
docsMiscellaneous documentationCurrently separate from the architecture spec.
patchespatch-package overridesHolds dependency patches such as decode-named-character-reference.

Important split in the repo

There are two plugin ecosystems present at once:

  1. first-party plugins built against @lapis-notes/api
  2. colocated plugins that still target the upstream obsidian package directly

That split is important because only the first group participates in the current workspace app boot sequence.

The approved host targets are web/PWA and Electron desktop. The source tree represents the shared browser renderer, the installable web/PWA host, and the first-party Electron desktop shell. See Desktop Host, Desktop Electron Package, and ADR-003: Electron-First Desktop Shell for the authoritative desktop-host direction.

Licensing Model

The repository is multi-licensed. The root LICENSE.md summarizes the current package categories, and each workspace package declares its SPDX license in package.json.

AreaLicense
Core app packages, host packages, shared UI, notebook support, language service, and bundled first-party pluginsAGPL-3.0-or-later
Plugin SDK/API package (packages/api)Apache-2.0
Public documentation and website package (packages/lapis.md)CC-BY-4.0
Vendored diff/merge package and Obsidian-targeted compatibility plugin packages where declaredMIT
Lapis Notes name, logos, icons, domains, and related marksTrademark rights reserved

Third-party dependencies and vendored files keep their own notices. File-level notices take precedence for the files they cover.