A keyboard-first, offline-capable mind mapping application built with React, TypeScript, and Tauri.
🌐 Live Demo | 📦 GitHub Repository
Status: ✅ Production-ready v1.0 (Phase 18 complete - All tests passing, >80% coverage)
- 🎯 Keyboard-First Navigation: Navigate and edit mind maps entirely with keyboard shortcuts (arrows, Tab, Enter, Space)
- 📱 Progressive Web App: Installable on mobile and desktop, works offline
- 🖥️ Desktop Application: Native app for macOS, Windows, and Linux via Tauri
- ✍️ Rich Text Editing: Markdown-based editing with Lexical (bold, italic, colors, emojis)
- 🎨 Visual Customization: Color picker for text and backgrounds, emoji icons
- 📐 Automatic Layout: Horizontal tree layout with manual repositioning via drag-and-drop
- 💾 Autosave: Automatic saving to IndexedDB to prevent data loss
- ⏪ Undo/Redo: Full history support with keyboard shortcuts
- 📋 Copy/Paste: Copy nodes with entire subtrees
- 🌐 Offline First: Full functionality without internet connection
- 📦 File Management: Save/load mind maps as JSON files
- ⚡ High Performance: Handles 100+ nodes efficiently with throttled layout calculations
- 🧪 Well-Tested: 148 unit tests, 36+ E2E scenarios, >80% code coverage
- 🎨 Modern UI: Clean interface with React Flow canvas and Lexical editor
- 🔒 Type-Safe: Built with TypeScript for reliability
- 📱 Responsive: Works on desktop and mobile browsers
- Framework: React 18 + TypeScript + Vite
- Mind Map Rendering: React Flow
- Rich Text Editor: Lexical
- State Management: Zustand
- Desktop App: Tauri v2
- PWA: Vite PWA Plugin + Workbox
- Testing: Vitest (unit/component) + Playwright (E2E)
- Storage: IndexedDB (idb library)
Visit https://ankurokok.github.io/webmap/ to use the app immediately - no installation required.
- Visit the live demo link above
- Click the install icon (⊕) in your browser's address bar
- The app will be installed and work offline
- Node.js 18+
- npm or pnpm
# Clone the repository
git clone https://github.com/ankurokok/webmap.git
cd webmap
# Install dependencies
npm install
# Start development server
npm run dev
# Run tests
npm run test # Unit tests
npm run test:e2e # E2E tests
npm run test:coverage # Coverage report
# Build for production
npm run buildnpm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
npm run test # Run unit/component tests
npm run test:ui # Run tests with UI
npm run test:coverage # Generate coverage report
npm run test:e2e # Run E2E tests
npm run test:e2e:ui # Run E2E tests with UI
npm run lint # Lint code
npm run lint:fix # Fix linting issues
npm run format # Format code with Prettier
npm run type-check # Check TypeScript types- Start with the root node: When you first open the app, you'll see a single node ready for editing
- Add text: Type directly to replace the node text, or press
Cmd/Ctrl+Enterto edit existing text - Create child nodes: Press
Tabto create a child node (extends the branch rightward) - Create sibling nodes: Press
Enterto create a sibling node (same level) - Navigate: Use arrow keys to move between nodes:
→(Right): Move to first child←(Left): Move to parent↑(Up): Move to previous sibling↓(Down): Move to next sibling
- Enter edit mode: Press
Cmd/Ctrl+Enteror type any character to start editing - Exit edit mode: Press
Escapeto save and return to navigation mode - Markdown formatting: Use
**bold**or*italic*for formatting - Add emojis: Use the emoji picker in the toolbar or type emojis directly
- Collapse/expand: Press
Spaceto hide/show children of a node - Drag nodes: Click and drag any node to reposition it manually
- Reset layout: Use the Reset Layout button in the toolbar to return to automatic positioning
- Copy/paste: Select a node and press
Cmd/Ctrl+Cto copy (includes all children), thenCmd/Ctrl+Vto paste
- Text color: Click the color picker in the toolbar and select a text color
- Background color: Click the background tab in the color picker
- Emoji icons: Use the emoji picker to add an icon to the node (will appear before text)
- Autosave: Your mind map is automatically saved to your browser's IndexedDB every 500ms
- Export JSON: Press
Cmd/Ctrl+Sto download your mind map as a JSON file - Open file: Press
Cmd/Ctrl+Oor drag-and-drop a JSON file to load it
| Shortcut | Action | Details |
|---|---|---|
| → ↑ ↓ ← | Navigate between nodes | Right: child, Left: parent, Up/Down: siblings |
| Enter | Create sibling node | New node at same level as current |
| Tab | Create child node | New node extends branch rightward |
| Space | Collapse/expand children | Toggle visibility of child nodes |
| Delete or Backspace | Delete node | Removes node and all children (except root) |
| Type any character | Edit mode (overwrite) | Replaces text and enters edit mode |
| Cmd/Ctrl + Enter | Edit mode (append) | Enters edit mode with existing text |
| Cmd/Ctrl + C | Copy node | Copies node and all children |
| Cmd/Ctrl + V | Paste node | Pastes as child of selected node |
| Cmd/Ctrl + Z | Undo | Revert last change |
| Cmd/Ctrl + Shift + Z | Redo | Reapply undone change |
| Cmd/Ctrl + S | Save/Export | Download mind map as JSON |
| Cmd/Ctrl + O | Open file | Open file picker to load JSON |
| Shortcut | Action | Details |
|---|---|---|
| Escape | Exit edit mode | Saves changes and returns to navigation |
| Cmd/Ctrl + Z | Undo (exits edit mode) | Reverts changes, returns to navigation |
| Cmd/Ctrl + Shift + Z | Redo (exits edit mode) | Reapplies changes, returns to navigation |
| Cmd/Ctrl + B | Toggle bold | Markdown: **text** |
| Cmd/Ctrl + I | Toggle italic | Markdown: *text* |
| Arrow Keys | Move cursor | Navigate within text |
- Color Picker: Change text or background color
- Emoji Picker: Add emoji icon or inline emoji (searchable)
- Reset Layout: Return all nodes to automatic positioning
webmap/
├── src/
│ ├── components/ # React components
│ │ ├── MindMap/ # Mind map canvas and nodes
│ │ ├── Toolbar/ # Color picker, emoji picker
│ │ ├── Menu/ # Top menu bar
│ │ └── common/ # Shared components
│ ├── hooks/ # Custom React hooks
│ ├── store/ # Zustand state management
│ ├── utils/ # Utility functions
│ ├── types/ # TypeScript type definitions
│ ├── constants/ # Constants (keyboard, colors)
│ └── styles/ # Global styles
├── tests/
│ ├── unit/ # Unit tests
│ ├── component/ # Component tests
│ └── e2e/ # E2E tests (Playwright)
├── planning/ # Project planning docs
│ ├── spec.md # Technical specification
│ ├── todo.md # Task breakdown
│ └── plan.md # Implementation plan
└── public/ # Static assets
- Create a feature branch:
git checkout -b feature/my-feature - Make changes: Implement your feature with tests
- Run tests:
npm run test && npm run test:e2e - Lint and format:
npm run lint:fix && npm run format - Commit: Use conventional commit format (e.g.,
feat: add node deletion) - Push and create PR
npm run testnpm run test:e2enpm run test:coverageThe app is configured to run as a native desktop application using Tauri.
You need to install Rust to build the desktop app. See TAURI_SETUP.md for detailed instructions.
Quick start:
# Install Rust (macOS/Linux)
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
# Install Rust (Windows)
# Download from https://rustup.rs/# Development mode (with hot reload)
npm run tauri:dev
# Build production desktop app
npm run tauri:build
# Regenerate app icons
npm run tauri:icon src-tauri/icons/icon.svgThe tauri:build command creates installers for your platform:
- macOS:
.appbundle and.dmginstaller - Windows:
.exeand.msiinstaller - Linux:
.deb,.AppImage, and others
See TAURI_SETUP.md for complete setup and build instructions.
The app is configured as a PWA and can be installed on mobile and desktop browsers.
Desktop (Chrome/Edge):
- Look for the install icon (⊕) in the address bar
- Or use the browser menu → "Install WebMap"
Mobile (iOS Safari):
- Tap Share (□↑) → "Add to Home Screen"
Mobile (Android Chrome):
- Tap Menu (⋮) → "Add to Home screen"
✅ Installable app icon on home screen/desktop ✅ Standalone window (no browser UI) ✅ Works offline with full functionality ✅ Automatic updates ✅ Fast loading from cache
See PWA_GUIDE.md for complete PWA documentation.
See planning/plan.md for the implementation roadmap and contribution guidelines.
MIT
- Zustand Store: Centralized state management with actions for all operations
- History Stack: Undo/redo functionality with 50-state limit
- Selective Subscriptions: Components only re-render when relevant state changes
- Horizontal Tree Algorithm: Automatic positioning with D3-hierarchy concepts
- Throttled Calculations: 150ms throttle to optimize performance during rapid operations
- Manual Override: Nodes can be dragged; manual positions preserved across operations
- React.memo: CustomNode and CustomEdge components memoized
- Throttled Layout: Layout calculations throttled to ~6-7/sec during rapid operations
- Debounced Autosave: 500ms debounce on autosave operations
- Efficient Rendering: Only affected nodes re-render on state changes
- Unit Tests (148): Store, utilities, hooks, algorithms
- E2E Tests (36+ scenarios): Critical user flows across 3 browsers (Chromium, Firefox, WebKit)
- Performance Tests (5): Large mind maps (100+ nodes, 50-level nesting)
- Coverage: >80% across all modules (Store 98.69%, Layout 98.83%, Navigation 97.22%)
- React Flow: Canvas rendering with custom nodes/edges
- Lexical: Rich text editing with markdown shortcuts
- Zustand: State management with devtools integration
- IndexedDB: Browser storage via idb wrapper
- Vite: Fast build tool with PWA plugin
- TypeScript: Full type safety throughout codebase
- Phase 1: Project setup and infrastructure ✅
- Phase 2: State management (Zustand store) ✅
- Phase 3: Layout and navigation algorithms ✅
- Phase 4: React Flow canvas ✅
- Phase 5: Keyboard navigation ✅
- Phase 5.5: Layout improvement (horizontal tree) ✅
- Phase 6: Rich text editing (Lexical) ✅
- Phase 6.5: Copy/paste with keyboard shortcuts ✅
- Phase 7: Toolbar and styling ✅
- Phase 8: Undo/redo keyboard shortcuts ✅
- Phase 8.5: Edit mode UX improvements ✅
- Phase 9: File management (browser) ✅
- Phase 16: Performance optimization ✅
- Phase 17: Testing and QA ✅
- Phase 18: Testing & quality assurance ✅
- Phase 20: Deployment (GitHub Pages) ✅
- Phase 10: Top menu bar (File, Edit, View, Help)
- Phase 11: Export features (PDF, PNG, SVG)
- Phase 12: Tauri desktop app packaging
- Phase 13: PWA testing and optimization
- Phase 15: UI polish and accessibility improvements
- Phase 19: Extended documentation
- v1.1: Images and links in nodes
- v1.2: Multiple mind maps (library view)
- v2.0: Cloud sync and collaboration
See planning/plan.md and planning/todo.md for detailed implementation notes.