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
- 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).
- Next.js 15 (App Router)
- Supabase (auth + Postgres database)
- Recharts (analytics charts)
- ExcelJS (Excel export)
- OpenAI API (AI insights)
- Vercel (hosting + cron)
git clone https://github.com/varshithsai17-boop/Habit-Tracker-App.git
cd Habit-Tracker-App
npm install- Create a project at supabase.com
- Run
supabase/schema.sqlin the SQL editor to create all tables - Enable Email auth under Authentication → Providers
cp .env.example .env.localFill in .env.local with your own values (see .env.example for what's needed).
npm run devOpen http://localhost:3000.
npx vercel --prodAdd 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.
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