Myth Map Cards

A tiny interactive storyteller where users build a fantasy map by placing “location cards” (forest, ruin, port, shrine) onto a grid and linking them with routes, then generate a short quest narrative that references the placed locations and connections. The app includes a card editor (name, icon, tags, mood), a map builder with drag-and-drop placement and route drawing, and a story panel that can reshuffle quest beats (hook, obstacle, twist, reward) while keeping consistency with the current map. Everything runs client-side with localStorage saves for multiple maps and exported/imported JSON for sharing.

To Do30
Scaffold app stack

Run: npm create vite@latest . -- --template react-ts && npm i -D tailwindcss postcss autoprefixer && npx tailwindcss init -p && npm i @tailwindcss/vite class-variance-authority clsx tailwind-merge lucide-react @radix-ui/react-dialog @radix-ui/react-dropdown-menu @radix-ui/react-label @radix-ui/react-popover @radix-ui/react-separator @radix-ui/react-slot @radix-ui/react-tabs @radix-ui/react-toast && npx shadcn@latest init

by system

Add app layout shell

Create src/App.tsx with a responsive 3-column layout (cards, map, story) using Tailwind.

by system

Add top nav bar

Create src/components/TopBar.tsx with app title and New/Save/Load/Export/Import buttons.

by system

Create UI toast hook

Add src/components/ui/toaster.tsx and toast usage scaffold for user feedback.

by system

Define core types

Create src/lib/types.ts with Card, MapState, PlacedCard, Route, and StoryBeat types.

by system

Seed default card catalog

Create src/lib/defaultCards.ts exporting initial location cards (forest, ruin, port, shrine).

by system

LocalStorage maps repository

Create src/lib/storage.ts to list/save/load/delete named maps in localStorage.

by system

Export/import JSON helpers

Create src/lib/serialize.ts to export/import MapState with validation and versioning.

by system

Global map state store

Create src/state/useMapStore.ts as a React hook managing current MapState and actions.

by system

Map list dialog UI

Create src/components/MapManagerDialog.tsx to browse, load, rename, and delete saved maps.

by system

Import JSON dialog UI

Create src/components/ImportDialog.tsx with textarea/file input to load exported JSON.

by system

Export JSON dialog UI

Create src/components/ExportDialog.tsx showing current map JSON with copy/download.

by system

Card editor form UI

Create src/components/CardEditor.tsx for editing name, icon, tags, and mood of a card.

by system

Icon picker popover

Create src/components/IconPicker.tsx listing a small set of lucide icons to choose from.

by system

Card catalog panel

Create src/components/CardCatalog.tsx showing available cards with search and tag filters.

by system

Card catalog item

Create src/components/CardCatalogItem.tsx as a draggable card tile preview.

by system

Map grid component

Create src/components/MapGrid.tsx rendering a fixed-size grid with cell coordinates.

by system

Grid cell component

Create src/components/GridCell.tsx handling drop target highlighting and click selection.

by system

Drag-and-drop placement

Implement HTML5 drag/drop in MapGrid to place a card into a target cell.

by system

Placed card rendering

Create src/components/PlacedCardToken.tsx to render a placed card within a grid cell.

by system

Placed card context menu

Create src/components/PlacedCardMenu.tsx for rotate/remove/edit actions via dropdown.

by system

Route drawing overlay

Create src/components/RouteOverlay.tsx using SVG to draw routes between placed cards.

by system

Route creation interaction

Add click-to-start/click-to-end logic in MapGrid to create a route between two cells.

by system

Route selection and deletion

Add route hit-targets and a small delete action when a route is selected.

by system

Map builder toolbar

Create src/components/MapToolbar.tsx for toggling route mode, snap options, and grid size.

by system

Story generator utilities

Create src/lib/storygen.ts to generate hook/obstacle/twist/reward using current map data.

by system

Story panel UI

Create src/components/StoryPanel.tsx displaying beats and a generated quest summary.

by system

Reshuffle beat buttons

Add per-beat reshuffle controls in StoryPanel that keep referenced locations consistent.

by system

Consistency mapping logic

Implement a stable entity resolver in storygen to reuse the same chosen locations/routes across reshuffles.

by system

Wire top bar actions

Connect TopBar buttons to store actions and dialogs (new/save/load/export/import) with toasts.

by system

In Progress0
In Review0
Done0