Glyph Garden

A tiny generative art toy where users “plant” ASCII glyph seeds (like *, @, #) onto a grid and grow them into animated patterns using simple rules (mirror, drift, bloom, scatter). Each plant is a configurable card (glyph, color palette, growth speed, rule set) that can be toggled, reordered, and layered to compose a final canvas, with one-click export to PNG and shareable presets saved to localStorage.

To Do30
Scaffold project

Run: npm create vite@latest . -- --template react-ts && npm i -D tailwindcss postcss autoprefixer && npx tailwindcss init -p && npm i @tailwindcss/vite && npm i lucide-react && npx shadcn@latest init

by system

Add Tailwind setup

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

by system

Install shadcn components

Add shadcn/ui primitives needed (button, card, input, slider, select, switch, tabs, tooltip, dropdown-menu, dialog).

by system

Create app shell

Build the main layout in App.tsx with header, left sidebar, and canvas area.

by system

Define data models

Create src/types.ts defining Plant, RuleSet, Palette, and Preset types.

by system

Seed palettes list

Create src/palettes.ts exporting a small set of named color palettes.

by system

Rule set definitions

Create src/rules.ts defining mirror, drift, bloom, and scatter rule configs.

by system

Plant defaults factory

Create src/plantDefaults.ts to generate a new Plant with sensible defaults.

by system

LocalStorage hook

Implement src/hooks/useLocalStorage.ts for typed get/set and versioned keys.

by system

Presets persistence

Create src/presets/storage.ts to save/load presets and last session state from localStorage.

by system

Plants store hook

Implement src/state/usePlants.ts to manage add/remove/update/toggle/reorder/layer plants.

by system

Reorder helper utils

Create src/utils/reorder.ts with a pure function to move array items by index.

by system

Grid engine types

Create src/engine/gridTypes.ts defining Cell, Grid, and renderable cell output types.

by system

Grid creation utils

Create src/engine/grid.ts with functions to create/clear grids and set/get cells.

by system

Rule application engine

Implement src/engine/applyRules.ts to apply a plant’s rules to its active cells per tick.

by system

Layer compositing

Create src/engine/composite.ts to combine multiple plant layers into a final grid.

by system

Animation ticker hook

Implement src/hooks/useTicker.ts using requestAnimationFrame with a controllable tick rate.

by system

Canvas renderer component

Create src/components/GlyphCanvas.tsx to render the final grid as monospaced glyphs with colors.

by system

Grid size controls

Create src/components/GridControls.tsx to adjust rows/cols and cell size settings.

by system

Plant list panel

Create src/components/PlantList.tsx to display plants as a vertical list of cards.

by system

Plant card UI

Create src/components/PlantCard.tsx to show plant summary with toggle, delete, and drag handle visuals.

by system

Glyph input control

Create src/components/controls/GlyphPicker.tsx for selecting a single ASCII glyph.

by system

Palette select control

Create src/components/controls/PaletteSelect.tsx for choosing a named palette for a plant.

by system

Speed slider control

Create src/components/controls/SpeedSlider.tsx to edit a plant’s growth speed.

by system

Rule set editor

Create src/components/RuleEditor.tsx to enable/disable rules and tweak rule parameters per plant.

by system

Layer order controls

Add up/down buttons in PlantCard.tsx to reorder plants without drag-and-drop.

by system

Planting interaction

Implement click-to-plant in GlyphCanvas.tsx to place a seed for the selected plant on the grid.

by system

Play pause controls

Create src/components/PlaybackControls.tsx for play/pause, step, and clear actions.

by system

Export to PNG

Create src/utils/exportPng.ts to rasterize the rendered grid to an offscreen canvas and download as PNG.

by system

Preset share dialog

Create src/components/SharePresetDialog.tsx to save/load presets and generate a shareable URL hash.

by system

In Progress0
In Review0
Done0