This document provides an overview of the features included in plugins built with this template.
Table of Contents
Core Features
Modern Build System
Fast, efficient compilation with esbuild
- β‘ Lightning-fast builds - Compile in milliseconds, not seconds
- π Watch mode - Automatic rebuilds on file changes
- π¦ Bundle optimization - Minified, optimized output
- π― Source maps - Easy debugging with original source
- π§ Development mode - Quick rebuilds without type checking
Benefits:
- Faster development workflow
- Smaller bundle sizes
- Better performance
- Easier debugging
Learn more: Build System Documentation
Modular CSS System
Organized stylesheets that compile to a single file
- π Multiple source files - Organize styles by component
- π Automatic compilation - Combines into single
styles.css - π¨ Theme compatibility - Uses Obsidian CSS variables
- ποΈ Maintainable - Easy to find and modify styles
Source files:
src/styles/
βββ base.css # Base styles and variables
βββ modals.css # Modal dialog styles
βββ settings.css # Settings tab styles
βββ components.css # UI component styles
Benefits:
- Cleaner codebase
- Better organization
- Easier maintenance
- No CSS in TypeScript
Learn more: CSS Guidelines
Advanced Logging System
Component-based logging with production safety
- π·οΈ Component-based - Separate log levels per component
- π― Tag filtering - Filter debug output by category
- π File logging - Optional logging to file
- ποΈ Debug elimination - Debug code removed in production
- β‘ Zero overhead - No performance impact in production builds
Example:
import { createLogger } from '../utils/Logger';
class MyComponent {
private logger = createLogger('ui');
someMethod() {
this.logger.debug('Method called', { data });
this.logger.info('Operation completed');
this.logger.warn('Warning condition');
this.logger.error('Error occurred', error);
}
}
Benefits:
- Better debugging experience
- No console spam in production
- Organized log output
- Easy troubleshooting
Learn more:
Development Features
TypeScript Configuration
Full type safety and modern JavaScript
- β Strict typing - Catch errors at compile time
- π Obsidian API types - Full type definitions
- π― Auto-completion - IntelliSense support
- π Type safety - Prevent runtime errors
File Size Limits
Enforced modularity for maintainability
- π Maximum file sizes - 500 lines for source files
- π― Single responsibility - One concern per file
- π Reusable components - Extract shared code to utilities
- π¦ Better organization - Clear project structure
Limits:
- TypeScript source files: 500 lines maximum
- UI component files: 300 lines maximum
- Utility files: 200 lines maximum
- Modal/Dialog files: 400 lines maximum
Learn more: Coding Standards
Documentation Structure
Organized, comprehensive documentation
- π Public documentation - All in
docs/(committed) - π Private documentation - All in
docs-internal/(gitignored) - π Multiple formats - User guides, developer docs, examples
- π GitHub Pages ready - Pre-configured for deployment
Structure:
docs/ # Public (on GitHub Pages)
βββ user/ # End-user documentation
βββ developer/ # Contributing and development
βββ features/ # Feature documentation
βββ examples/ # Code examples
docs-internal/ # Private (local only)
βββ sessions/ # Development session notes
βββ guides/ # Internal development guides
βββ references/ # Quick references
βββ maintenance/ # TODOs and plans
User Features
Settings Tab
Configurable plugin behavior
- βοΈ Customizable settings - Adjust plugin behavior
- πΎ Persistent storage - Settings saved automatically
- π¨ Native UI - Matches Obsidianβs design
- π Live updates - Changes apply immediately
Command Palette Integration
Quick access to plugin features
- β¨οΈ Keyboard shortcuts - Customizable hotkeys
- π Command search - Find commands quickly
- π― Context-aware - Commands appear when relevant
- π Command organization - Grouped by feature
Modal Dialogs
Interactive user interfaces
- πͺ Custom dialogs - Build complex UIs
- π¨ Themed - Matches Obsidianβs appearance
- β¨οΈ Keyboard navigation - Accessible interface
- π± Responsive - Works on all screen sizes
Technical Features
Release Management
Automated versioning and packaging
- π¦ Automated builds - Create release packages easily
- π·οΈ Version management - Semantic versioning
- π Compatibility matrix - Track Obsidian version support
- ποΈ Optimized packages - Minified, production-ready
Commands:
npm run release # Create versioned release
npm run build # Production build
npm run dev # Development build
Hot Reload Support
Fast development workflow
- π Auto-reload - Plugin reloads on changes
- β‘ Quick iteration - See changes immediately
- π Better debugging - Test fixes quickly
- π» Dev mode - Fast builds without type checking
Error Handling
Robust error management
- π‘οΈ Try-catch blocks - Graceful error handling
- π Error logging - Detailed error information
- π User notifications - Friendly error messages
- π Debug mode - Detailed logging for troubleshooting
Planned Features
Coming Soon
These features are planned for future releases:
- π State management - Reactive state system
- π Data persistence - Plugin data storage
- π API integration - External service support
- π§ͺ Testing framework - Unit and integration tests
- π± Mobile optimization - Mobile-specific features
- π i18n support - Multi-language support
See the Roadmap for details.
Feature Requests
Have an idea for a new feature?
- Check the Roadmap to see if itβs planned
- Search GitHub Issues for existing requests
- Create a new feature request with:
- Clear description of the feature
- Use cases and benefits
- Examples of similar features (if any)
Feature Comparison
vs. Basic Template
Compared to Obsidianβs sample plugin:
| Feature | Basic Template | This Template |
|---|---|---|
| Build System | webpack | β‘ esbuild (10x faster) |
| CSS Organization | Single file | π Modular files |
| Logging | console.log | π·οΈ Component-based logger |
| Debug Code | Manual removal | ποΈ Auto-elimination |
| Documentation | README only | π Full docs structure |
| Release Tools | Manual | π¦ Automated |
| File Limits | None | π Enforced modularity |
| Type Safety | Basic | β Strict TypeScript |
vs. Manual Setup
Starting from scratch vs. using this template:
| Task | Manual Setup | This Template |
|---|---|---|
| Initial Setup | 4-8 hours | β‘ 5 minutes |
| Build System | 2-4 hours | β Pre-configured |
| CSS Pipeline | 1-2 hours | β Ready to use |
| Logging System | 3-6 hours | β Included |
| Documentation | Varies | β Structure ready |
| Best Practices | Learn/implement | β Built-in |
Performance
Build Times
Development mode:
- Initial build: ~500ms
- Incremental rebuild: ~50-100ms
- CSS compilation: ~10ms
Production mode:
- Full build with type checking: ~2-3s
- Minification and optimization: ~500ms
Bundle Sizes
Typical bundle sizes for plugins built with this template:
- main.js (minified): 50-150 KB
- styles.css: 5-20 KB
- Total: 55-170 KB
With debug elimination:
- Debug code removed: ~10-20% size reduction
- Zero runtime overhead
- Production bundles are lean
Browser Compatibility
Compatible with:
- β Chromium (Obsidian desktop)
- β WebKit (Obsidian mobile)
- β Recent browser versions (for testing)
Operating System Support
Works on all Obsidian-supported platforms:
- β Windows 10/11
- β macOS 10.15+
- β Linux (various distributions)
- β iOS (Obsidian mobile)
- β Android (Obsidian mobile)
Learn More
- Installation Guide - Get started
- User Guides - Step-by-step tutorials
- Developer Docs - Contributing guide
- Examples - Code samples
Questions? Check the FAQ or create an issue.