$ account mProjectsCode
This repository is the Meta Bind plugin for Obsidian, a note-taking application. It allows users to embed interactive input fields, view fields, buttons, and tables directly into Markdown notes, bound to frontmatter metadata or in-memory data. The plugin parses a custom DSL (e.g., `INPUT[type: text]`, `VIEW[...]`, `BUTTON[...]`) using a custom parser library (parsinom) and renders Svelte components that read and write metadata values. It supports over 20 input field types (text, number, slider, toggle, select, date, etc.), view fields with math expressions and markdown rendering, and button actions (commands, JS execution, note creation, metadata updates, etc.). The architecture is a monorepo with three packages: `core` (platform-independent logic), `obsidian` (Obsidian desktop adapter), and `publish` (Obsidian Publish adapter). The core package contains all parsing, configuration, field implementations, metadata management, and Svelte UI components. The obsidian package integrates with Obsidian's plugin API, CodeMirror editor, and metadata cache. The publish package provides a limited subset for Obsidian Publish. In production, the plugin operates as a Markdown post-processor and a CodeMirror view plugin. When a note is rendered, it scans for DSL declarations, parses them into field configurations, creates mountable field components, and binds them to metadata sources (frontmatter, YAML, in-memory caches). Changes in input fields propagate back to metadata and trigger updates to other bound fields. The plugin also provides a public API for other plugins (e.g., JS Engine) to create fields programmatically. External dependencies include Obsidian's own API, and optional integrations with the Dataview, Templater, and JS Engine plugins. The codebase demonstrates strong software engineering practices: clean separation of concerns, extensive use of factory and strategy patterns, a reactive metadata subscription system, and a comprehensive test suite. However, there are signs of technical drift such as commented-out code, some type safety workarounds, and a large parameterized test file that is difficult to maintain. Overall, it is a well-crafted, feature-rich plugin with reusable components that could be extracted for other projects.