Constellation Focus

A playful pomodoro + mood check-in app where each completed focus session adds a glowing “star” to a personal constellation, forming lines into named patterns based on streaks and session types. Users can start/pause timers, tag sessions (study, creative, chores), log a 1–5 mood/energy rating, and review a simple dashboard showing weekly focus minutes and constellation growth. Everything runs client-side with localStorage, using modular components for Timer, Session Tagging, Mood Slider, Constellation Canvas, and Stats/History views.

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 class-variance-authority clsx tailwind-merge lucide-react && npx shadcn@latest init && npx shadcn@latest add button card badge slider tabs dialog tooltip separator sonner

by system

Add Tailwind globals

Configure Tailwind in src/index.css with @tailwind directives and set up basic app-wide styles.

by system

Set up shadcn utils

Ensure src/lib/utils.ts exports cn() and paths align with the Vite + TS setup.

by system

Define core types

Create src/types.ts with TimerState, SessionTag, MoodRating, FocusSession, and ConstellationStar types.

by system

LocalStorage helpers

Create src/lib/storage.ts with load/save functions for sessions, settings, and constellation state.

by system

Seed default settings

Create src/lib/defaults.ts defining default pomodoro durations and initial user constellation metadata.

by system

Timer engine hook

Implement src/hooks/useTimer.ts providing start/pause/reset and ticking logic with requestAnimationFrame or setInterval.

by system

Session state hook

Implement src/hooks/useSessions.ts to append sessions, persist to localStorage, and expose derived aggregates.

by system

Streak computation

Create src/lib/streaks.ts to compute streaks and pattern names from recent sessions and tags.

by system

Constellation layout

Create src/lib/constellation.ts to map sessions to star positions and line segments deterministically.

by system

App shell layout

Implement src/components/AppShell.tsx with header, main container, and responsive spacing using Tailwind.

by system

Tab navigation

Implement src/components/AppTabs.tsx using shadcn Tabs to switch Timer, Constellation, and Stats views.

by system

Timer page

Create src/pages/TimerPage.tsx composing timer controls, tagging, and mood check-in.

by system

Constellation page

Create src/pages/ConstellationPage.tsx hosting the constellation canvas and pattern summary.

by system

Stats page

Create src/pages/StatsPage.tsx showing weekly minutes and a simple session history list.

by system

Timer display component

Create src/components/timer/TimerDisplay.tsx to render remaining time and current phase label.

by system

Timer controls component

Create src/components/timer/TimerControls.tsx with Start/Pause/Reset buttons wired via props.

by system

Phase selector component

Create src/components/timer/PhaseSelector.tsx to choose Focus/Break durations from settings via props.

by system

Session tag picker

Create src/components/session/TagPicker.tsx to select a session tag (study/creative/chores) with badges.

by system

Mood slider component

Create src/components/session/MoodSlider.tsx using shadcn Slider for 1–5 mood/energy rating.

by system

Session summary card

Create src/components/session/SessionSummary.tsx showing chosen tag, mood, and planned minutes.

by system

Finish session modal

Create src/components/session/FinishSessionDialog.tsx prompting for mood/tag confirmation before saving.

by system

Session save wiring

Update src/pages/TimerPage.tsx to save a completed focus session into useSessions and reset timer.

by system

Constellation canvas

Create src/components/constellation/ConstellationCanvas.tsx drawing stars and lines on a <canvas> from props.

by system

Star glow rendering

Enhance src/components/constellation/ConstellationCanvas.tsx to render a soft glow effect per star.

by system

Pattern badge header

Create src/components/constellation/PatternHeader.tsx showing current streak, pattern name, and tag breakdown.

by system

Weekly minutes chart

Create src/components/stats/WeeklyMinutes.tsx rendering a simple 7-day bar chart with divs (no chart libs).

by system

Session history list

Create src/components/stats/SessionHistory.tsx listing recent sessions with tag, mood, and duration.

by system

Clear data action

Create src/components/settings/ClearDataButton.tsx to wipe localStorage keys with a confirmation dialog.

by system

Toast notifications

Wire sonner to show toasts for session saved, timer started/paused, and data cleared.

by system

In Progress0
In Review0
Done0