Skip to content

Anjanikumar98/Habit-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Habit Tracker App 📱

A beautiful and intuitive Flutter application for tracking daily habits and building positive routines. Stay motivated with streak tracking, detailed analytics, and smart notifications.

✨ Features

  • Habit Management: Create, edit, and organize your daily habits
  • Smart Tracking: Mark habits as complete with simple tap gestures
  • Streak Tracking: Monitor your progress with visual streak indicators
  • Detailed Analytics: View completion rates, trends, and insights
  • Flexible Scheduling: Support for daily, weekly, and custom frequencies
  • Local Notifications: Smart reminders to keep you on track
  • Beautiful UI: Clean, modern design with dark/light theme support
  • Offline First: All data stored locally with optional backup
  • Progress Visualization: Charts and calendars showing your journey

🚀 Getting Started

Prerequisites

  • Flutter SDK (3.0.0 or higher)
  • Dart SDK (3.0.0 or higher)
  • Android Studio / VS Code
  • Android device or emulator

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/habit-tracker-app.git
    cd habit-tracker-app
  2. Install dependencies

    flutter pub get
  3. Run the app

    flutter run

📁 Project Structure

lib/
├── main.dart                          # App entry point
├── models/                            # Data models
│   ├── habit.dart                     # Habit model
│   ├── habit_completion.dart          # Completion tracking
│   └── user_settings.dart             # User preferences
├── services/                          # Business logic services
│   ├── database_service.dart          # SQLite database operations
│   ├── notification_service.dart      # Local notifications
│   └── analytics_service.dart         # Data analytics and insights
├── screens/                           # App screens and UI
│   ├── home/                          # Home screen components
│   ├── habit_detail/                  # Habit detail view
│   ├── add_habit/                     # Add/edit habit forms
│   ├── statistics/                    # Analytics and charts
│   ├── settings/                      # App settings
│   └── onboarding/                    # First-time user experience
├── widgets/                           # Reusable UI components
├── utils/                             # Helper functions and constants
└── providers/                         # State management

🔧 Key Technologies

  • Flutter: Cross-platform mobile development framework
  • Provider: State management solution
  • SQLite: Local database for offline storage
  • Local Notifications: Smart habit reminders
  • Charts: Beautiful data visualization
  • Material Design: Modern UI components

💡 Core Functionality

Habit Management

  • Create habits with custom names, descriptions, and categories
  • Set flexible frequencies (daily, weekly, custom intervals)
  • Choose colors and icons for visual organization
  • Edit or delete habits with confirmation dialogs

Progress Tracking

  • Mark habits complete with intuitive tap gestures
  • View completion history in calendar format
  • Track streaks and personal best records
  • Monitor completion rates and trends

Analytics & Insights

  • Detailed statistics for individual habits
  • Overall progress summaries and trends
  • Streak analysis and milestone celebrations
  • Export data for external analysis

Smart Notifications

  • Customizable reminder times for each habit
  • Adaptive scheduling based on user behavior
  • Snooze and reschedule options
  • Respectful notification management

🎨 UI Features

  • Responsive Design: Adapts to different screen sizes
  • Theme Support: Light and dark mode with system preference detection
  • Smooth Animations: Delightful micro-interactions throughout the app
  • Accessibility: Screen reader support and high contrast options
  • Intuitive Navigation: Bottom navigation with clear visual hierarchy

📊 Database Schema

Habits Table

  • id (Primary Key)
  • name, description, category
  • frequency, target_count
  • color, icon, created_date
  • is_active, reminder_time

Completions Table

  • id (Primary Key)
  • habit_id (Foreign Key)
  • completion_date, timestamp
  • notes, streak_count

Settings Table

  • theme_preference
  • notification_settings
  • backup_preferences

🔔 Notification System

  • Smart Scheduling: Notifications adapt to user's completion patterns
  • Gentle Reminders: Non-intrusive notifications that respect user preferences
  • Batch Processing: Efficient handling of multiple habit reminders
  • Permission Handling: Graceful degradation when notifications are disabled

📈 Analytics Features

  • Streak Tracking: Visual indicators for current and longest streaks
  • Completion Rates: Percentage-based progress tracking
  • Trend Analysis: Weekly and monthly progress visualization
  • Habit Insights: AI-powered suggestions for habit improvement
  • Export Options: CSV export for external analysis

🛠️ Development

Adding New Features

  1. Models: Define data structures in lib/models/
  2. Services: Implement business logic in lib/services/
  3. Screens: Create UI components in lib/screens/
  4. State Management: Use Provider pattern for state updates

Testing

# Run unit tests
flutter test

# Run integration tests
flutter test integration_test/

# Generate test coverage
flutter test --coverage

Building for Release

# Android
flutter build apk --release

# iOS
flutter build ios --release

Built with ❤️ using Flutter

Start building better habits today! 🌟

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors