Skip to content

BaraniVA/Habitheat

πŸ”₯ Habit Heat

A modern, feature-rich habit tracking application built with React and TypeScript. Track your daily habits, build streaks, earn achievements, and maintain consistency with powerful analytics and gamification features.

✨ Features

🎯 Core Habit Tracking

  • Create Custom Habits: Add personalized habits with emojis, colors, and categories
  • Daily Completion: Mark habits as complete with a simple, intuitive interface
  • Streak Tracking: Monitor current and longest streaks for motivation
  • Visual Heatmap: See your progress at a glance with GitHub-style heatmaps
  • Habit Archives: Archive completed or outdated habits to keep your dashboard clean

πŸ“Š Analytics & Insights

  • Completion Statistics: Track completion rates, total completions, and missed days
  • Weekly & Monthly Progress: Monitor short and long-term trends
  • Best Performance Analysis: Identify your best performing habits and optimal days
  • Consistency Scoring: Measure how consistently you maintain habits
  • Smart Insights: Get personalized recommendations based on your patterns

πŸ† Gamification

  • Achievement System: Unlock achievements for milestones and consistent performance
  • Challenge System: Take on personalized challenges to push your limits
  • Progress Rewards: Earn badges and rewards for maintaining streaks
  • Difficulty Levels: Habits categorized by difficulty (easy, medium, hard)

🎨 User Experience

  • Dark/Light Mode: Toggle between themes for comfortable viewing
  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Habit Templates: Quick-start with pre-made habit templates
  • Custom Categories: Organize habits by Health, Learning, Mindfulness, etc.
  • Priority Levels: Set habit priorities to focus on what matters most

🧠 Mood Tracking

  • Daily Mood Logging: Track your emotional state with a 5-point scale
  • Energy & Stress Levels: Monitor energy and stress alongside mood
  • Mood History: Review past moods to identify patterns
  • Personal Notes: Add reflections and thoughts to your daily mood entries

πŸ”§ Advanced Features

  • Local Storage: All data stored locally on your device
  • Quick Actions: Rapidly complete today's habits from the dashboard
  • Habit Details: Deep dive into individual habit statistics and history
  • Smart Filtering: Filter habits by status, priority, or performance
  • Export Ready: Data structured for easy backup and analysis

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository
git clone https://github.com/yourusername/habit-heat.git
cd habit-heat
  1. Install dependencies
npm install
  1. Start the development server
npm run dev
  1. Open your browser Navigate to http://localhost:5173 to start using Habit Heat!

πŸ“± Usage

Creating Your First Habit

  1. Click the "+" button or "Add Habit" on the dashboard
  2. Choose from pre-made templates or create a custom habit
  3. Set your habit name, emoji, color, and category
  4. Configure target days and estimated time
  5. Add motivational quotes or custom rewards (optional)

Daily Tracking

  • Use the dashboard to quickly mark today's habits as complete
  • View your current streaks and completion rates
  • Check the mini-heatmap to see recent progress patterns

Viewing Progress

  • Navigate to Insights for detailed analytics
  • Check Achievements to see unlocked milestones
  • Visit Challenges to take on new goals
  • Use Mood Tracker to log emotional well-being

Customization

  • Toggle between light and dark themes
  • Sort habits by various criteria (streak, completion rate, etc.)
  • Filter habits by status or priority
  • Archive habits you no longer need

πŸ—οΈ Tech Stack

Frontend

  • React 18 - Modern UI library with hooks
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first styling
  • Lucide React - Beautiful, customizable icons

Build Tools

  • Vite - Fast build tool and dev server
  • ESLint - Code linting and formatting
  • PostCSS - CSS processing

Features

  • Local Storage - Client-side data persistence
  • Responsive Design - Mobile-first approach
  • Theme System - Dark/light mode support
  • Component Architecture - Modular, reusable components

πŸ“ Project Structure

🎯 Frontend Structure

project/                 # Frontend React application
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ HabitCard.tsx          # Individual habit display
β”‚   β”‚   β”œβ”€β”€ HabitDetail.tsx        # Detailed habit view
β”‚   β”‚   β”œβ”€β”€ AddHabitModal.tsx      # Habit creation modal
β”‚   β”‚   β”œβ”€β”€ Login.tsx              # User authentication login
β”‚   β”‚   β”œβ”€β”€ Signup.tsx             # User registration
β”‚   β”‚   β”œβ”€β”€ Header.tsx             # Navigation header with logout
β”‚   β”‚   β”œβ”€β”€ Footer.tsx             # Application footer
β”‚   β”‚   β”œβ”€β”€ Heatmap.tsx            # Progress visualization
β”‚   β”‚   β”œβ”€β”€ MiniHeatmap.tsx        # Compact progress view
β”‚   β”‚   β”œβ”€β”€ HabitStats.tsx         # Habit statistics display
β”‚   β”‚   β”œβ”€β”€ QuickActions.tsx       # Quick habit completion
β”‚   β”‚   β”œβ”€β”€ SelfCareTip.tsx        # Wellness tips
β”‚   β”‚   β”œβ”€β”€ AchievementNotification.tsx # Achievement alerts
β”‚   β”‚   β”œβ”€β”€ WidgetSettingsModal.tsx # Widget configuration
|   |   |-- AdvancedFilterModal.tsx # Filter Implementation
|   |   |-- AuthDebugComponent.tsx  # Authorization Debugging
|   |   |-- FilterSummary.tsx       # Summary for all Filters
|   |   |-- LandingPage.tsx         # Component for Landing Page
|   |   |-- OAuthSuccess.tsx        # Component for Success state in OAuth
|   |   |-- QuickActions.tsx        # Quick Actions Tab
|   |   |-- TimeInput.tsx           # Input Component for Profile Page
|   |   |-- UpdateHabitModal.tsx    # Update Habit Component
|   |   |-- SaveAsTemplateModal.tsx # Save Existing Habit as Template
β”‚   β”‚   └── widgets/               # Dashboard widgets
β”‚   β”‚       β”œβ”€β”€ CurrentStreakWidget.tsx      # Streak display
β”‚   β”‚       β”œβ”€β”€ DailyCompletionRateWidget.tsx # Daily progress
β”‚   β”‚       └── TotalHabitsCompletedWidget.tsx # Total completion stats
β”‚   β”œβ”€β”€ hooks/              # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ useHabits.ts           # Habit management logic
β”‚   β”‚   └── useTheme.ts            # Theme management
β”‚   β”œβ”€β”€ pages/              # Page components
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx          # Main dashboard page
β”‚   β”‚   β”œβ”€β”€ InsightsView.tsx       # Analytics page
β”‚   β”‚   β”œβ”€β”€ AchievementsView.tsx   # Achievements page
β”‚   β”‚   β”œβ”€β”€ ChallengesView.tsx     # Challenges page
β”‚   β”‚   β”œβ”€β”€ HabitTemplatesView.tsx # Templates page
β”‚   β”‚   β”œβ”€β”€ MoodTracker.tsx        # Mood tracking page
β”‚   β”‚   β”œβ”€β”€ ProfilePage.tsx        # User profile page
β”‚   β”‚   └── NotFound.tsx           # 404 error page
β”‚   β”œβ”€β”€ types/              # TypeScript definitions
β”‚   β”‚   └── index.ts               # All type definitions
β”‚   β”œβ”€β”€ utils/              # Utility functions
β”‚   β”‚   β”œβ”€β”€ storage.ts             # Local storage helpers
β”‚   β”‚   β”œβ”€β”€ habitStats.ts          # Statistics calculations
β”‚   β”‚   β”œβ”€β”€ achievements.ts        # Achievement logic
β”‚   β”‚   β”œβ”€β”€ challenges.ts          # Challenge system
β”‚   β”‚   β”œβ”€β”€ insights.ts            # Analytics generation
|   |   |-- auth.ts                # Manage Authentication flow
|   |   |-- advancedFilter.ts      # Manage Advance Filtering
β”‚   β”‚   β”œβ”€β”€ habitTemplates.ts      # Pre-made habit templates
β”‚   β”‚   β”œβ”€β”€ motivationalQuotes.ts  # Inspirational quotes
β”‚   β”‚   └── dateUtils.ts           # Date manipulation utilities
β”‚   β”œβ”€β”€ App.tsx             # Main application component
β”‚   β”œβ”€β”€ main.tsx            # Application entry point
|   |-- vite-env.d.ts       # Declaration File for vite env
β”‚   └── index.css           # Global styles
β”œβ”€β”€ public/
β”‚   └── fevicon.png             # Application favicon
β”œβ”€β”€ .env.production             # Frontend prod environment variables
└── index.html                  # HTML entry point

πŸ—οΈ Backend Structure

backend/
β”œβ”€β”€ src/
|   |-- config/
|   |   └── passport.js          # Auth Integration using passport.js 
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   └── authController.js    # Authentication business logic
β”‚   β”œβ”€β”€ db/
β”‚   β”‚   └── connect.js          # Database connection configuration
|   |-- lib/
|   |   └── cloudinary.js       # Configuration for cloudinary
|   |   └── utils.js            # JWT token creation file
β”‚   β”œβ”€β”€ middleware/
|   |   └── authMiddleware.js   # Middleware for Authentication flow
β”‚   β”‚   └── errorHandler.js     # Global error handling middleware
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   └── User.js             # User schema and model
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── auth.js             # Authentication routes
β”‚   β”œβ”€β”€ app.js                  # Express app configuration
β”‚   └── index.js                # Server entry point
β”œβ”€β”€ .env.example                # Environment variables template
β”œβ”€β”€ .env.production             # Production environment variables
└── README.md                   # Server documentation

🎯 Key Components

Habit Management

  • HabitCard: Displays habit summary with mini-heatmap
  • HabitDetail: Full habit view with detailed statistics
  • AddHabitModal: Streamlined habit creation process

Analytics

  • InsightsView: Comprehensive analytics dashboard
  • HabitStats: Advanced statistics calculations
  • Progress Tracking: Visual progress indicators

Gamification

  • AchievementsView: Achievement gallery and progress
  • ChallengesView: Active and available challenges
  • Achievement System: Automated milestone detection

πŸ”’ Data & Privacy

  • Local Storage: All data stays on your device
  • No Tracking: No analytics or user tracking
  • Offline First: Works completely offline
  • Data Control: Export/import your data anytime

🌟 Features in Detail

Habit Templates

Pre-configured habits across categories:

  • Health & Fitness: Exercise, water intake, healthy eating
  • Learning: Reading, language practice, skill development
  • Mindfulness: Meditation, gratitude journaling
  • Digital Wellness: Screen time limits, no-phone mornings

Achievement System

Unlock achievements for:

  • Creating your first habit
  • Maintaining streaks (7, 30, 100+ days)
  • Achieving perfect completion rates
  • Building multiple habits
  • Consistency milestones

Challenge System

  • Streak Challenges: Build long-term consistency
  • Completion Challenges: Hit specific targets
  • Multi-Habit Challenges: Complete multiple habits daily
  • Consistency Challenges: Maintain high completion rates

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes following our coding standards
  4. Test your changes locally
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request using our PR template

πŸ“‹ Pull Request Guidelines

  • Fill out the PR template completely
  • Include screenshots for UI changes
  • Write clear commit messages
  • Ensure all tests pass
  • Update documentation if needed
  • Follow TypeScript and React best practices

πŸ—οΈ Development Setup

# Clone your fork
git clone https://github.com/yourusername/habit-heat.git
cd habit-heat

# Install dependencies
npm install

# Start development server
npm run dev

# Run linting
npm run lint

# Build for production
npm run build

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“§ Support

If you encounter any issues or have questions:

  • Open an issue on GitHub
  • Check the documentation in the /docs folder
  • Review the TypeScript definitions in /src/types

Start building better habits today with Habit Heat! πŸ”₯

Turn your daily routines into powerful habits that stick.

⬆️ Back to Top

About

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 24