Development
Architecture
Tagdown Editor is a Tauri v2 app:
| Layer | Technology | Where |
|---|---|---|
| UI | Vanilla TypeScript + Vite | src/ |
| Tagdown parser and renderer | TypeScript, KaTeX, Pele (Mermaid-syntax diagrams) | src/tagdown/ |
| App commands | Rust (Tauri commands) | src-tauri/src/commands/ |
| Vault, search, links, history, queries | Rust (tagdown-core crate) |
src-tauri/core/src/ |
| CLI and MCP server | Rust (tagdown binary) |
src-tauri/core/src/bin/tagdown.rs, src-tauri/core/src/mcp.rs |
The UI never touches the filesystem directly; it calls Tauri commands, which go through tagdown-core. The CLI and MCP server use the same crate, so the app, the command line, and AI assistants all read and write notes the same way, with the same version history.
The one thing that reaches the network is saving a web link (weblink.rs): it fetches the page with the systemβs curl, http and https only, so the app carries no HTTP or TLS stack of its own.
Project layout
.
βββ src/
β βββ bootstrap.ts # entry point: the editor, or the quick capture window
β βββ main.ts # app shell: sidebar, note list, editor, shortcuts
β βββ commandPalette.ts # βK palette
β βββ wikilinks.ts # title/path/alias resolution and ranked autocomplete
β βββ slashCommands.ts # the / command menu
β βββ templatePicker.ts # /template picker and linked-note insertion helpers
β βββ listEditing.ts # β©, Tab and β§Tab in lists (continue, nest, renumber)
β βββ blockDrag.ts # drag-and-drop reordering of preview blocks
β βββ queries.ts # <query /> blocks (lists, tables, boards, cards) and the open-tasks view
β βββ boardLanes.ts # which lane a board card goes in, and moving it
β βββ tableSelection.ts # rows ticked in a table, for setting a property on all of them
β βββ queryText.ts # rewriting a query's text (sorting, columns)
β βββ propertiesPanel.ts # the properties panel and its value fields
β βββ templateInheritance.ts # parent selection and inherited property switches
β βββ typeHierarchy.ts # nested type rows and descendant matching
β βββ linkFields.ts # properties that link to notes of another type
β βββ taskRepeat.ts # the next task of a repeating one
β βββ taskCascade.ts # ticking a task ticks its subtasks; unticking restores them
β βββ journal.ts # day keys, the journal calendar, appending to a page
β βββ quickCapture.ts # appending a capture to today's page
β βββ quickCaptureWindow.ts # the floating β₯βJ capture bar
β βββ localGraph.ts # the ββ§G graph of a note's links
β βββ webLinks.ts # saving a web link as a Link note (box and paste offer)
β βββ localImages.ts # images copied into attachments/ and loaded from the vault
β βββ figures.ts # the size and caption bar on figures
β βββ history.ts # version history dialog
β βββ presentation.ts # slides
β βββ export.ts # HTML export and print
β βββ publish.ts # static website publishing
β βββ settings/ # settings dialog, theme, and editor preferences
β βββ styles/ # CSS (tokens.css holds the light and dark palettes)
β βββ tagdown/ # parser, renderer, blocks, slides, diagrams, syntax reference data
βββ src-tauri/
β βββ src/commands/ # Tauri commands called from the UI
β βββ src/quick_capture.rs # the global β₯βJ shortcut and capture window
β βββ core/src/ # vault, vaults, folders, frontmatter, properties,
β # search_index, links (backlinks, local graph), history,
β # tasks, query, types (inheritance), templates (built-ins),
β # journal (day pages, "This day"),
β # weblink (fetching pages for Link notes), watcher,
β # site, library, mcp
βββ scripts/gen-syntax.mjs # generates core/src/syntax.md from the reference data
βββ tests/ # Node tests for rendering, blocks, lists, slash commands, slides,
β # board lanes, table selection, journal, graph layout,
β # web links, figures, task repeats and subtasks, diagrams, syntax
βββ docs/ # this documentation
Running checks
npm run build
cargo test --manifest-path src-tauri/Cargo.toml --workspace
cargo check --manifest-path src-tauri/Cargo.toml --workspace
node --test tests/*.mjs
Preserved integrations
The experimental integrations were removed from the active app and preserved on codex/reflect-integrations, at commit 868ed08221de9a7d2f4a30620d023c57b501239f. The checkpoint contains the Integrations settings, AI editing and semantic retrieval, voice transcription, browser capture and its extension, a global capture shortcut, and calendar/meeting features, with their supporting dependencies.
The branch is a snapshot of the source at that point, including other work that was in progress. It predates the revised /template workflow. Review its changes before bringing features back individually.
To resume work in a separate checkout while keeping the current working directory intact:
git fetch origin
git worktree add -b codex/resume-integrations ../tagdown-integrations origin/codex/reflect-integrations
The active app retains in-app journal capture, saved web links, and the CLI/MCP server. Their current behavior is documented in the Journal, Organizing, and CLI and MCP guides.
The syntax reference
The Tagdown reference has one source: src/tagdown/documentation.ts. It feeds the in-app Settings β Tagdown Reference and, through npm run gen:syntax, the generated src-tauri/core/src/syntax.md that the CLI and MCP server hand out. Run npm run gen:syntax after changing the reference; a test fails when the generated file is out of date.
Previewing the documentation
The docs use Jekyll and a local layout in docs/_layouts/default.html. Navigation lives in docs/_data/navigation.yml; styles and browser interactions live in docs/assets/.
With Ruby and Bundler installed, run from the repository root:
cd docs
bundle install
bundle exec jekyll serve
Open http://localhost:4000/tagdown/. To check a production build, run bundle exec jekyll build. GitHub Pages builds the same docs/ directory when changes reach main.
The explanatory diagrams in docs/images/guides/ are SVGs generated from scripts/gen-doc-visuals.mjs. Edit that source and run node scripts/gen-doc-visuals.mjs to regenerate them. Keep screenshots for app controls and diagrams for relationships or before-and-after examples; add descriptive alt text and a caption wherever a visual needs explanation.
Releasing
.github/workflows/release.yml builds a universal (Apple silicon + Intel) .dmg on GitHub Actions.
- Bump the version in
src-tauri/tauri.conf.json,src-tauri/Cargo.toml, andpackage.json, and commit. - Tag the commit and push the tag:
git tag v0.2.0 && git push origin v0.2.0. The tag must match thetauri.conf.jsonversion, or the build stops. - The workflow attaches the
.dmgto a draft release named after the tag. Check it under Releases, edit the notes, and publish.
To try the build without releasing anything, run the workflow by hand (Actions β Release β Run workflow). The .dmg shows up as a workflow artifact.
Signing and notarization
Without Apple credentials the app is ad-hoc signed, and users get past Gatekeeper with Open Anyway (see the README). With an Apple Developer Program membership, add these repository secrets (Settings β Secrets and variables β Actions) and the next build is signed and notarized, with no Gatekeeper warning:
| Secret | Value |
|---|---|
APPLE_CERTIFICATE |
Your Developer ID Application certificate exported from Keychain Access as .p12, base64-encoded: base64 -i cert.p12 \| pbcopy |
APPLE_CERTIFICATE_PASSWORD |
The password you set when exporting the .p12 |
APPLE_SIGNING_IDENTITY |
The certificate name, e.g. Developer ID Application: Jane Doe (AB12CD34EF); security find-identity -v -p codesigning lists it |
APPLE_ID |
The Apple ID email of your developer account |
APPLE_PASSWORD |
An app-specific password for that Apple ID, not your account password |
APPLE_TEAM_ID |
Your 10-character team ID from developer.apple.com/account |
The certificate pair turns on signing; the three APPLE_ID⦠secrets add notarization. Once a signed build ships, drop the Gatekeeper steps from the README.
Conventions
- Commits follow Conventional Commits:
feat(scope): β¦,fix: β¦,docs: β¦,style(ui): β¦. - Notes stay plain Markdown files. New features should keep the vault readable without the app.
- See
PROJECT_PLAN.mdfor the roadmap.