Skyline Stampede

A tiny, client-side city-builder where you drag-and-drop “building stamps” onto a grid to create a skyline, scoring points for simple adjacency combos (e.g., parks next to homes, offices near transit, factories away from parks). The app includes a limited daily challenge seed (stored in localStorage) so everyone gets the same puzzle layout, plus a free-build sandbox with undo/redo and an exportable PNG snapshot of your skyline. Components are cleanly separated into a grid editor, stamp palette, scoring/rules panel, challenge selector, and a compact history/timeline viewer.

To Do30
Scaffold app stack

Run: npm create vite@latest . -- --template react-ts && npm i && npm i -D tailwindcss postcss autoprefixer && npx tailwindcss init -p && npm i class-variance-authority clsx tailwind-merge lucide-react html-to-image && npx shadcn@latest init -d

by system

Add Tailwind styles

Configure tailwind content paths and add Tailwind directives to src/index.css.

by system

Set app layout

Create src/App.tsx with a responsive two-column layout for grid and side panels.

by system

Define core types

Add src/lib/types.ts defining StampType, Cell, GridState, Mode, and HistoryEntry types.

by system

Create stamp catalog

Add src/lib/stamps.ts exporting available building stamps with ids, names, icons, and scores.

by system

Seeded RNG utility

Add src/lib/seed.ts implementing deterministic RNG from a string/number seed.

by system

Daily seed storage

Add src/lib/daily.ts to compute today’s seed and persist it in localStorage.

by system

Grid init helper

Add src/lib/grid.ts with functions to create/reset a grid and place/remove stamps immutably.

by system

Rules & scoring engine

Add src/lib/scoring.ts to compute total score plus per-rule breakdown from a grid.

by system

App state hook

Create src/state/useSkylineStore.ts as a React hook managing mode, seed, grid, and selection.

by system

History undo/redo

Extend src/state/useSkylineStore.ts to track past/future stacks and expose undo/redo actions.

by system

Keyboard shortcuts

Add src/hooks/useHotkeys.ts for Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z binding to undo/redo.

by system

Stamp palette UI

Create src/components/StampPalette.tsx showing selectable stamp buttons in a compact grid.

by system

Stamp drag payload

Add src/lib/dnd.ts defining a consistent drag data format for stamps.

by system

Grid editor shell

Create src/components/GridEditor.tsx rendering the grid and exposing cell-level events.

by system

Grid cell component

Create src/components/GridCell.tsx to render one cell with stamp icon and hover/active states.

by system

Drop to place stamp

Implement HTML5 drag/drop in src/components/GridEditor.tsx to place selected stamp on drop.

by system

Click to paint

Add click-to-place behavior in src/components/GridEditor.tsx using the currently selected stamp.

by system

Erase tool toggle

Create src/components/ToolBar.tsx with Select/Erase toggles that affect grid interactions.

by system

Right-click erase

Add contextmenu handling in src/components/GridEditor.tsx to erase a cell without switching tools.

by system

Rules panel UI

Create src/components/RulesPanel.tsx listing adjacency rules and showing brief explanations.

by system

Score breakdown panel

Create src/components/ScorePanel.tsx showing total score and per-rule contributions from scoring.ts.

by system

Challenge selector UI

Create src/components/ChallengeSelector.tsx to switch between Daily Challenge and Sandbox modes.

by system

Daily challenge reset

Wire src/components/ChallengeSelector.tsx to load today’s seeded layout and lock seed for the day.

by system

Sandbox new game

Add a “New Sandbox” action in src/components/ChallengeSelector.tsx that resets to an empty grid.

by system

Persist current session

Add src/lib/persist.ts and wire it in useSkylineStore to save/load mode, seed, and grid to localStorage.

by system

History timeline viewer

Create src/components/HistoryTimeline.tsx showing recent actions with clickable jump-to state.

by system

Snapshot export button

Create src/components/ExportSnapshotButton.tsx to export the grid area as a PNG using html-to-image.

by system

Grid export wrapper

Update src/components/GridEditor.tsx to expose a stable ref/container for snapshot exporting.

by system

Polish with shadcn UI

Replace basic controls with shadcn/ui components (Button, Tabs, Card, Tooltip) in existing files.

by system

In Progress0
In Review0
Done0