Skip to content

Repository files navigation

Strategy Map

A beautiful, browser-based interactive strategy mapping tool inspired by Excalidraw. Create hand-drawn style diagrams with nodes, arrows, and text labels to visualize your strategies, plans, and ideas.

🌐 Live App: https://strategy-map.app

Production Ready TypeScript React Bundle Size Security

✨ Features

Core Functionality

  • 🎨 Hand-Drawn Aesthetic - Excalidraw-inspired visual style with smooth, sketchy rendering
  • πŸ–±οΈ Interactive Canvas - Drag, drop, and arrange elements with smooth animations
  • πŸ“¦ Auto-Save - Your work is automatically saved to browser storage
  • πŸ’Ύ High-Quality Export - Export diagrams as high-resolution JPEG images (2x DPI)
  • ⌨️ Keyboard Shortcuts - Complete keyboard navigation support
  • πŸ“± Responsive Design - Works seamlessly on desktop and mobile devices

Tools & Interactions

  • Select Tool (V) - Select, move, and edit elements
  • Node Tool (N) - Create circular nodes with editable text
  • Arrow Tool (A) - Connect nodes with directional arrows
  • Text Tool (T) - Add standalone text labels with customizable borders
  • Pan Tool (H) - Navigate around large diagrams
  • Laser Tool (L) - Point and annotate during presentations

Advanced Features

  • 🎯 Multi-Select - Box selection with drag or Shift+Click for multiple elements
  • 🎨 Rich Styling Options:
    • 14 color options for strokes and backgrounds
    • 4 stroke widths (Thin, Medium, Thick, Extra Thick)
    • 4 fill styles (Solid, Hachure, Cross-Hatch, None)
    • 3 font families (Hand Drawn, Normal, Code)
    • Text borders with 3 styles (Solid, Dashed, Dotted)
  • ⚑ Smart Duplication - Duplicate with Cmd/D, preserving connections
  • πŸ“‹ Clipboard Operations - Copy, cut, and paste elements
  • πŸ”„ Zoom Controls - Zoom in/out with precise controls
  • πŸ“ Multiple Whiteboards - Create and manage multiple canvas boards
  • πŸ’Ύ Right-Click Save - Save canvas images to any folder
  • ✨ ESC to Safety - Progressive escape behavior for intuitive navigation

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/Victor-EU/strategy-map.git
cd strategy-map

# Install dependencies
npm install

# Start development server
npm run dev

Development

# Development server (with hot reload)
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Type checking
tsc --noEmit

Browser Support

  • βœ… Chrome/Edge (recommended)
  • βœ… Firefox
  • βœ… Safari
  • βœ… Mobile browsers (iOS Safari, Chrome Mobile)

πŸ“– Usage

Basic Workflow

  1. Create Nodes - Press N, click on canvas, type text
  2. Connect with Arrows - Press A, click source node, drag to target node
  3. Add Text - Press T, click position, type text
  4. Customize Styles - Select elements, use Properties Panel
  5. Export - Click Export button to save as JPEG

See USAGE_GUIDE.md for detailed instructions.

Keyboard Shortcuts

Tools

  • V - Select tool
  • N - Node tool
  • A - Arrow tool
  • T - Text tool
  • H - Pan tool
  • L - Laser tool

Editing

  • Cmd/Ctrl + D - Duplicate selected elements
  • Cmd/Ctrl + C - Copy
  • Cmd/Ctrl + X - Cut
  • Cmd/Ctrl + V - Paste
  • Cmd/Ctrl + A - Select all
  • Delete/Backspace - Delete selected
  • Escape - Cancel / Clear selection / Switch to Select tool

Selection

  • Shift + Click - Add to selection
  • Drag on empty space - Box select multiple elements

πŸ—οΈ Architecture

Strategy Map follows strict Object-Oriented Programming principles for clean, maintainable code.

Core Models

Point           β†’ 2D coordinate system with vector operations
Node            β†’ Circular diagram nodes with text and styling
Arrow           β†’ Directional connections between nodes
TextLabel       β†’ Standalone text elements with borders
Whiteboard      β†’ Canvas boards with resize capabilities
Diagram         β†’ Manages all elements and relationships

Managers

InteractionManager     β†’ Handles all user input (mouse, keyboard, touch)
KeyboardShortcutManager β†’ Platform-aware keyboard shortcuts

Renderers

CanvasRenderer  β†’ High-performance 2D rendering with hand-drawn style
                  - Multi-whiteboard support
                  - Export functionality (JPEG, PNG)
                  - Zoom and pan transformations

React Components

App               β†’ Main application container
Canvas            β†’ Drawing surface with event handling
Toolbar           β†’ Tool selection and actions
PropertiesPanel   β†’ Style customization panel
ZoomControls      β†’ Zoom in/out/reset controls
ConfirmDialog     β†’ Confirmation dialogs

