Constellation Composer

Build a playful generative “night sky” maker where users place stars on a canvas, connect them into constellations, and assign each constellation a name, short meaning, and color. The app includes a seedable random sky generator, snap-to-grid and alignment helpers, and an export feature to download the sky as PNG/SVG. All skies and constellation libraries are saved in localStorage, with a simple gallery view to duplicate, remix, and share a sky via a URL-encoded preset.

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 && npx shadcn@latest init && npx shadcn@latest add button card dialog dropdown-menu input label tabs toast tooltip separator slider switch

by system

Add Tailwind config

Configure Tailwind + shadcn/ui styles in tailwind.config.ts and src/index.css.

by system

Add app routing

Create a minimal hash-based router (Gallery/Sky Editor) in src/App.tsx.

by system

Define core types

Create src/types.ts with Sky, Star, Constellation, Segment, and Preset types.

by system

Seeded RNG utility

Create src/lib/rng.ts implementing deterministic seeded random helpers.

by system

Sky generator utility

Create src/lib/generateSky.ts to generate a starfield from a seed and density settings.

by system

Geometry helpers

Create src/lib/geom.ts for distance, snapping, and hit-testing functions.

by system

LocalStorage store

Create src/lib/storage.ts to load/save skies and constellation library to localStorage with versioning.

by system

Preset encode/decode

Create src/lib/preset.ts to URL-encode and decode a sky preset safely.

by system

App layout shell

Create src/components/AppShell.tsx with top bar and responsive two-pane layout.

by system

Toast hook setup

Add shadcn toaster wiring in src/main.tsx and a small helper in src/lib/toast.ts.

by system

Sky canvas component

Create src/components/SkyCanvas.tsx rendering stars/segments on an HTML canvas with a draw loop.

by system

Canvas interaction layer

Create src/lib/canvasInteraction.ts to map pointer events to world coords and selection actions.

by system

Star placement tool

Implement click-to-add star behavior in SkyCanvas with optional snap-to-grid.

by system

Star selection/move

Implement selecting and dragging stars with hover/active visuals in SkyCanvas.

by system

Constellation connect tool

Implement a mode that connects selected stars into line segments for an active constellation.

by system

Delete key handling

Add keyboard shortcuts in the editor to delete selected stars/segments safely.

by system

Grid overlay toggle

Add an optional grid overlay and snap size control in SkyCanvas.

by system

Alignment guides

Implement simple alignment helpers (x/y snap lines to nearby stars) during drag.

by system

Editor state hook

Create src/hooks/useSkyEditor.ts to manage tool mode, selection, and undoable edits.

by system

Undo/redo stack

Add undo/redo support inside useSkyEditor with keyboard shortcuts.

by system

Constellation metadata form

Create src/components/ConstellationForm.tsx for name, meaning, and color editing.

by system

Constellation list panel

Create src/components/ConstellationList.tsx to select, add, duplicate, and delete constellations.

by system

Sky settings panel

Create src/components/SkySettings.tsx for seed, density, background, and regenerate actions.

by system

Editor page assembly

Create src/pages/EditorPage.tsx composing canvas + panels and persisting changes.

by system

PNG export utility

Create src/lib/exportPng.ts to export the current sky canvas to a downloadable PNG.

by system

SVG export utility

Create src/lib/exportSvg.ts to generate and download an SVG representation of the sky.

by system

Gallery page UI

Create src/pages/GalleryPage.tsx listing saved skies with thumbnail, rename, delete, and duplicate.

by system

Share link dialog

Create src/components/ShareDialog.tsx to copy a URL-encoded preset link and import from URL.

by system

Import preset handler

Add logic in App.tsx to detect preset params on load and offer to save/open the imported sky.

by system

In Progress0
In Review0
Done0