Skip to content

rafiul254/HabitTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯Habit Tracker

Java JavaFX Maven License

A modern, feature-rich desktop application for tracking and building better habits

Features β€’ Installation β€’ Usage β€’ Technologies β€’ Contributing


πŸ“‹ Table of Contents


🌟 Overview

Habit Tracker is a comprehensive desktop application built with JavaFX that helps you build and maintain positive habits. With features like streak tracking, detailed analytics, calendar view, and customizable themes, it provides everything you need to stay motivated and achieve your goals.

Why Use Habit Tracker?

  • βœ… Visual Progress Tracking - See your progress at a glance
  • πŸ“Š Advanced Analytics - Understand your habit patterns with charts
  • πŸ“… Calendar View - Track your entire month's performance
  • πŸ”” Smart Notifications - Never miss your daily habits
  • 🎨 Customizable Themes - 6 beautiful themes to choose from
  • πŸ’Ύ Data Persistence - Your data is saved automatically
  • πŸ† Gamification - Earn points and maintain streaks

✨ Features

Core Features

πŸ“Š Dashboard

  • Real-time habit tracking with checkboxes
  • Progress bar showing daily completion
  • Statistics cards (Total Habits, Completed, Streak, Points)
  • Weekly progress chart
  • Add/Edit/Delete habits
  • Category-based organization (Study, Exercise, Meditation, Outdoor)

πŸ“… Calendar View

  • Monthly calendar with habit completion visualization
  • Color-coded days (Green: Great, Yellow: Good, Orange: Okay)
  • Navigate between months
  • Quick jump to today
  • Visual history of your habits

πŸ“ˆ Statistics & Analytics

  • Pie Chart - Category distribution
  • Line Chart - Weekly trend analysis
  • Performance Metrics - Completion rate, average streak
  • Best Streak Tracker - Monitor your longest streak
  • Top Category - See where you're most consistent

βš™οΈ Settings & Customization

  • 6 Themes: Light, Dark, Ocean, Sunset, Forest, Purple
  • Notification Settings - Enable/disable different notification types
  • Daily Reminders - Set custom reminder time (hour & minute)
  • Auto-save - Never lose your data
  • Export/Import - Backup and restore your habits

πŸ”” Notifications

  • Toast notifications for habit completion
  • Streak milestone celebrations
  • Daily reminders at custom times
  • Achievement unlocks
  • Success/Warning/Error notifications

πŸš€ Installation

Prerequisites

Clone the Repository

git clone https://github.com/YOUR_USERNAME/AdvancedHabitTracker.git
cd AdvancedHabitTracker

Build & Run

# Clean and compile
mvn clean compile

# Run the application
mvn javafx:run

Create Executable JAR

# Build JAR with dependencies
mvn clean package

# Run the JAR
java -jar target/advanced-habittracker-2.0-SNAPSHOT.jar

πŸ’» Usage

Quick Start

  1. Launch the Application

    mvn javafx:run
  2. Add Your First Habit

    • Click the "Add Habit" button
    • Enter habit name (e.g., "Morning Exercise")
    • Select category (Study, Exercise, Meditation, or Outdoor)
    • Click "Add"
  3. Track Your Progress

    • Check the box when you complete a habit
    • Watch your streak increase πŸ”₯
    • Earn points for each completion πŸ†
  4. Explore Features

    • Click on different tabs: Dashboard, Calendar, Statistics, Settings
    • Try different themes in Settings
    • Set up daily reminders

Navigation

  • 🏠 Dashboard - Track today's habits
  • πŸ“… Calendar - View monthly history
  • πŸ“Š Statistics - Analyze your performance
  • βš™οΈ Settings - Customize preferences

Keyboard Shortcuts

  • Ctrl + N - Add new habit
  • Ctrl + S - Save settings
  • Ctrl + T - Toggle theme
  • F5 - Refresh data

πŸ› οΈ Technologies

Core Technologies

Technology Version Purpose
Java 17 Programming Language
JavaFX 21.0.1 GUI Framework
Maven 3.9+ Build Tool
FXML 1.0 UI Layout
CSS3 - Styling

Libraries & Dependencies

  • javafx-controls - UI components
  • javafx-fxml - FXML support
  • javafx-graphics - Graphics rendering
  • javafx-base - Base JavaFX classes
  • ControlsFX (11.1.2) - Enhanced UI controls and notifications

Architecture

  • Design Pattern: MVC (Model-View-Controller)
  • Build System: Maven
  • Dependency Management: Maven POM
  • Version Control: Git

πŸ“ Project Structure