CSS Architecture

  • Global Styles (styles/global.css) - CSS variables, theme system, resets
  • Component Styles (.css files) - Scoped component styles
  • Design System - Consistent spacing, colors, and typography
  • Dark Mode - Automatic support via prefers-color-scheme

See claude.md for comprehensive architecture documentation.

πŸ› οΈ Technology Stack

  • React 19 - Latest UI framework with automatic optimizations
  • TypeScript 5.9 - Strict type safety and modern ES features
  • Vite 7 - Lightning-fast build tool and dev server
  • HTML5 Canvas - Hardware-accelerated 2D rendering
  • CSS Variables - Dynamic theming and customization
  • React Router - Client-side routing for shared diagrams

πŸ“¦ Project Structure

strategy-map/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”‚   β”œβ”€β”€ Canvas.tsx
β”‚   β”‚   β”œβ”€β”€ Toolbar.tsx
β”‚   β”‚   β”œβ”€β”€ PropertiesPanel.tsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ models/           # Core data models (OOP)
β”‚   β”‚   β”œβ”€β”€ Point.ts
β”‚   β”‚   β”œβ”€β”€ Node.ts
β”‚   β”‚   β”œβ”€β”€ Arrow.ts
β”‚   β”‚   β”œβ”€β”€ Diagram.ts
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ managers/         # Business logic managers
β”‚   β”‚   β”œβ”€β”€ InteractionManager.ts
β”‚   β”‚   └── KeyboardShortcutManager.ts
β”‚   β”œβ”€β”€ renderers/        # Canvas rendering
β”‚   β”‚   └── CanvasRenderer.ts
β”‚   β”œβ”€β”€ utils/            # Utilities
β”‚   β”‚   β”œβ”€β”€ storage.ts
β”‚   β”‚   └── analytics.ts
β”‚   β”œβ”€β”€ styles/           # Global styles
β”‚   β”‚   └── global.css
β”‚   └── App.tsx           # Main app component
β”œβ”€β”€ public/               # Static assets
β”œβ”€β”€ dist/                 # Production build output
β”œβ”€β”€ README.md             # This file
β”œβ”€β”€ USAGE_GUIDE.md        # Detailed usage instructions
β”œβ”€β”€ claude.md             # Architecture documentation
└── package.json

πŸ”’ Security & Privacy

  • βœ… Zero Dependencies Vulnerabilities - All packages audited and secure
  • βœ… No XSS Vulnerabilities - All user input safely handled
  • βœ… No Exposed Secrets - No API keys or credentials in code
  • βœ… Privacy-Friendly Analytics - Anonymous, GDPR-compliant tracking
  • βœ… Local Storage - All data stored in browser, no server uploads
  • βœ… TypeScript Strict Mode - Maximum type safety

See production audit results in codebase for full security report.

πŸ“Š Performance

  • Bundle Size: 98 KB gzipped (total)
    • JavaScript: 92.75 KB gzipped
    • CSS: 4.87 KB gzipped
  • Build Time: < 1 second
  • First Load: < 500ms on modern hardware
  • Runtime: 60 FPS smooth animations

🎯 Production Ready

βœ… All TypeScript errors resolved βœ… Production build tested and verified βœ… Security audit passed (0 vulnerabilities) βœ… Performance optimized βœ… Accessibility features implemented βœ… Error handling comprehensive βœ… Documentation complete

🀝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Follow the existing OOP architecture
  2. Maintain TypeScript strict mode compliance
  3. Write clean, documented code
  4. Test thoroughly before submitting
  5. Update documentation as needed

See CONTRIBUTING.md for detailed guidelines.

πŸ“„ License

ISC License - See LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Victor Zhang

πŸ™ Acknowledgments

  • Inspired by Excalidraw for the hand-drawn aesthetic
  • Built with modern web technologies and OOP best practices
  • Designed for developers, strategists, and creative thinkers

πŸ“š Documentation

πŸ› Issues & Support

Found a bug or have a feature request?

  • Check existing issues on GitHub
  • Create a new issue with detailed description
  • Include browser version and steps to reproduce

🚒 Deployment

Ready to deploy? See DEPLOYMENT.md for:

  • Vercel deployment instructions
  • Environment configuration
  • Custom domain setup
  • Production checklist

Made with ❀️ by Victor Zhang using TypeScript, React, and Canvas API

Version 1.0.0 - Production Ready

Connect with me: LinkedIn | Email | GitHub

About

A beautiful, browser-based interactive strategy mapping tool inspired by Excalidraw. Built with TypeScript, React, and Canvas API.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages