Knowledge Base updated: 2026-11-22
TriliumNext knowledge base
TriliumNext is a pnpm workspace for a self-hosted, hierarchical note-taking system. Its main parts are the Node server, browser client, desktop and standalone runtimes, web clipper, shared packages, and build/deployment tooling.
Authoritative note, relation, attachment, revision, and configuration state is managed by the server and trilium-core; browser and native clients present and synchronize that state through shared contracts and server APIs. Embedded editors and renderers are reusable workspace packages.
System map
flowchart TD
User[User] --> Client[Browser client]
User --> Desktop[Electron desktop]
User --> Standalone[Standalone browser runtime]
User --> Clipper[Web clipper extension]
Desktop --> Client
Standalone --> Client
Clipper --> Server[Node server]
Client --> Server
Server --> Core[trilium-core]
Server --> Share[Share subsystem]
Core --> DB[(Database and files)]
Client --> Editors[Editor and viewer packages]
Editors --> Shared[commons contracts]
Server --> Shared
Build[Build and release automation] --> Desktop
Build --> Deploy[Containers and deployment targets]
Showcase[Showcase asset pipeline] --> Build
Glossary
- Becca — the core entity layer used for note-related domain state.
- Shaca — the share-side entity model used by public-content handling.
- SNote — a share-context note representation.
- TriliumNext — the workspace application and its client/server platform.
Codebase-wide invariants
- Shared API and option contracts must remain compatible across clients and server consumers; evidence: packages/…/server_api.ts and packages/…/options_interface.ts.
- Note state changes pass through core entities and server services rather than being authored independently by UI widgets; evidence: packages/…/bnote.ts and packages/…/notes.ts.
- Version and release updates are automated rather than maintained only in workflow YAML; evidence: scripts/update-version.ts and scripts/update-nightly-version.ts.
- Reusable editing behavior belongs in workspace packages while client widgets integrate it; evidence: packages/…/plugins.ts and apps/…/CKEditor.tsx.
Routing table
-
apps/server/src/**-> docs/server-platform.md -
apps/server/src/routes/**,apps/server/src/share/**-> docs/server-http-api-and-sharing.md -
apps/server/src/services/db/**,apps/server/src/services/attachments/**,apps/server/src/services/backup/**, packages/…/notes.ts -> docs/server-storage-and-note-services.md -
apps/server/src/services/{search,ocr,import,llm,mcp}/**,apps/server/src/services/scripting/**-> docs/server-intelligence-and-automation.md -
apps/client/src/{main,components,services}/**-> docs/client-experience.md -
apps/…/navigation_state.ts,
apps/client/src/widgets/type_widgets/{text,canvas,code,file,mind_map}/**-> docs/client-note-editing-and-navigation.md -
apps/client/src/widgets/{search,relation_map}/**, apps/…/highlight_matches.ts -> docs/client-search-and-visual-tools.md -
apps/client/src/widgets/type_widgets/options/**,apps/client/src/widgets/{setup,login,restore}/**-> docs/client-settings-and-session-security.md -
apps/{desktop,standalone,mobile,web-clipper}/**-> docs/platform-clients.md -
apps/desktop/src/**,apps/desktop/electron-forge/**-> docs/desktop-shell-and-ipc.md -
apps/standalone/src/**, apps/…/package.json -> docs/standalone-browser-runtime.md -
apps/web-clipper/**-> docs/web-clipper-extension.md -
packages/{commons,trilium-core}/**-> docs/shared-foundations.md -
packages/{commons,trilium-core}/src/**-> docs/core-domain-and-common-contracts.md -
packages/{ckeditor5,codemirror,highlightjs,pdfjs-viewer,turndown-gfm,splitjs,share-theme}/**-> docs/editing-rendering-and-presentation-packages.md -
package.json, pnpm-workspace.yaml, pnpm-lock.yaml,
scripts/**,.github/workflows/**-> docs/build-release-and-deployment.md -
.github/workflows/**,scripts/{release-notes,update-version,update-nightly-version,android-version-code}.*-> docs/build-and-release-automation.md -
apps/{server,desktop,standalone}/Dockerfile*,apps/desktop/{flatpak,electron-forge}/**,scripts/{db-compare,dump,deploy}*-> docs/deployment-targets-and-operations.md -
apps/showcase/**-> docs/showcase-asset-pipeline.md