A Stardew-Valley-inspired pixel-art wellness companion that encourages mental and physical health through an evolving virtual pet (caterpillar to butterfly).
npm install
npm run devOpen http://localhost:5173 in your browser.
- Virtual Pet Evolution: Watch your companion grow from egg to caterpillar to cocoon to butterfly as you complete wellness goals
- Daily Goal Tracking: Water intake, exercise, sleep, mindfulness, outdoor time, and screen breaks
- Check-ins: Time-of-day-aware mood and energy check-ins with personalized, warm responses
- Butterfly Garden: Earn unique butterflies with randomized palettes and patterns each growth cycle
- Support Resources: Crisis hotlines and a guided box-breathing exercise always accessible
- Progress Dashboard: 7-day activity charts, mood/energy trends, streak tracking, and gentle insights
- Pixel Art: All sprites rendered in code (no external image assets), with runtime palette swapping
- Animations: Idle breathing, body wave, wing flap, parallax sky, ambient pollen particles
- Sound: Web Audio API synthesized chimes, sparkles, and arpeggios (mutable)
- Accessibility: Keyboard navigation, ARIA labels, reduced-motion support, AA color contrast
- PWA: Works offline after first load, installable on mobile
- Data Export: Download your data as JSON anytime from Settings
- Vite + React 18 + JavaScript
- TailwindCSS with custom pixel theme
- Zustand (state) + localStorage persistence
- Framer Motion (animations)
- Lucide React (icons)
- Web Audio API (sound synthesis)
- date-fns (time math)
- vite-plugin-pwa (offline support)
npm testTests cover XP calculations, time utilities, palette math, and store actions.
All data is stored locally in your browser via localStorage (key: betterfly_v1). No server, no tracking, no accounts. Use Settings > Export Data to download a JSON backup.
src/
components/ UI and feature components
screens/ Onboarding, Home, Progress, Garden, Support
store/ Zustand store with persist middleware
data/ Affirmations, check-in questions, hotlines, sprites
utils/ Time, XP, palette math, sound, notifications
hooks/ useInterval, usePageVisibility, useReducedMotion
tests/ Unit tests for utils and store
Built with care for Hack Cupertino 2026. BetterFly is a wellness companion and is not a substitute for professional medical care.