How obsidianmd/obsidian-sample-plugin works
Project type and purpose
• This is a sample Obsidian plugin project written in TypeScript.
File structure
• Everything lives at the repo root—no separate src or lib directories.
• main.ts – the plugin’s entrypoint and core logic
• manifest.json – plugin metadata (ID, version, minAppVersion)
• styles.css – any CSS the plugin injects
• esbuild.config.mjs, tsconfig.json – build configuration
• package.json – npm metadata and scripts
• version-bump.mjs, versions.json – release/versioning support
• Config files (.eslintrc, .editorconfig, etc.) support linting and formatting.
Key insights from README
• Walks through build & dev workflow (npm run dev → compile main.ts → main.js).
• Covers release steps and version management.
• Host App (e.g., gray)
• Plugin runtime (e.g., blue)
• Developer/build tooling (e.g., green)
• Packages (rectangles)
• External APIs (rounded rectangles)