I will inspect the existing files in the project to understand the structure and installed dependencies.
I will inspect package.json to see existing dependencies.
I will install lucide-react and canvas-confetti for rich iconography and interactive celebratory animations during workflow simulations.
I will update index.html to set a suitable application title and metadata.
I will update the title in index.html.
I will inspect src/index.css.
I will enhance src/index.css with custom styles for smooth dragging, canvas grid rendering helpers, and clean scrollbars.
I will create src/types/flowchart.ts defining the data models for shapes, connectors, canvas viewport, themes, simulation steps, and history state.
I will create src/constants/themes.ts containing curated themes (Modern Corporate, Sunset Glow, Emerald Forest, Cyberpunk Dark, Pastel Soft).
I will create src/constants/templates.ts containing the initial sample flowchart ("E-Commerce Order Fulfillment Workflow") along with other templates and shape catalog presets.
I will create src/utils/geometry.ts providing precision geometry math for orthogonal elbow routing, smooth Bezier curves, port anchor calculation, shape boundary intersection, and snap-to-grid calculations.
I will fix the unused variable notice in src/utils/geometry.ts.
I will create src/utils/export.ts handling high-resolution PNG image export, SVG vector export, and JSON project serialization/deserialization.
I will add the PNG canvas rendering function exportToPNG to src/utils/export.ts.
I will create src/components/ShapeItem.tsx to render all 11 distinct flowchart shapes with selection halos, 8-way resize anchors, connection ports, and inline double-click text editors.
I will remove the unused zoom parameter from src/components/ShapeItem.tsx.
I will remove zoom: number from ShapeItemProps in src/components/ShapeItem.tsx.
I will create src/components/ConnectorItem.tsx to render connector paths with arrowheads, animated flow effects, selection highlights, and inline text editing.
I will add custom keyframe animation rules to src/index.css for animated connector flow paths.
I will create src/components/Toolbar.tsx with tools for canvas selection, panning, connector creation, and a categorized shape library for one-click insertion or drag-to-canvas.
I will integrate the Send to Back button into the Quick Action Toolbar.
I will create src/components/Inspector.tsx to provide a properties panel for styling shapes, editing typography, customizing connector routing styles, and multi-shape alignment tools.
I will remove the unused icons from src/components/Inspector.tsx.
I will create src/components/ZoomControls.tsx for zooming, resetting viewports, toggling snap-to-grid magnetism, and grid customizability.
I will remove the unused RotateCcw import from src/components/ZoomControls.tsx.
I will create src/components/Minimap.tsx to render a miniature radar overview of the flowchart canvas with interactive viewport jumping.
I will create src/components/SimulatorModal.tsx for step-by-step interactive workflow traversal, decision choice prompts, step counter logs, and celebration confetti.
I will create src/components/Navbar.tsx for diagram title editing, preset template loading, theme switching, undo/redo history navigation, file export/import, and simulation activation.
I will create src/components/Canvas.tsx handling viewport transformations, dynamic grid rendering, shape dragging/resizing, connection port line drawing, selection box lassoing, and keyboard events.
I will replace src/App.tsx with the complete FlowCraft Studio application managing diagram state, history undo/redo stack, keyboard shortcuts, multi-item alignment, zoom viewport calculations, and simulation traversal.
I will check src/main.tsx to verify the App import convention.
I will export App as default in src/App.tsx to match src/main.tsx.
I will test building the project to confirm that all TypeScript types, SVG paths, and components build without errors.
I have created FlowCraft Studio, an interactive, feature-complete Flowchart and Workflow Diagram Builder built with React, Vite, and Tailwind CSS.
🌟 Key Features Built:
-
Rich Shape Library (11 Distinct Types):
- Basic: Process Rectangle, Rounded Task, Decision Diamond, Start/End Capsule.
- Data & Storage: Input/Output Parallelogram, Wavy Document, SQL Database Cylinder.
- System & Actors: Cloud API Service, Loop Hexagon, User/Actor Silhouettes, Sticky Notes with folded corners.
-
Advanced Connectors & Routing:
- 3 Path Routing Modes: Straight, Orthogonal (Elbow routing with smart corner alignment), and Smooth Bezier Curves.
- Line Styling: Solid, Dashed, or Dotted strokes with customizable line thickness and color.
- Animated Flow Effects: Toggleable moving particles along connector paths to visualize live data flows.
- Arrowheads & Labels: Customizable start/end markers and inline editable labels.
-
Inline & Inspector Text Editing:
- Double-Click Editing: Double-click any shape or connector label to edit text inline directly on the canvas.
- Typography Inspector: Adjust font size (
12px to 32px), Bold, Italic, alignment, and text color.
-
Precision Snap-to-Grid & Alignment:
- Grid Customization: Toggle grid visibility (dots or grid lines) and adjust grid increments (
10px, 15px, 20px, 30px, 40px).
- Snap Magnetism: Auto-snapping during drag and resize operations.
- Multi-Selection Alignment: Align multiple shapes (Left, Center, Right, Top, Middle, Bottom) and distribute horizontally or vertically.
-
Infinite Zoom & Navigation Controls:
- Zoom Bar: Dedicated zoom buttons (
- / +), current percentage display, Reset to 100%, and Fit to Screen.
- Pan Modes: Hold
Spacebar + Drag, use Middle-click drag, or toggle the dedicated Pan Tool.
- Live Minimap: Interactive bottom-right radar overview to jump across large diagrams.
-
Sample Flowcharts & Presets:
Files built: index.html, src/index.css, src/types/flowchart.ts, src/constants/themes.ts, src/constants/templates.ts, src/utils/geometry.ts, src/utils/export.ts, src/components/ShapeItem.tsx, src/components/ConnectorItem.tsx, src/components/Toolbar.tsx, src/components/Inspector.tsx, src/components/ZoomControls.tsx, src/components/Minimap.tsx, src/components/SimulatorModal.tsx, src/components/Navbar.tsx, src/components/Canvas.tsx, src/App.tsx