A modern, feature-rich habit tracking app built with React and powered by PostHog analytics. Track your daily habits, build streaks, and visualize your progress with a beautiful, responsive interface.
- Create custom habits with personalized colors and descriptions
- Set target frequencies (daily, weekly, etc.)
- Edit and delete habits with confirmation dialogs
- Track habit completion with intuitive cards
- Streak Counting: Build and maintain daily streaks
- Progress Visualization: Weekly calendar view with completion status
- Statistics Dashboard: Success rates, completion counts, and achievements
- Milestone Tracking: Celebrate streak achievements (3, 7, 14, 30, 50, 100 days)
- Email Authentication: Secure login with email validation
- Multi-User Support: Clean logout system for shared devices
- Dark Mode: Toggle between light and dark themes
- Mobile Responsive: Optimized for all screen sizes
- Offline Ready: LocalStorage persistence for reliable data
- PostHog Integration: Comprehensive user behavior tracking
- Session Analytics: Track user engagement and retention
- Event Tracking: Monitor habit completions, streak milestones, and user journeys
- Privacy Focused: User data remains in their browser
Try it now: https://consultingsultan.github.io/hogbit-tracker/
- Frontend: React 18 with hooks
- Build Tool: Vite
- Styling: Tailwind CSS with custom dark mode
- Icons: Lucide React
- Analytics: PostHog
- Deployment: GitHub Pages with GitHub Actions
- State Management: React Context + useReducer
- Storage: LocalStorage with utility functions
src/
βββ components/ # React components
β βββ WelcomeScreen.jsx # User onboarding
β βββ Dashboard.jsx # Main dashboard
β βββ HabitCard.jsx # Individual habit cards
β βββ AddHabitForm.jsx # Create new habits
β βββ EditHabitModal.jsx # Edit existing habits
β βββ ProgressView.jsx # Progress visualization
β βββ ThemeToggle.jsx # Dark mode toggle
βββ context/ # React Context providers
β βββ HabitContext.jsx # Main app state
β βββ ThemeContext.jsx # Theme management
βββ hooks/ # Custom React hooks
β βββ usePostHog.js # PostHog analytics
β βββ useLocalStorage.js # Storage utilities
βββ utils/ # Utility functions
β βββ dateUtils.js # Date handling
β βββ streakUtils.js # Streak calculations
β βββ storageUtils.js # LocalStorage management
βββ styles/ # CSS and styling
- Clean, intuitive interface
- Habit cards with completion status
- Quick stats overview
- Theme toggle and navigation
- Weekly calendar visualization
- Streak statistics
- Habit details and history
- Achievement milestones
- Email authentication
- Beautiful onboarding flow
- Feature highlights
- Mobile-friendly design
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/consultingsultan/hogbit-tracker.git
cd hogbit-tracker
# Install dependencies
npm install
# Start development server
npm run devCreate a .env file in the root directory:
VITE_POSTHOG_KEY=your_posthog_project_api_key
VITE_POSTHOG_HOST=https://app.posthog.comnpm run buildThe app tracks comprehensive user behavior with PostHog:
user_onboarded- First-time user registrationuser_returned- Returning user loginuser_session_started- Session initiationuser_logged_out- Session termination
habit_created- New habit addedhabit_completed- Habit marked as donehabit_edited- Habit modifiedhabit_deleted- Habit removed
dashboard_viewed- Main dashboard accessprogress_viewed- Progress page visitedstreak_milestone- Streak achievementsdaily_goal_achieved- All habits completedweekly_goal_achieved- Perfect week completion
- Minimalist: Clean, uncluttered interface
- Responsive: Mobile-first design approach
- Accessible: ARIA labels and keyboard navigation
- Performant: Optimized bundle size and loading
- Privacy-First: Data stays in the user's browser
Automatically deployed to GitHub Pages using GitHub Actions:
- Build: Vite production build
- Deploy: GitHub Pages integration
- CI/CD: Automated testing and deployment
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- Built with assistance from Claude Code
- PostHog for comprehensive analytics
- Tailwind CSS for beautiful styling
- Lucide React for clean icons
- The React team for an amazing framework
Found a bug or have a feature request? Please open an issue on GitHub.
Made with β€οΈ by consultingsultan
Start building better habits today with Hogbit Tracker! π·β¨
