Commit: f1f053b - feat: Phase 4 - Knowledge Graph, Mind Maps, CRM view & Plugin framework
Branch: main
Pushed: ✅ origin/main
All required packages installed:
- ✅
reactflow+@reactflow/background+@reactflow/controls+@reactflow/minimap - ✅
elkjs(graph layout) - ✅
d3(visualization utilities) - ✅
web-worker(background processing)
Location: src/components/Graph/KnowledgeGraph.tsx
Features:
- ✅ Full-screen interactive graph showing ALL notes as nodes
- ✅ Edges represent
[[wiki-link]]connections between notes - ✅ Node colors based on tags (person→pink, project→green, idea→yellow, etc.)
- ✅ Click any node → opens that note in editor
- ✅ Zoom, pan, and minimap controls
- ✅ ELK.js force-directed layout for automatic positioning
- ✅ Toggle button in top bar to switch to Graph view
Implementation:
- Scans all notes and extracts wiki-link references
- Builds node/edge graph structure
- Uses ELK.js for automatic layout algorithm
- React Flow for rendering and interaction
- Dark theme consistent with app design
Location: src/components/MindMap/MindMapEditor.tsx
Features:
- ✅ Interactive mind map creation and editing
- ✅ Double-click canvas → add new node
- ✅ Double-click node → edit label
- ✅ Drag between nodes → create connection
- ✅ Right-click node → context menu (add child, delete, change color)
- ✅ Auto-save to
.mindmap.jsonfiles - ✅ Mind map files appear in file tree with 🧠 icon
- ✅ Click mind map file → opens in Mind Map Editor
Implementation:
- Uses React Flow for interactive canvas
- 7 color palette for node styling
- JSON storage format with node positions
- Context menu for node operations
- Real-time auto-save (1 second debounce)
Location: src/components/MindMap/generateFromNote.ts
Features:
- ✅ "Generate Mind Map" button in editor toolbar
- ✅ Parses current note's headings (H1, H2, H3)
- ✅ Creates hierarchical mind map:
- Note title → root node
- H1 → children of root
- H2 → children of H1
- H3 → children of H2
- ✅ Saves as
.mindmap.jsonfile (same name as note) - ✅ Opens generated mind map in Mind Map Editor
Implementation:
- Regex parsing of markdown headings
- Hierarchical tree construction
- Automatic layout with spacing
- One-click generation from editor
Location: src/components/Graph/KnowledgeGraph.tsx (CRM filter mode)
Features:
- ✅ Filter graph to show only
#personor#contacttagged notes - ✅ Edges from frontmatter
knows: [[Name]]field - ✅ Pink color scheme for person nodes
- ✅ Toggle via "CRM" button in top bar
Implementation:
- Filters nodes to person/contact tags only
- Parses frontmatter
knows:field for relationships - Special edge styling for "knows" connections
- Same interactive graph controls as main view
Location: src/plugins/
Components:
- ✅
types.ts— Plugin interface & AppAPI definition - ✅
PluginManager.ts— Plugin loader, enable/disable system - ✅
registry.ts— Built-in plugin registry (Word Count example) - ✅
src/components/Settings/PluginSettings.tsx— Plugin settings UI
Features:
- ✅ Plugin lifecycle hooks (onLoad, onUnload)
- ✅ AppAPI with methods:
registerCommand()— Add custom commandsregisterEditorExtension()— Extend editorregisterView()— Custom view componentsonNoteOpen()/onNoteSave()— Event hooksgetNote()/getAllNotes()— Data access
- ✅ Plugin settings panel (click ⚙️ in top bar)
- ✅ Enable/disable plugins via toggle button
- ✅ Example "Word Count" built-in plugin
Implementation:
- Singleton PluginManager instance
- Map-based plugin registry
- Callback-based event system
- UI for plugin management
Updated Files:
- ✅
src/App.tsx— View mode switcher, settings panel - ✅
src/store/appStore.ts— ViewMode state, activeMindMap tracking - ✅
src/components/Editor.tsx— "Generate Mind Map" button - ✅
src/components/Sidebar.tsx— Mind map file support, 🧠 icon
Top Bar Features:
- ✅ View mode toggle buttons: 📝 Editor | 🕸️ Graph | 🧠 Mind Map | 👥 CRM
- ✅ Settings button (⚙️) opens plugin settings panel
- ✅ Active view highlighted in blue
File Tree Enhancements:
- ✅
.mindmap.jsonfiles shown with 🧠 icon - ✅ Click mind map → opens in Mind Map view
- ✅ Click note → opens in Editor view
npm run buildResult: ✅ Build passes successfully
Bundle size: ~2.6MB (React Flow + D3 + ELK.js)
TypeScript: All type checks pass
All new components follow the existing dark theme:
- Background:
var(--bg-primary)(#1e1e2e) - Surface:
var(--bg-surface)(#313244) - Text:
var(--text-primary)(#cdd6f4) - Accent:
var(--accent)(#89b4fa) - Border:
var(--border)(#45475a)
React Flow components styled with custom dark theme colors.
Commit: f1f053b
Message: feat: Phase 4 - Knowledge Graph, Mind Maps, CRM view & Plugin framework
Pushed: ✅ origin/main
All changes committed and pushed to GitHub.
- AI Assistant Plugin — Chat interface with note context
- Auto-tagging Plugin — ML-based tag suggestions
- Smart Search Plugin — Semantic search using embeddings
- Export Plugins — PDF, HTML, Obsidian format converters
- Sync Plugins — GitHub, Dropbox, iCloud sync
- Custom Themes Plugin — User theme system
- Pomodoro Timer Plugin — Focus mode with timer
- ✅ Note read/write access
- ✅ Event hooks (open/save)
- ✅ Command registration
- ✅ Editor extension support
- ✅ Custom view registration
- Add plugin marketplace/discovery
- Plugin hot-reload support
- Plugin sandboxing/permissions
- Official plugin SDK package
- Load vault, switch to Graph view
- Verify all notes appear as nodes
- Check wiki-link edges connect correctly
- Test node colors match tags
- Click node → should open in editor
- Test zoom/pan/minimap controls
- Switch to Mind Map view
- Double-click canvas → adds node
- Double-click node → edit label
- Drag between nodes → creates edge
- Right-click node → test all menu options
- Verify auto-save works
- Close and reopen → changes persisted
- Open a note with H1/H2/H3 headings
- Click "Generate Mind Map" button
- Verify hierarchical structure is correct
- Check mind map opens automatically
- Create notes with
#personor#contacttags - Add frontmatter:
knows: [[Name1]], [[Name2]] - Switch to CRM view
- Verify only person nodes shown
- Check relationship edges appear
- Click ⚙️ settings button
- Verify Word Count plugin listed
- Toggle enable/disable
- (Future: test plugin commands)
-
Graph Performance: Large vaults (>1000 notes) may experience slowdown. Future optimization: virtualization or WebGL renderer.
-
Mind Map Layout: Auto-generated layouts are basic. Future: more layout algorithms (radial, tree, etc.)
-
Plugin Security: No sandboxing yet. Plugins have full access to AppAPI. Future: permission system.
-
Offline Only: No sync between devices. Plugin framework ready for sync plugins in Phase 5.
-
Tauri Commands: Mind map save/load requires Tauri backend
write_filecommand (already implemented in earlier phases).
src/components/Graph/KnowledgeGraph.tsx(231 lines)src/components/MindMap/MindMapEditor.tsx(256 lines)src/components/MindMap/generateFromNote.ts(90 lines)src/components/Settings/PluginSettings.tsx(60 lines)src/plugins/types.ts(34 lines)src/plugins/PluginManager.ts(104 lines)src/plugins/registry.ts(27 lines)
src/App.tsx— View switcher + plugin initializationsrc/store/appStore.ts— ViewMode + activeMindMap statesrc/components/Editor.tsx— Generate Mind Map buttonsrc/components/Sidebar.tsx— Mind map file supportpackage.json— New dependencies
Total Lines Added: ~2,200
Total Lines Modified: ~200
All goals achieved. MindNotes now has:
- ✅ Full knowledge graph visualization
- ✅ Interactive mind map editor
- ✅ Auto-generation from notes
- ✅ Personal CRM graph view
- ✅ Plugin framework foundation
Ready for: AI integration, plugin ecosystem, and advanced features in future phases.