Tagline: Tiny gains, massive growth
A modern habit tracking web application that visualizes personal growth through compound momentum. Track bad-to-good habit swaps and watch your "Momentum Index" snowball over time with beautiful gradient charts.
Compounded reimagines habit tracking by focusing on compound growth rather than streaks. Instead of resetting progress when you miss a day, it shows how small daily choices accumulate into significant personal transformation through mathematical compounding.
- Habit Pairing: Create bad โ good habit pairs with weighted impact
- Momentum Index: Compound growth visualization with gradient charts
- Multi-View Analytics: Day, Week, Month, Quarter, and All-Time insights
- Heat Maps: GitHub-style contribution grids for habit completion
- Mobile-First: Responsive design optimized for all devices
- No Account Required: All data stored locally in your browser
- Export/Import: Full data backup and restore functionality
The Momentum Index uses a decay model that rewards consistency and penalizes missed days:
S_t = ฮฃ (w_i * d_i) // completed weight sum
misses = ฮฃ (w_i * (1โd_i)) // missed weight sum
P_t = S_t โ ฯ * misses // penalized return
R_t = logged ? P_t : B // baseline drift if nothing logged
M_t = max(0, (1 + R_t) * ฮฒ * M_{t-1})
- ฯ (slip penalty) = -0.25
- B (baseline drift) = -0.50
- ฮฒ (decay factor) = 0.995
This formula ensures that consistent effort compounds positively (like 1.001^365 โ 1.440194), while missed days create visible dips that motivate recovery.
The app comes pre-loaded with 4 sample habit pairs and 90+ days of mock data so you can immediately see the compound growth visualization in action.
A_today = A_yesterday ร (1 + ฮฃ weights_checked_today)- 4 Weight Tiers: Micro (+0.010%), Small (+0.020%), Medium (+0.030%), Large (+0.050%), Keystone (+0.100%)
- Daily Calculation: Your momentum multiplies based on completed habits
- 30-Day Projection: Shows future growth trajectory based on recent performance
- No Negative Spiral: Momentum index never goes below 0
Aesthetic: Headspace meets Robinhood
- Gradient Background: Teal (#3ABAB4) โ Lilac (#B4A7FF)
- Accent Color: Coral (#FF8C7A)
- Typography: Inter font family
- Animations: Framer Motion for smooth, spring-based transitions
- Theme Support: Light and dark mode
- React 18 with TypeScript for type safety
- Vite for fast development and building
- Tailwind CSS for utility-first styling
- Framer Motion for smooth animations
- Recharts for data visualization
- Lucide React for consistent iconography
- LocalStorage for persistence (no backend required)
- Mock Data for instant demo experience
- Export/Import for data portability
- Type-safe data models with full TypeScript coverage
- Custom Hooks for state management (
useHabits,useMomentum) - Service Layer for data abstraction (
dataService) - Component Library with reusable UI components
- Responsive Design with mobile-first approach
compounded/
โโโ client/src/
โ โโโ components/ # Reusable UI components
โ โ โโโ ui/ # Base UI library (buttons, modals, etc.)
โ โ โโโ HeatMapGrid.tsx # GitHub-style contribution grids
โ โ โโโ MomentumChart.tsx # Main compound growth visualization
โ โ โโโ DayDetailModal.tsx # Habit logging interface
โ โโโ pages/ # Main application views
โ โ โโโ Home.tsx # Dashboard with momentum chart
โ โ โโโ Habits.tsx # Habit management interface
โ โ โโโ Insights.tsx # Multi-view analytics
โ โ โโโ Settings.tsx # Configuration and data management
โ โโโ hooks/ # Custom React hooks
โ โ โโโ useHabits.ts # Main state management
โ โ โโโ useMomentum.ts # Compound calculations
โ โ โโโ useInsights*.ts # Analytics data processing
โ โโโ services/ # Data layer
โ โ โโโ dataService.ts # Data access abstraction
โ โ โโโ dataSourceConfig.ts # Mock vs user data switching
โ โโโ utils/ # Utility functions
โ โ โโโ compound.ts # Mathematical compound calculations
โ โ โโโ date.ts # Date manipulation helpers
โ โโโ types.ts # TypeScript type definitions
โโโ tests/ # Test suite
โ โโโ compound.test.ts # Mathematical accuracy tests
โ โโโ data-flow-integration.test.ts # End-to-end data flow
โ โโโ docs/ # Technical documentation
โโโ server/ # Express.js server (for deployment)
- Node.js 18+
- npm or yarn
# Install dependencies
npm install
# Start development server
npm run dev
# Run tests
npm test
# Build for production
npm run buildnpm run dev # Start development server
npm run build # Production build
npm run test # Run test suite
npm run test:data-flow # Test core data flow integration
npm run check # TypeScript type checkinginterface HabitPair {
id: string;
goodHabit: string;
weight: HabitWeight;
createdAt: Date;
}
interface HabitLog {
id: string;
habitId: string;
date: string; // YYYY-MM-DD
state: 'good' | 'unlogged';
}
enum HabitWeight {
MICRO = 0.0001, // +0.010%
SMALL = 0.0002, // +0.020%
MEDIUM = 0.0003, // +0.030%
LARGE = 0.0005, // +0.050%
KEYSTONE = 0.001 // +0.100%
}- Landing โ See compound growth demo
- Create First Pair โ Bad habit โ Good habit โ Set weight
- Interface Tour โ Quick feature highlights
- Dashboard โ Start tracking with Momentum Index
- Morning Check-in โ Review habits for today
- Log Completion โ Tap checkmarks for completed habits
- View Progress โ See momentum chart update in real-time
- Weekly Review โ Check insights for patterns and trends
- Touch-Friendly: All interactive elements โฅ44px tap targets
- Responsive Grids: Adaptive layouts for all screen sizes
- Gesture Support: Long-press for mobile context menus
- Viewport Units: Uses
svhunits for mobile browser compatibility - Keyboard Handling: Mobile keyboard-aware modal positioning
- Unit Tests: Mathematical compound calculations
- Integration Tests: End-to-end data flow validation
- Component Tests: UI component rendering and interaction
- Data Flow Tests: Mock data โ calculations โ UI display pipeline
- Local-Only: All data stays in your browser
- No Tracking: No analytics or user tracking
- Export Control: Full data export/import for user control
- No Account: No sign-up or personal information required
The application is optimized for Replit deployment:
- Static Frontend: Served via Express.js
- Environment Detection: Auto-switches between development and production
- Asset Optimization: Vite handles bundling and optimization
- Port Configuration: Uses port 5000 for Replit compatibility
- Consistency Goal: โฅ40% of users log โฅ3 habit pairs after 30 days
- Habit Reduction: โฅ25% drop in negative daily rate after 60 days
- User Satisfaction: Net Promoter Score โฅ40
- Cloud Sync: Optional account-based data synchronization
- Social Features: Share progress with friends and family
- Advanced Analytics: Correlation analysis between habits
- Habit Suggestions: AI-powered habit recommendation engine
- Integration: Connect with fitness trackers and other apps
This is a personal habit tracking application, but suggestions and feedback are welcome! The codebase is designed to be readable and modular for easy extension.
MIT License - Feel free to use this code for your own habit tracking needs.
Built with โค๏ธ on Replit | Compounding your way to a better you, one habit at a time.