| title | Local development guide |
|---|---|
| doc_type | guide |
| status | current |
| owner | engineering |
| last_updated | 2026-05-02 |
This guide takes you from a clean checkout to a running plugin inside Obsidian.
| Tool | Required version | Notes |
|---|---|---|
| Node.js | 22 LTS or later | Use nvm or fnm to manage versions |
| npm | 10 or later | Bundled with Node 22 |
| Obsidian | 1.4.0 or later | Desktop app only — the plugin is isDesktopOnly: true |
| Git | Any recent version |
Verify your environment before starting:
node --version # expect v22.x.x
npm --version # expect 10.x.xgit clone https://github.com/Luis85/specorator.git
cd specorator
npm cinpm ci installs the exact dependency versions from package-lock.json. Do not use npm install on a clean checkout — it may silently update the lock file.
| Command | What it does |
|---|---|
npm run typecheck |
Type-checks all TypeScript and Vue files without emitting |
npm run lint |
Lints the codebase with ESLint |
npm run lint:fix |
Lints and auto-fixes fixable issues |
npm run format |
Reformats all files with Prettier |
npm run format:check |
Checks formatting without writing changes |
npm run test |
Runs the Vitest test suite once |
npm run test:watch |
Runs Vitest in watch mode |
npm run test:coverage |
Runs tests and generates an lcov coverage report |
npm run build |
Type-checks and builds the Obsidian plugin bundle |
npm run dev:plugin |
Builds the plugin in watch mode (rebuilds on save) |
npm run build:web |
Builds the standalone browser UI to dist-standalone/ |
npm run dev |
Runs the standalone UI dev server in the browser |
npm run docs:api |
Generates TypeDoc API docs to docs/api/ |
Run the full verification gate before opening a pull request:
npm run verifyInstall the pre-push hook with:
npm run hooks:installThe hook runs typecheck, lint, and validate:manifest before each push. It is intentionally fast — use npm run verify for the full gate.
Husky: Native Git hooks (core.hooksPath) are sufficient for this project. Husky would add cross-platform convenience (auto-install on npm ci) but introduces a dev dependency. It remains a follow-up candidate if onboarding friction becomes a problem.
The plugin build (npm run build or npm run dev:plugin) writes directly to the project root — the same location Obsidian expects to find the files in a plugin folder:
| File | Committed? | Notes |
|---|---|---|
main.js |
No | Plugin bundle — generated, listed in .gitignore |
styles.css |
Yes | Committed static CSS; the build may overwrite it during development |
manifest.json |
Yes | Plugin metadata — always committed |
Do not commit main.js. It is regenerated on every build and excluded by .gitignore.
Obsidian loads community plugins from <vault>/.obsidian/plugins/<plugin-id>/. The plugin id is specorator (from manifest.json).
Use a fresh, separate vault for development — never your personal vault. Create one through Obsidian → Open another vault → Create new vault.
Example location: ~/obsidian-vaults/specorator-dev/
The simplest setup is a symlink so the built files are picked up immediately:
# macOS / Linux
ln -s "$(pwd)" ~/obsidian-vaults/specorator-dev/.obsidian/plugins/specorator
# Windows (run as Administrator in PowerShell)
New-Item -ItemType SymbolicLink `
-Path "$env:USERPROFILE\obsidian-vaults\specorator-dev\.obsidian\plugins\specorator" `
-Target (Get-Location)If you prefer not to symlink, copy manifest.json, main.js, and styles.css into the plugin folder after each build. The watch command (npm run dev:plugin) makes this less tedious.
- Open the test vault in Obsidian.
- Go to Settings → Community plugins.
- Disable Restricted mode if it is on.
- Find Specorator in the list and enable it.
Obsidian must be restarted (or the plugin reloaded) to pick up a new build of main.js. Use the Hot-Reload plugin to reload automatically when files change.
npm run dev:pluginWith the Hot-Reload plugin installed in your test vault, Obsidian will reload Specorator whenever the build finishes.
specorator-dev/ ← Obsidian vault root
├── .obsidian/
│ └── plugins/
│ └── specorator/ ← symlink or copied plugin files
├── projects/ ← workflow projects created through the plugin
└── inbox/ ← scratch notes
Keep the test vault empty of personal content. The plugin may write files during development.
- Run the full verification gate:
npm run verify - Confirm the plugin loads in Obsidian without errors (check Settings → Community plugins and the developer console with
Ctrl+Shift+I/Cmd+Option+I). - Open the Specorator panel and confirm the UI renders correctly.
- Exercise the specific code path changed by your PR and confirm it works as expected.
- Check the developer console for any uncaught errors or Vue warnings.
The plugin UI can also be developed and tested without Obsidian:
npm run devThis starts a Vite dev server (typically at http://localhost:5173). The browser build uses MockBridge instead of ObsidianBridge, so all plugin-specific Obsidian APIs are simulated. This is the recommended environment for UI-focused work.
The repository publishes a product page at https://luis85.github.io/specorator/ and a live standalone UI at https://luis85.github.io/specorator/app/.
| Path | Content | Source |
|---|---|---|
/specorator/ |
Product page | site/index.html (hand-authored HTML/CSS) |
/specorator/app/ |
Standalone plugin UI | npm run build:web → dist-standalone/ |
The .github/workflows/pages.yml workflow runs on every push to demo:
- Runs
npm run build:pages, which setsVITE_BASE_URL=/specorator/app/and invokesnpm run build:web, so all SPA asset paths are prefixed correctly. - Assembles a
_site/staging directory:site/index.html→_site/index.htmldist-standalone/**→_site/app/**
- Uploads
_site/as the GitHub Pages artifact and deploys it.
Edit site/index.html and push to demo. The workflow redeploys automatically.
npm run build:pages
# Open _site/index.html in a browser to preview- vite.config.ts — build configuration for both plugin and standalone modes
- vitest.config.ts — test configuration
- docs/adr/ — architecture decision records
- GitHub issue #10 — original tracking issue