Skip to content
 
 

Repository files navigation

Habit Tracker App

A personal habit tracking web app built with Next.js 15 and Supabase. Tracks fitness, NoFap, diet, and GMAT study — with analytics, AI insights, Excel export, and Telegram reminders.

Live demo: tracker-app-chi-self.vercel.app


Features

  • Fitness — log workout types, rest days, tags, and remarks. Streak tracking and calendar heatmap.
  • NoFap — daily urge count, clean/relapse streaks, weekday frequency analysis.
  • Diet — meals, ingredients, macros (protein/carbs/fat), water intake, and calorie trends.
  • GMAT — daily study hours, category breakdown (Quant/Verbal/DI/IR), cumulative progress.
  • Analytics — per-tracker analytics pages with charts (bar, line, pie, stacked) and period selector.
  • AI Insights — GPT-powered analysis of your data with actionable recommendations.
  • Excel Export — 9-sheet financial-statement-style export with live formulas and cross-sheet references.
  • Goals — set and track targets across all trackers.
  • Reminders — Telegram notifications via cron job.
  • Light / Dark / System theme toggle.
  • PWA-ready (installable on mobile).

Tech Stack

Self-hosting

1. Clone and install

git clone https://github.com/varshithsai17-boop/Habit-Tracker-App.git
cd Habit-Tracker-App
npm install

2. Set up Supabase

  1. Create a project at supabase.com
  2. Run supabase/schema.sql in the SQL editor to create all tables
  3. Enable Email auth under Authentication → Providers

3. Configure environment variables

cp .env.example .env.local

Fill in .env.local with your own values (see .env.example for what's needed).

4. Run locally

npm run dev

Open http://localhost:3000.

5. Deploy to Vercel

npx vercel --prod

Add all environment variables from .env.local to your Vercel project settings.

To enable cron reminders, add this to vercel.json (already included) and set CRON_SECRET in Vercel env vars.

Project Structure

app/
  (app)/          # authenticated pages
    fitness/      # fitness tracker + analytics
    nofap/        # nofap tracker + analytics
    diet/         # diet tracker + analytics
    gmat/         # GMAT tracker + analytics
    analytics/    # combined analytics + AI
    goals/        # goal tracking
    settings/     # theme, export, reminders
  api/
    export/       # Excel export endpoint
    ai/analyze/   # AI insights endpoint
    cron/         # Telegram reminder cron
lib/
  supabase/       # Supabase client (browser + server)
  utils/          # date helpers
supabase/
  schema.sql      # full database schema
scripts/
  sample-export.js  # preview the Excel export with fake data

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages