Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

🌱 HabitBloom β€” AI-Powered Habit Tracker

A full-stack habit tracking application with AI coaching, voice summaries, and data-driven insights β€” built with React, TypeScript, and Supabase.

Live Demo β†’

React TypeScript Supabase Tailwind CSS


✨ Features

Core

  • User Authentication β€” Email/password signup & login with session management
  • Habit Management β€” Create custom habits with color coding, icons, and weekly targets
  • Dashboard β€” Real-time progress rings, streak tracking, and weekly completion metrics
  • Habit Logs β€” Full history view with filtering and status management
  • Mobile Responsive β€” Bottom navigation on mobile, sidebar on desktop

AI-Powered

  • Habit Coach Chat β€” Ask questions about your patterns and get personalized, data-driven advice powered by an LLM (Gemini)
  • Voice Summary β€” One-tap weekly summary generated by AI and read aloud via browser Text-to-Speech
  • AI Insights Lab β€” Structured report with habit health scoring, risk detection, and experiment-driven recommendations generated from your last 6 weeks of logs

πŸ”¬ Insights Lab β€” AI Engineering Deep Dive

The Insights Lab is a production LLM analytics pipeline that turns raw behavioral logs into a structured coaching report.

Pipeline:

  1. Data aggregation β€” Supabase Edge Function pulls 6 weeks of habit logs, computes a deterministic baseline consistency score, and builds per-habit completion summaries.
  2. Structured prompting β€” Google Gemini (via Lovable AI Gateway) is prompted with a strict JSON schema covering health score, trend classification, at-risk habits, key patterns, and hypothesis-driven experiments.
  3. Output validation β€” Server-side JSON extraction with fallback parsing, type coercion, and field-level guards. Client validates with Zod before rendering.
  4. Caching β€” Reports cached in localStorage to avoid redundant LLM calls and reduce latency on repeat views.

AI engineering concepts demonstrated:

  • Schema-constrained generation (JSON-only output, no markdown leakage)
  • Grounded prompting (LLM only sees user data + computed baselines, no hallucinated context)
  • Defensive parsing for non-deterministic model outputs
  • Hybrid deterministic + LLM scoring (baseline math anchors the model's health score)
  • Hypothesis β†’ action β†’ success-metric framing for actionable AI recommendations

πŸ›  Tech Stack

Layer Technology
Frontend React 18, TypeScript 5, Vite 5
Styling Tailwind CSS 3, shadcn/ui, Radix UI
State TanStack React Query
Routing React Router v6
Backend Supabase (PostgreSQL, Auth, Edge Functions)
AI Google Gemini via Supabase Edge Functions
Charts SVG progress rings, Recharts

πŸ“ Architecture

src/
β”œβ”€β”€ components/       # Reusable UI components (shadcn/ui based)
β”œβ”€β”€ hooks/            # Custom hooks (useAuth, useMobile)
β”œβ”€β”€ integrations/     # Supabase client & auto-generated types
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ Auth.tsx       # Login / Signup
β”‚   β”œβ”€β”€ Dashboard.tsx  # Metrics, progress rings, voice summary
β”‚   β”œβ”€β”€ AddHabit.tsx   # Habit creation form
β”‚   β”œβ”€β”€ HabitLogs.tsx  # Historical log viewer
β”‚   └── HabitChat.tsx  # AI habit coach
└── lib/              # Utilities

supabase/
β”œβ”€β”€ functions/
β”‚   β”œβ”€β”€ habit-chat/    # AI coaching edge function
β”‚   └── habit-summary/ # Weekly summary edge function
└── migrations/        # Database schema & RLS policies

πŸ”’ Security

  • Row Level Security (RLS) on all tables β€” users can only access their own data
  • Auth-gated routes β€” all app pages wrapped in ProtectedRoute
  • Server-side AI β€” habit data is processed in edge functions, never exposed client-side

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • A Supabase project (or use the hosted version)

Setup

# Clone the repo
git clone https://github.com/<your-username>/habit-bloom.git
cd habit-bloom

# Install dependencies
npm install

# Create .env with your Supabase credentials
cp .env.example .env
# Fill in VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY

# Start dev server
npm run dev

Environment Variables

Variable Description
VITE_SUPABASE_URL Your Supabase project URL
VITE_SUPABASE_PUBLISHABLE_KEY Supabase anon/public key

πŸ“Έ Key Screens

Dashboard

Real-time progress rings, streak tracking, weekly completion metrics, and one-tap voice summary.

Dashboard

AI Habit Coach

Personalized, data-driven coaching powered by Google Gemini β€” ask questions about your patterns and get actionable advice.

AI Coach

Add Habit

Create custom habits with emoji icons, color coding, frequency settings, and weekly targets.

Add Habit


🧠 What I Learned

  • Designing secure multi-tenant data with Postgres RLS policies
  • Integrating LLMs via edge functions with structured prompts grounded in user data
  • Building accessible, responsive layouts with Tailwind + shadcn/ui
  • Managing async server state with TanStack Query (mutations, invalidation, optimistic updates)

πŸ“„ License

MIT

Downloads last month
14

Space using Zainab4626/habit-bloom-464 1