Constellation Habit Map

Build a playful habit tracker where each habit is a “star” and completing it draws bright connecting “constellation” lines across a weekly sky grid. Users can create habits with icons/colors, mark daily completions, and watch streaks animate as new stars appear; all data is stored in localStorage. Include a simple stats panel (streaks, completion rate, best day) and a customizable sky theme (background gradient, star density) to keep the scope small but visually satisfying.

To Do30
Scaffold project

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 -d

by system

Add Tailwind base

Configure Tailwind in src/index.css and ensure main.tsx imports it.

by system

Define app layout

Create src/App.tsx with a responsive shell (header/main/sidebar slots) using Tailwind + shadcn/ui.

by system

Create type models

Add src/types.ts defining Habit, CompletionMap, ThemeSettings, and derived stat types.

by system

LocalStorage helpers

Add src/lib/storage.ts to load/save typed app state with versioning and safe defaults.

by system

Date utility module

Add src/lib/dates.ts for week start, day keys (YYYY-MM-DD), and week arrays.

by system

App state hook

Create src/hooks/useHabitStore.ts managing habits/completions/theme and persisting via storage helpers.

by system

Theme CSS variables

Add src/lib/theme.ts to map ThemeSettings to CSS variables on document root.

by system

Sky background component

Create src/components/SkyBackground.tsx rendering gradient backdrop and procedural stars based on density.

by system

Weekly grid component

Create src/components/WeeklySkyGrid.tsx that lays out a 7-day grid and exposes cell coordinates.

by system

Star node component

Create src/components/StarNode.tsx rendering a habit “star” with icon/color and completion glow.

by system

Constellation lines layer

Create src/components/ConstellationLines.tsx that draws SVG lines between completed days for a habit.

by system

Completion toggle logic

Add src/lib/completions.ts for toggling and querying completion per habit per day.

by system

Grid interaction wiring

Wire WeeklySkyGrid to toggle completion on cell click and reflect state changes visually.

by system

Streak calculation helper

Add src/lib/stats.ts to compute current/best streaks, completion rate, and best day of week.

by system

Stats panel component

Create src/components/StatsPanel.tsx displaying computed stats for all habits and the selected week.

by system

Habit list sidebar

Create src/components/HabitList.tsx showing habits, quick select, and per-habit streak summary.

by system

Add habit dialog

Create src/components/AddHabitDialog.tsx using shadcn/ui Dialog + form fields for name, icon, color.

by system

Icon picker component

Create src/components/IconPicker.tsx offering a small set of lucide-react icons selectable in the dialog.

by system

Color picker component

Create src/components/ColorPicker.tsx providing a few preset colors and a custom hex input.

by system

Edit habit dialog

Create src/components/EditHabitDialog.tsx to update name/icon/color and save to the store.

by system

Delete habit action

Add a delete button + confirm in EditHabitDialog and remove related completions in store.

by system

Week navigator

Create src/components/WeekNavigator.tsx to move between weeks and jump back to current week.

by system

Selected habit focus

Add selectedHabitId state in App and filter/highlight stars/lines accordingly.

by system

Star reveal animation

Add CSS animations for newly completed cells (star pop + shimmer) in StarNode styles.

by system

Line draw animation

Animate constellation lines with SVG stroke-dasharray transitions in ConstellationLines.

by system

Theme settings panel

Create src/components/ThemePanel.tsx with controls for gradient colors and star density.

by system

Theme persistence wiring

Connect ThemePanel to store and applyTheme so changes update live and persist to localStorage.

by system

Empty state UI

Add an empty-state view in App when no habits exist with a call-to-action to add a habit.

by system

Polish accessibility

Add keyboard/focus states and aria-labels for grid cells, dialogs, and buttons across components.

by system

In Progress0
In Review0
Done0