A beautiful, feature-rich habit tracking web application built with HTML, CSS, and JavaScript. Track your daily routines, visualize progress with interactive charts, and build better habits!
- Progress Charts: Beautiful donut charts showing daily completion percentage
- Bar Charts: Weekly and monthly progress visualization
- Pie Charts: Habit distribution by category
- Streak Analysis: Track your longest streaks and current progress
- CRUD Operations: Add, edit, and delete habits easily
- Categories: Organize habits by Health, Productivity, Learning, Mindfulness, Social, Creativity, and more
- Frequency Settings: Daily, weekly, or custom day scheduling
- Target Tracking: Set specific targets with units (e.g., 8 glasses of water)
- Monthly Calendar: Visual representation of daily progress
- Progress Indicators: See completion rates for each day
- Navigation: Easy month-to-month browsing
- Responsive Design: Works on desktop, tablet, and mobile
- Beautiful Gradients: Eye-catching color schemes
- Smooth Animations: Polished interactions and transitions
- Dark/Light Themes: Automatically adapts to system preferences
- Local Storage: All data saved locally in your browser
- Export Feature: Download your data as JSON for backup
- Import Feature: Restore data from JSON backup files
- Cross-Device Sync: Transfer habits between different devices/browsers
- Sample Data: Comes with sample habits for demonstration
- Download all files (
index.html,styles.css,script.js) - Open
index.htmlin your web browser - Start tracking your habits!
- Navigate to the project folder in terminal
- Start a local server:
- Python:
python -m http.server 8080 - Node.js:
npx serve -p 8080 - Live Server: Use VS Code Live Server extension
- Python:
- Open
http://localhost:8080in your browser
- Click the "+" button or "Add New Habit"
- Fill in the habit details:
- Name: What you want to track (e.g., "Drink 8 glasses of water")
- Description: Optional details about the habit
- Category: Choose from predefined categories
- Frequency: Daily, weekly, or custom days
- Target & Unit: Optional numerical goals
- Click "Save Habit"
- Go to the Dashboard tab
- Click the circle icon next to each habit to mark as complete
- Watch your progress charts update in real-time!
- Navigate to the Analytics tab
- View different chart types:
- Monthly progress trends
- Habit distribution by category
- Streak analysis for all habits
- Check your statistics for motivation
- Switch to the Calendar tab
- See monthly view with progress indicators
- Navigate between months to see historical data
Edit the JavaScript file to add new categories:
// In the getCategoryIcon() and getCategoryName() methods
const icons = {
health: 'π',
productivity: 'π',
// Add your custom category here
custom: 'π―'
};Modify the CSS variables for easy theme customization:
:root {
--primary-color: #667eea;
--secondary-color: #764ba2;
--success-color: #11998e;
--danger-color: #fc466b;
}- Chart.js: For creating beautiful, responsive charts
- Font Awesome: For icons throughout the application
- Google Fonts: Poppins font family for modern typography
- Chrome 60+
- Firefox 55+
- Safari 12+
- Edge 79+
- Uses localStorage for data persistence
- No server required
- Data stays on your device
- Full import/export functionality for backups and transfers
- Lightweight (~500KB total)
- Fast loading and responsive
- Optimized for mobile devices
The app comes with sample habits to demonstrate features:
- π§ Drink 8 glasses of water (Daily)
- π Read for 30 minutes (Daily)
- π Exercise (Monday, Wednesday, Friday)
You can delete these and add your own habits!
- Click "Export Data" in the dashboard
- Save the JSON file as backup
- Use this file to transfer between devices or as backup
- Click "Import Data" in the dashboard
- Select your previously exported JSON file
- Confirm the import to restore all habits and progress
From Device A to Device B:
- Export data from Device A (saves JSON file)
- Transfer JSON file to Device B (USB, email, cloud storage)
- Import the JSON file on Device B
- All habits and streaks are now on both devices!
Move your habits between Chrome, Firefox, Safari, Edge:
- Export from Browser A β Import to Browser B
- Works seamlessly across all modern browsers
To start fresh, clear your browser's localStorage for this site.
- Start Small: Begin with 2-3 easy habits
- Be Consistent: Better to do something small daily than big things irregularly
- Use Categories: Group similar habits for better organization
- Check Analytics: Use the charts to identify patterns and motivation
- Regular Backups: Export your data weekly/monthly for safety
- Multi-Device Usage: Export from laptop, import to desktop for seamless tracking
- Set Realistic Targets: Don't overwhelm yourself with too many habits at once
Feel free to enhance this application! Some ideas:
- Add more chart types
- Implement habit reminders
- Add social features
- Create habit templates
- Add data import/export options
This project is open source. Feel free to use, modify, and distribute as needed.
Start your journey to better habits today! Remember, small consistent actions lead to big transformations. πͺβ¨