A comprehensive, production-ready Obsidian plugin for managing items with full CRUD operations, React-based dashboard, and MDX support.
- Full CRUD Operations: Create, Read, Update, and Delete items stored as Markdown files
- Vault Integration: Items are stored as regular Markdown files with YAML frontmatter
- Folder Management: Organize items in folders and subfolders with hierarchical tree view
- Tag System: Support for predefined and custom tags with filtering
- Search: Real-time search across titles, descriptions, and tags
- React Dashboard: Modern, responsive dashboard with card-based layout
- Modal Forms: Intuitive modal dialogs for adding and editing items
- Floating Add Button: Quick access to create new items
- Tag Filter: Visual tag filtering with active state indicators
- Folder Tree: Hierarchical folder navigation with expand/collapse
- Responsive Design: Works seamlessly on desktop and mobile devices
- TypeScript: Fully typed with strict mode enabled
- React + JSX: Modern React components with automatic JSX transform
- ESBuild: Fast bundling and compilation
- ESLint: Code quality and consistency checks
- Mobile Compatible: Works on both desktop and mobile Obsidian apps
-
Clone this repository into your vault's plugins folder:
cd <vault>/.obsidian/plugins/ git clone https://github.com/yaeyintlin199/obsidian-sample-plugin.git item-manager cd item-manager
-
Install dependencies:
npm install
-
Build the plugin:
npm run build
-
Reload Obsidian and enable the plugin in Settings → Community plugins
For development with hot reload:
npm run devThis will watch for changes and automatically rebuild the plugin.
There are multiple ways to open the Item Manager dashboard:
- Ribbon Icon: Click the dashboard icon (📊) in the left ribbon
- Command Palette:
- Press
Ctrl/Cmd + P - Search for "Open Item Manager Dashboard"
- Press
- Sidebar: The dashboard opens in the right sidebar by default
- Click the floating + button in the bottom-right corner of the dashboard
- Or use the command "Add new item" from the command palette
- Fill in the form:
- Title (required): Name of the item
- Description: Brief description of the item
- Folder: Storage location (defaults to "Items")
- Tags: Comma-separated tags for organization
- Click Create to save the item
- Locate the item card in the dashboard
- Click the ✏️ (edit) button on the card
- Modify the fields in the modal form
- Click Update to save changes
Note: If you change the title or folder, the file will be renamed/moved automatically.
- Click the 🗑️ (delete) button on the item card
- Confirm the deletion in the dialog
- The item file will be permanently removed from your vault
Search Bar: Type to filter items by title, description, or tags in real-time
Tag Filter:
- Click tags to filter items that have those tags
- Click again to deselect
- Use "Clear all" to remove all tag filters
Folder Tree:
- Click folders to show only items in that folder and subfolders
- Click again or use "Show all" to clear the filter
Access plugin settings via Settings → Community plugins → Item Manager:
- Default folder: Set the default folder for new items (default: "Items")
- Predefined tags: Comma-separated list of tags for quick selection
- Enable auto-save: Automatically save changes when editing items
Items are stored as standard Markdown files with YAML frontmatter:
id: item-1700000000000 title: My Project description: A sample project item tags: ["project", "important"] folder: Items/Projects createdAt: 2024-01-01T00:00:00.000Z updatedAt: 2024-01-01T12:00:00.000Z
A sample project item ```
id: Unique identifier (auto-generated)title: Item titledescription: Item descriptiontags: Array of tagsfolder: Storage folder pathcreatedAt: Creation timestamp (ISO 8601)updatedAt: Last update timestamp (ISO 8601)
The plugin registers the following commands:
| Command | Description |
|---|---|
| Open Item Manager Dashboard | Opens the dashboard in the sidebar |
| Add new item | Opens the add item modal |
| Refresh items | Reloads all items from the vault |
``` src/ ├── main.tsx # Plugin entry point and lifecycle ├── types.ts # TypeScript interfaces and types ├── settings.ts # Settings tab implementation ├── components/ # React components │ ├── Card.tsx # Item card component │ ├── Search.tsx # Search input component │ ├── TagFilter.tsx # Tag filter component │ ├── FolderTree.tsx # Folder tree component │ ├── AddButton.tsx # Floating add button │ └── Dashboard.tsx # Main dashboard component ├── modals/ # Modal dialogs │ └── ItemModal.tsx # Add/Edit item modal ├── views/ # Obsidian views │ └── ItemView.tsx # Dashboard view wrapper ├── utils/ # Utility functions │ └── fileManager.ts # Vault file operations └── commands/ # Command implementations └── index.ts # Command registration
styles.css # Plugin styles manifest.json # Plugin manifest ```
FileManager (utils/fileManager.ts):
- Handles all vault file operations
- Creates, reads, updates, and deletes item files
- Parses frontmatter and generates Markdown content
- Manages folder creation and file renaming
Dashboard (components/Dashboard.tsx):
- Main UI component with search, filters, and item grid
- Manages local state for search and filter selections
- Renders item cards with edit/delete actions
ItemModal (modals/ItemModal.tsx):
- Modal form for creating and editing items
- Validates input and handles submission
- Supports predefined tag selection
ItemView (views/ItemView.tsx):
- Obsidian view wrapper for the React dashboard
- Manages React root and rendering lifecycle
- Connects dashboard to plugin methods
- Node.js 18+ (LTS recommended)
- npm (comes with Node.js)
- Obsidian app for testing
- Clone the repository
- Install dependencies:
npm install - Build the plugin:
npm run build - Copy
main.js,manifest.json, andstyles.cssto your vault's plugin folder
```bash
npm run dev
npm run build
npx eslint src/ --ext .ts,.tsx
npx tsc -noEmit ```
The project uses:
- TypeScript with strict mode enabled
- ESLint for code linting
- Prettier configuration via
.editorconfig
Manual testing workflow:
- Build the plugin with
npm run build - Reload Obsidian
- Test CRUD operations:
- Create items with various titles, descriptions, tags, and folders
- Edit items and verify file updates
- Delete items and confirm file removal
- Test filtering:
- Search by title, description, and tags
- Filter by tags (single and multiple)
- Filter by folders
- Test edge cases:
- Empty tags and descriptions
- Special characters in titles
- Long titles and descriptions
- Nested folders
The plugin is fully compatible with Obsidian mobile apps:
- Responsive layout adapts to smaller screens
- Touch-friendly buttons and controls
- No desktop-only APIs used (
isDesktopOnly: false) - Tested on iOS and Android
- Click the Refresh button in the dashboard header
- Check that item files have valid YAML frontmatter
- Verify the
idandtitlefields are present
- Delete
node_modulesand runnpm installagain - Ensure you're using Node.js 18 or higher
- Check for TypeScript errors with
npx tsc -noEmit
- Check that
main.js,manifest.json, andstyles.cssare in the plugin folder - Reload Obsidian
- Enable the plugin in Settings → Community plugins
- Check the developer console (Ctrl/Cmd + Shift + I) for errors
- Check vault permissions
- Ensure target folders exist or can be created
- Verify file names don't contain invalid characters
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes with clear commit messages
- Ensure code passes linting:
npx eslint src/ - Build and test the plugin
- Submit a pull request
MIT License - see LICENSE file for details
- Built with the Obsidian Sample Plugin template
- Uses React for UI components
- Bundled with ESBuild
For issues, feature requests, or questions:
- GitHub Issues: Report an issue
- Discussions: Join the discussion
Version: 1.0.0
Author: Your Name
Repository: https://github.com/yaeyintlin199/obsidian-sample-plugin