AdvancedHabitTracker/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/
β”‚   β”‚   β”‚   └── com/
β”‚   β”‚   β”‚       └── habittracker/
β”‚   β”‚   β”‚           β”œβ”€β”€ AdvancedHabitTrackerApp.java    # Main application
β”‚   β”‚   β”‚           β”œβ”€β”€ controller/                     # Controllers
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ DashboardController.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ CalendarController.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ StatisticsController.java
β”‚   β”‚   β”‚           β”‚   └── SettingsController.java
β”‚   β”‚   β”‚           β”œβ”€β”€ model/                          # Data models
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ Habit.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ HabitTracker.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ Statistics.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ WeatherData.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ UserSettings.java
β”‚   β”‚   β”‚           β”‚   └── Achievement.java
β”‚   β”‚   β”‚           β”œβ”€β”€ service/                        # Business logic
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ HabitAPIService.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ WeatherService.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ NotificationService.java
β”‚   β”‚   β”‚           β”‚   β”œβ”€β”€ DataExportService.java
β”‚   β”‚   β”‚           β”‚   └── QuoteService.java
β”‚   β”‚   β”‚           └── util/                           # Utilities
β”‚   β”‚   β”‚               β”œβ”€β”€ ThemeManager.java
β”‚   β”‚   β”‚               β”œβ”€β”€ NotificationManager.java
β”‚   β”‚   β”‚               └── APIConfig.java
β”‚   β”‚   └── resources/
β”‚   β”‚       └── com/
β”‚   β”‚           └── habittracker/
β”‚   β”‚               └── view/                           # FXML layouts
β”‚   β”‚                   β”œβ”€β”€ dashboard.fxml
β”‚   β”‚                   β”œβ”€β”€ calendar.fxml
β”‚   β”‚                   β”œβ”€β”€ statistics.fxml
β”‚   β”‚                   └── settings.fxml
β”‚   └── test/                                           # Unit tests
β”œβ”€β”€ docs/                                               # Documentation
β”‚   └── guides/                                         # User guides
β”œβ”€β”€ .gitignore                                          # Git ignore rules
β”œβ”€β”€ pom.xml                                             # Maven configuration
β”œβ”€β”€ README.md                                           # This file
└── LICENSE                                             # MIT License

βš™οΈ Configuration

Application Settings

Edit src/main/java/com/habittracker/util/APIConfig.java:

// Notification Settings
public static final int REMINDER_HOUR = 9;          // Default: 9 AM
public static final int REMINDER_MINUTE = 0;        // Default: 0 minutes
public static final boolean ENABLE_NOTIFICATIONS = true;

// Feature Flags
public static final boolean ENABLE_CALENDAR_VIEW = true;
public static final boolean ENABLE_ADVANCED_CHARTS = true;
public static final boolean ENABLE_ACHIEVEMENTS = true;

Theme Customization

Available themes in ThemeManager.java:

  • Light (Default)
  • Dark
  • Ocean
  • Sunset
  • Forest
  • Purple

πŸ‘¨β€πŸ’» Development

Setting Up Development Environment

  1. Clone the repository

    git clone https://github.com/YOUR_USERNAME/AdvancedHabitTracker.git
    cd AdvancedHabitTracker
  2. Open in IntelliJ IDEA

    • File β†’ Open β†’ Select project folder
    • IntelliJ will automatically detect Maven project
  3. Build the project

    mvn clean install
  4. Run from IntelliJ

    • Right-click on AdvancedHabitTrackerApp.java
    • Select "Run 'AdvancedHabitTrackerApp.main()'"

Running Tests

# Run all tests
mvn test

# Run specific test
mvn test -Dtest=HabitTrackerTest

Building Documentation

# Generate Javadoc
mvn javadoc:javadoc

# View documentation
open target/site/apidocs/index.html

🀝 Contributing

Contributions are welcome! Here's how you can help:

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Contribution Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation
  • Test your changes thoroughly

Bug Reports

If you find a bug, please create an issue with:

  • Description of the bug
  • Steps to reproduce
  • Expected behavior
  • Screenshots (if applicable)
  • System information (OS, Java version)

πŸ“ License

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


πŸ“ž Contact

Rafiul Islam


πŸ™ Acknowledgments


🎯 Roadmap

Version 2.1 (Planned)

  • Data export to CSV/JSON
  • Cloud synchronization
  • Mobile app companion
  • Habit templates
  • Social features (share achievements)

Version 2.2 (Future)

  • AI-powered habit suggestions
  • Integration with fitness trackers
  • Multi-language support
  • Advanced reporting
  • Team challenges

πŸ“Š Project Stats

  • Lines of Code: ~5,000+
  • Files: 25+
  • Features: 30+
  • Themes: 6
  • Charts: 2 types (Pie, Line)

⭐ If you find this project helpful, please consider giving it a star!


Made with ❀️ and β˜• by Rafiul Islam

⬆ Back to Top

About

A modern JavaFX habit tracking application with analytic features.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors