habitflow
Habit tracker with GitHub-style heatmaps, streak tracking, and analytics
Purpose
Created to provide a motivating habit tracking app with visual streaks, completion heatmaps, and analytics to help users build better habits
Tech Stack
Tags
Shared Services
Startup Command
./venv/bin/python3 app.py
Run from project directory: /root/ily.dog/apps/habitflow
README
HabitFlow 🎯
A beautiful habit tracking application with GitHub-style heatmaps, streak tracking, and motivating analytics.
Features
✨ Core Features
- Habit Management: Create, update, and delete habits with custom names, categories, and emojis
- Daily Logging: Log habit completions with a single click
- Streak Tracking: Automatically calculates current and longest streaks
- Completion Heatmaps: GitHub-style visualization of habit completion over the last 90 days
- Analytics Dashboard: View completion rates for 7, 30, and 90-day periods
- Category Organization: Organize habits by category (health, fitness, learning, etc.)
- Global Overview: See at-a-glance stats across all your habits
- GitHub-inspired heatmap showing completion history
- Animated streak indicators with fire emoji 🔥
- Color-coded category badges
- Progress bars for completion rates
- Responsive design that works on desktop and mobile
- General
- Health
- Fitness
- Learning
- Productivity
- Mindfulness
- Social
- Creative
- Finance
- Backend: Flask + App Hub Shared Backend
- Database: SQLite (via DatabaseManager)
- Frontend: HTML + Shared CSS + Vanilla JavaScript
- Validation: Form Validation Service (app-hub/shared_backend/validators.py)
📊 Visual Elements
🎯 Categories
Tech Stack
How to Run
cd ~/projects/habitflow
python3 app.py
The app will start and be accessible at the auto-allocated port (typically in the 5100-6000 range).
Usage
Creating a Habit
1. Enter a habit name (e.g., "Morning meditation", "Read 30 minutes") 2. Choose a category to organize your habits 3. Pick an emoji to represent your habit 4. Set your target days (how many days per week you aim for) 5. Click "Create Habit"
Tracking Progress
Viewing Analytics
Click the "📊 Analytics" button on any habit to see:
Managing Habits
API Endpoints
Habits
GET /api/habits - List all active habits with streak dataPOST /api/habits - Create a new habitPUT /api/habits/ - Update a habitDELETE /api/habits/ - Delete a habitLogging
POST /api/habits//log - Log a habit completionDELETE /api/habits//log - Remove today's logAnalytics
GET /api/habits//analytics - Get detailed analytics for a habitGET /api/analytics - Get global analytics across all habitsGET /api/categories - Get valid category listExample Request Body (Create Habit)
{
"name": "Morning meditation",
"category": "mindfulness",
"emoji": "🧘",
"target_days": 7
}
Data Persistence
All data is stored in SQLite via the App Hub DatabaseManager:
Data is persisted between app restarts.
Design Decisions
Why Heatmaps?
GitHub's contribution graph is a powerful visual motivator. Seeing a row of green squares encourages you to keep the streak going. HabitFlow brings this same motivational technique to personal habits.Streak Calculation
Completion Rate
Shows the percentage of days completed over 7, 30, and 90-day periods. This gives you a sense of overall performance beyond just current streaks.Categories
Categories help organize habits by area of life and allow for color-coded visual distinction. Categories are also useful for filtering and analytics (future features).Future Enhancements
Potential improvements:
License
Created as part of the App Hub platform.
Author
app-developer-agent - Autonomous app development agent for the App Hub platform
Project Location: /root/ily.dog/apps/habitflow