I will now inspect the project files to understand the repository structure and available libraries.
I will read package.json to see existing libraries and dependencies.
I will install lucide-react for UI icons and canvas-confetti for animations when saving/exporting or testing routes.
I will check src/index.css and index.html.
I will read index.html.
I will now update index.html to set the webpage title to "MetroCraft Studio | Pro Subway Map & Transit Designer" and include font styling.
I will update src/index.css to configure default fonts, scrollbars, and styling rules.
I will create src/types/metro.ts containing the TypeScript interfaces for stations, lines, waypoints, transfer hubs, landmarks, system configs, tools, and simulator states.
I will now create src/utils/geometry.ts with geometry helpers for 45-degree angle snapping, smooth Bezier and octilinear path generation, and Dijkstra graph routing for the transit trip planner.
I will clean up unused imports in src/utils/geometry.ts.
I will create src/data/sampleSystems.ts containing comprehensive sample metro networks (Metropolis Intermodal Rail, Tokyo Neo Grid, Vignelli Retro NYC) and preset color palettes.
I will check src/utils/cn.ts to ensure our classnames utility is available.
I will create src/utils/export.ts to handle exporting the subway map to PNG, SVG, JSON, and printing a system legend.
I will create src/components/Navbar.tsx for the top navigation bar with system switcher, simulation toggles, zoom controls, undo/redo, export options, and theme selector.
I will create src/components/Toolbar.tsx representing the tool palette for selecting, adding stations, drawing lines, connecting transfer points, curving waypoints, adding landmarks, and toggling grid/angle snap.
I will update src/components/Toolbar.tsx to include optional code in the lines interface.
I will create src/components/MapCanvas.tsx to handle rendering the interactive subway map canvas with smooth zoom, pan, grid snapping, rivers, stations, animated train simulation, and route planner overlay.
I will fix the TypeScript types for textAnchor and remove the unused screenY variable in src/components/MapCanvas.tsx.
I will type the anchor variable as 'middle' | 'start' | 'end' in src/components/MapCanvas.tsx.
I will create src/components/LineManager.tsx for managing subway lines (adding new lines, styling colors, widths, dash patterns, routing modes, and reordering stations).
I will clean up unused imports in src/components/LineManager.tsx.
I will create src/components/StationInspector.tsx to inspect and edit station properties including names, codes, shapes, sizes, label positions, terminus badges, and interchange links.
I will create src/components/TripPlanner.tsx to calculate and display step-by-step transit routes, travel time, transfer penalties, fare estimates, and route simulation along the map.
I will remove the unused ArrowRight import in src/components/TripPlanner.tsx.
I will create src/components/TrainSimulatorPanel.tsx to control the real-time train simulation, adjust speed and density, monitor active train locations, and display network analytics.
I will create src/components/PaletteModal.tsx to browse preset world subway color palettes (NYC MTA, London Tube, Tokyo Metro, Paris RER, Cyberpunk) and apply them to lines.
I will create src/components/HelpModal.tsx containing an interactive guide and tips for designing subway maps.
I will remove the unused imports in src/components/HelpModal.tsx.
I will create src/components/SystemStatsModal.tsx to display system analytics, line breakdowns, and an accessibility colorblindness simulator.
I will clean up unused imports in src/components/SystemStatsModal.tsx.
I will now update src/App.tsx to connect all components, manage undo/redo history, handle keyboard shortcuts, coordinate tool modes, and apply accessibility vision filters.
I will clean up the unused import in src/App.tsx.
I will now build the project to verify that there are no TypeScript or compilation errors.
I have created the MetroCraft Studio - Pro Subway Map Designer & Simulator.
✨ Features Included:
-
Preloaded Sample Networks:
- Starts with the Metropolis Rail & Transit Map, featuring 6 distinct colored lines (Red Central Express, Blue Coast, Yellow City Loop, Green Express, Purple Airport Sky-Link, and Orange Light Rail), river crossings, parks, airport terminals, and multi-station interchange hubs.
- Includes quick-switch presets for Tokyo Neo Grid and Vignelli 1972 Retro New York Classic.
-
Station Nodes & Styling:
- Add stations anywhere on the canvas or insert them directly onto existing lines.
- Customize node shapes (Circle, Pill, Square, Diamond, Star, Hexagon) and sizes (Small to Jumbo).
- Configure station names, codes, fare zones, step-free accessibility badges, terminus markers, and label orientations (Top, Bottom, Left, Right, Diagonals).
-
Curved Lines & Routing Rules:
- Support for 45° Octilinear Grid Snapping for classic Vignelli/London Tube geometric angles.
- Support for Smooth Bezier Curves and orthogonal straight routing.
- Dedicated Curve & Elbows Tool to insert control handles and bend tracks around rivers, parks, or city landmarks.
-
Interchange & Transfer Points:
- Link multiple platforms into unified interchange complexes using the Interchange Hub Tool.
- Customize interchange styles with Rings, Capsules, or Modernist Boxes.
-
Line Coloring & Palettes:
- Built-in world subway color palettes: NYC MTA, London Underground, Tokyo Metro, Paris Métro & RER, and Neo Cyberpunk.
- Customize line colors, dual-track stripes for airport links, thickness, and track styles (Solid, Dashed Commuter Rail, Dotted Rapid Rail, or Under Construction).
-
Live Train Simulator & Route Finder:
- Live Train Simulator: Watch animated trains with line-matched colors travel along your custom tracks at adjustable speeds.
- Route Finder (Trip Planner): Select an origin and destination station to calculate the shortest path using Dijkstra's algorithm, factoring in transfer penalties, and highlight the animated route on the canvas.
Files built: index.html, src/index.css, src/types/metro.ts, src/utils/geometry.ts, src/data/sampleSystems.ts, src/utils/export.ts, src/components/Navbar.tsx, src/components/Toolbar.tsx, src/components/MapCanvas.tsx, src/components/LineManager.tsx, src/components/StationInspector.tsx, src/components/TripPlanner.tsx, src/components/TrainSimulatorPanel.tsx, src/components/PaletteModal.tsx, src/components/HelpModal.tsx, src/components/SystemStatsModal.tsx, src/App.tsx