Skip to content

ankitraj4096/HabitFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

188 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ HabitFlow

Build habits, unlock tiers, compete with friends

Flutter Firebase License Version


πŸ“– About

HabitFlow is a productivity and task management app designed to help you build better habits through a competitive and friendly environment. The app combines task management with gamification to make productivity fun and rewarding!

πŸ“± App Preview

🏠 Main Features

Task Dashboard β€’ Inbox System β€’ Friend Chat

🎨 Customization & Progress

User Profile β€’ Achievement Badges β€’ Theme Gallery

βš™οΈ Settings

App Configuration

Key Highlights

  • ⏱️ Timed task tracking with pause/resume functionality and beautiful water droplet animations
  • πŸ”„ Daily recurring tasks with calendar heatmap and history tracking
  • 🎯 17-tier progression system from The Starter to The Ascended (100,000 tasks)
  • πŸ‘₯ Social accountability features to connect with friends and assign tasks
  • πŸ† Achievements & badges with animated icons for top tiers
  • 🎨 Custom themes that unlock as you progress through tiers
  • πŸ“ Note-taking system for detailed task planning with cloud sync
  • πŸ—“οΈ Activity heatmap showing your daily completion history
  • 🧹 Automatic cleanup of old data (3+ months) for optimal performance
  • πŸ”” Background timer notifications to track tasks from anywhere

✨ Features

🎯 Core Functionality

  • Task Management - Create, edit, and delete tasks with ease
  • Timer System - Track time spent on each task with pause/resume and visual progress indicators
  • Recurring Tasks - Create daily habits that automatically reset each day
  • Note-Taking - Add detailed notes and descriptions to any task with real-time cloud sync
  • Auto-completion - Tasks automatically mark complete when timers finish
  • Smart Cleanup - Automatic daily cleanup of tasks and recurring history older than 3 months
  • Offline Support - View cached data offline, syncs when reconnected
  • Background Timers - Timers run in background with persistent notifications

πŸ† Progression & Rewards

  • 17 Unique Tiers - Progress from "The Starter" (0 tasks) to "The Ascended" (100,000 tasks)
  • Dynamic Themes - Each tier unlocks unique gradient color schemes
  • Animated Tiers - Top 2 tiers (Luminary & Ascended) feature special pulsating animations
  • Achievement System - Earn badges for milestones and daily streaks
  • Activity Heatmap - View your daily completion activity in a beautiful calendar heatmap
  • Statistics Dashboard - View detailed analytics, completion history, and progress tracking
  • Progress Tracking - Real-time progress bars showing tasks remaining to next tier
  • Lifetime Stats - Track total tasks completed across all time

πŸ‘₯ Social Features

  • Friend System - Add friends by username and build accountability
  • Task Assignment - Assign both regular and recurring tasks to friends
  • Friend Profiles - View friends' tiers, stats, heatmaps, and tier colors
  • View Friend Activity - Tap any date on a friend's heatmap to see their completed tasks for that day
  • Friend Tier Themes - Friend profiles display their unique tier colors
  • Activity Feed - See friends' achievements and progress
  • Inbox System - Manage pending task requests with accept/reject/modify options
  • Privacy Controls - Friends only see limited information (username, tier, heatmap)

πŸ“Š Tracking & History

  • Heatmap Calendar - Visual representation of your daily activity
  • Daily Task View - Tap any date to see all tasks completed that day
  • Recurring Task History - Track your daily habit streaks with calendar view
  • Task Filtering - View all tasks, active tasks, or completed tasks
  • Search Functionality - Find tasks quickly by name
  • Completion Statistics - Track your progress over time

🎨 Customization

  • Theme Selection - Choose from any unlocked tier theme
  • Auto Theme Mode - Colors automatically update as you progress
  • Manual Theme Lock - Select your favorite theme manually
  • Profile Customization - Edit username and track personal statistics
  • Gradient Themes - Multi-color gradients for higher tiers
  • Custom Toasts - Beautiful animated toast notifications

πŸ› οΈ Tech Stack

Category Technology
Frontend Flutter & Dart
Backend Firebase (Authentication, Firestore, Cloud Messaging)
State Management Provider (TierThemeProvider, UserStatsProvider)
UI/UX Material Design, Custom Animations, Water Droplet Timer
Database Firebase Firestore (Cloud + Local Caching)
Notifications flutter_local_notifications, Background Services
Additional Packages url_launcher, flutter_slidable, intl, flutter_lucide, flutter_heatmap_calendar

πŸš€ Getting Started

Prerequisites

Ensure you have the following installed:

πŸ› οΈ Installation Steps

1. Clone the repository

git clone https://github.com/ankitraj4096/HabitFlow.git
cd HabitFlow

2. Install dependencies

flutter pub get

πŸ”₯ Firebase Setup

1. Create a Firebase project

  • Go to Firebase Console
  • Enable Authentication (Email/Password)
  • Create a Firestore Database

2. Download configuration files

  • google-services.json β†’ Place in android/app/
  • GoogleService-Info.plist β†’ Place in ios/Runner/ (for iOS support)

πŸ“˜ Configure Firestore Database

Collections structure:

users collection:

{
  "username": "string",
  "email": "string",
  "lifetimeCompletedTasks": 0,
  "createdAt": "timestamp"
}

user_notes subcollection (under userID):

{
  "taskName": "string",
  "hasTimer": "boolean",
  "elapsedSeconds": "number",
  "isCompleted": "boolean",
  "completedAt": "timestamp",
  "isRecurring": "boolean",
  "status": "accepted | pending | rejected",
  "assignedBy": "string (optional)",
  "assignedByUsername": "string (optional)"
}

recurringHistory collection:

Path: recurringHistory/{userId}/{taskId}/completions/dates/{YYYY-MM-DD}

{
  "completedAt": "timestamp",
  "taskName": "string",
  "duration": "number"
}

πŸ”’ Firestore Security Rules

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    
    match /users/{userId} {
      allow read: if request.auth != null;
      allow write: if request.auth.uid == userId;
    }

    match /user_notes/{userId}/notes/{noteId} {
      allow read, write: if request.auth.uid == userId;
    }

    match /recurringHistory/{userId}/{document=**} {
      allow read, write: if request.auth.uid == userId;
    }

    match /chat_rooms/{roomId}/messages/{messageId} {
      allow read, write: if request.auth != null;
    }
  }
}

▢️ Run the App

flutter run

πŸ“¦ Build APK (Android)

flutter build apk --release

The APK will be located at:

build/app/outputs/flutter-apk/app-release.apk

πŸ“‚ Project Structure

lib/
β”œβ”€β”€ Pages/
β”‚   β”œβ”€β”€ login_components/          # Login & signup screens
β”‚   β”‚   β”œβ”€β”€ login.dart
β”‚   β”‚   β”œβ”€β”€ register.dart
β”‚   β”‚   └── main_page.dart
β”‚   └── ui_components/             # Main app UI
β”‚       β”œβ”€β”€ home_page.dart         # Main dashboard with tasks
β”‚       β”œβ”€β”€ friend_components/     # Friend management
β”‚       β”‚   β”œβ”€β”€ friend_list.dart
β”‚       β”‚   β”œβ”€β”€ friend_profile.dart
β”‚       β”‚   β”œβ”€β”€ add_friend.dart
β”‚       β”‚   └── friend_tasks_manager.dart
β”‚       └── profile_page_components/ # Profile & settings
β”‚           β”œβ”€β”€ achievements.dart
β”‚           β”œβ”€β”€ settings.dart
β”‚           β”œβ”€β”€ user_stats.dart
β”‚           └── profile_page.dart
β”‚
β”œβ”€β”€ component/                     # Reusable widgets
β”‚   β”œβ”€β”€ achievements.dart           # Achievement badges
β”‚   β”œβ”€β”€ custom_toast.dart           # Custom toast notifications
β”‚   β”œβ”€β”€ water_droplet.dart          # Timer animation widget
β”‚   β”œβ”€β”€ textfield.dart              # Custom fields
β”‚   β”œβ”€β”€ todolist.dart               # Task card widget
β”‚   β”œβ”€β”€ heat_map.dart               # Activity heatmap
β”‚   β”œβ”€β”€ daily_task_show.dart        # Daily completed tasks view
β”‚   └── recurring_history_page.dart # Recurring task history
β”‚
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ auth/                       # Firebase authentication
β”‚   β”‚   └── auth_service.dart
β”‚   β”œβ”€β”€ notes/                      # Firestore services
β”‚   β”‚   β”œβ”€β”€ firestore.dart          # Main database service
β”‚   β”‚   └── user_stats_provider.dart# User statistics provider
β”‚   └── clean_up_service.dart       # Automatic data cleanup
β”‚
β”œβ”€β”€ themes/
β”‚   └── tier_theme_provider.dart    # Theme management & tier colors
β”‚
β”œβ”€β”€ helper/
β”‚   └── helper_function.dart        # Utility functions
β”‚
└── main.dart                       # App entry point with splash screen

🎯 Tier Progression System

HabitFlow features 17 progression tiers, each unlocked by completing tasks:

Tier Name Tasks Required Description Special Features
1 The Starter 0 Welcome! Your journey begins here Default theme
2 The Awakened 10 You've taken your first steps to greatness! Purple-pink gradient
3 The Seeker 50 You're discovering your path Bronze theme
4 The Novice 100 Learning the ropes Green theme
5 The Apprentice 250 Building strong habits Orange theme
6 The Adept 500 You've mastered the basics! Orange-red gradient
7 The Disciplined 1,000 Discipline is your strength! Purple theme
8 The Specialist 2,500 Specialized excellence achieved! Pink theme
9 The Expert 5,000 True expertise unlocked! Indigo theme
10 The Vanguard 10,000 Leading the way to greatness! Red theme
11 The Sentinel 15,000 Watchful and unstoppable! Cyan theme
12 The Virtuoso 25,000 Perfection in every task! Teal theme
13 The Master 40,000 Mastery achieved! Gold theme
14 The Grandmaster 60,000 Legendary prowess! Green theme
15 The Titan 75,000 Unshakable and mighty! Blue theme
16 The Luminary 90,000 Shining beacon of excellence! ✨ Animated gold gradient
17 The Ascended 100,000 Beyond limits. Truly transcendent! ✨ Animated dark gradient

Progression Milestones

  • Beginner (0-250): Learn the basics and build consistency
  • Intermediate (250-5K): Develop strong habits and discipline
  • Advanced (5K-40K): Expert-level commitment and mastery
  • Legendary (40K-100K): Elite status with special animated themes

πŸ”„ Recurring Tasks Feature

What Are Recurring Tasks?

Recurring tasks are daily habits that automatically reset every day at midnight. Perfect for tracking:

  • πŸ‹οΈ Daily exercise
  • πŸ“š Reading sessions
  • 🧘 Meditation practice
  • ✍️ Journaling
  • πŸ’» Coding practice
  • 🎯 Any daily habit you want to build!

How It Works

  1. Create Task - Enable "Daily Recurring" when creating a task
  2. Complete Daily - Mark the task done each day
  3. Auto Reset - Task resets at midnight, ready for the next day
  4. Track History - View your completion history in a calendar heatmap
  5. Build Streaks - See how many consecutive days you've completed the task

Recurring Task Features

  • βœ… Automatically resets at midnight (local time)
  • πŸ“… Visual calendar heatmap showing all completions
  • πŸ“Š Track completion streaks and patterns
  • ⏱️ Supports timers for timed habits
  • πŸ‘₯ Can be assigned to friends
  • πŸ—‘οΈ History older than 3 months is auto-archived

🀝 Contributing

We welcome contributions from the community! However, please note our distribution restrictions.

⚠️ Important: Distribution Restrictions

This project is source-available but NOT freely distributable.

You MAY:

  • βœ… View and study the code
  • βœ… Fork for personal or educational use
  • βœ… Contribute improvements via pull requests
  • βœ… Report bugs and suggest features

You MAY NOT:

  • ❌ Distribute modified or unmodified versions
  • ❌ Publish to app stores without permission
  • ❌ Use for commercial purposes
  • ❌ Rebrand and redistribute

For distribution or commercial licensing, contact us at the emails below.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.

Areas for Contribution

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“ Documentation improvements
  • 🎨 UI/UX enhancements
  • πŸ§ͺ Test coverage
  • 🌐 Localization/translations
  • ⚑ Performance optimizations

πŸ› Known Issues & Roadmap

Current Limitations

  • Background timer accuracy depends on device battery optimization settings
  • Friend search is case-sensitive
  • Animation performance on devices with <2GB RAM needs optimization
  • Data older than 3 months is automatically cleaned up

Version 1.1 Roadmap

  • Push notifications for task reminders
  • Dark mode theme option
  • Weekly/monthly recurring tasks
  • Task categories/tags
  • Export task data as CSV/JSON
  • Advanced search and filtering
  • Case-insensitive friend search

Version 2.0 Roadmap

  • iOS support
  • Web version
  • Desktop app (Windows, macOS, Linux)
  • Calendar integration
  • Team workspaces
  • Advanced analytics dashboard
  • Custom tier icons
  • Widget support
  • Pomodoro timer technique

Report bugs via GitHub Issues


πŸ“„ Documentation


πŸ—οΈ Build Instructions

βš™οΈ Debug Build

flutter run

πŸš€ Release APK

flutter build apk --release

πŸ“¦ Split APKs (Smaller Size)

flutter build apk --split-per-abi

🏬 App Bundle (for Play Store)

flutter build appbundle --release

πŸ” With Obfuscation

flutter build apk --release --obfuscate --split-debug-info=build/debug-info

πŸ‘₯ Developers

Ankit Raj
Ankit Raj
@ankitraj4096



Ansh Aryan
Ansh Aryan
@ansharyan007




πŸ“Š Stats

GitHub stars GitHub forks GitHub watchers


πŸ“ License

This project is source-available but not freely distributable.

You may:

  • βœ… View and study the source code
  • βœ… Modify for personal or educational purposes
  • βœ… Contribute improvements via pull requests

You may NOT:

  • ❌ Distribute modified or unmodified versions
  • ❌ Publish to app stores without permission
  • ❌ Use for commercial purposes without permission

For distribution or commercial use, contact:

See LICENSE for full terms.


🌟 Support the Project

If you find HabitFlow useful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs via GitHub Issues
  • πŸ’‘ Suggesting features you'd like to see
  • πŸ”€ Contributing via pull requests
  • πŸ“’ Sharing with friends who need productivity tools
  • πŸ“ Writing a review on your blog or social media

πŸ“ž Contact

Project Repository: github.com/ankitraj4096/HabitFlow

Report Issues: GitHub Issues

Developer Contact:


πŸ™ Acknowledgments

  • Flutter team for the amazing framework
  • Firebase for backend infrastructure and real-time sync
  • The open-source community for inspiration and packages
  • All contributors who help improve HabitFlow
  • Beta testers for valuable feedback

Special Thanks:

  • Material Design for beautiful UI components
  • Lucide Icons for the icon set
  • Provider package for state management
  • flutter_heatmap_calendar for activity tracking
  • All users who trust HabitFlow with their productivity journey

πŸ’‘ Inspiration

HabitFlow was inspired by the need for a fun, competitive, and social approach to habit building. We believe that productivity should be engaging and rewarding, not boring and solitary. By combining gamification with social accountability, HabitFlow transforms habit-building into an exciting journey with friends.


πŸ“ˆ Performance

  • App Size: ~25MB
  • Startup Time: <2 seconds (with splash screen)
  • Minimum RAM: 2GB (4GB recommended)
  • Minimum Android: 5.0 (Lollipop, API 21)
  • Target Android: 13+ for best experience
  • Background Services: Optimized for battery efficiency

Made with ❀️ by Ankit Raj & Ansh Aryan

Β© 2025 HabitFlow. All rights reserved.

⭐ Star us on GitHub β€” it motivates us to build better!


About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •