HabitFlow is a cross-platform habit tracker and analytics dashboard built with Next.js, MongoDB, and a time-series log model.
| Dashboard | AI Insights |
|---|---|
- Habit tracking matrix (rows = habits, columns = days)
- Streak calculation from completed day history
- Success rate + progress analytics per habit (monthly)
- Monthly performance chart with multiple lines (one line per habit)
- Auth with Clerk (Google/Gmail + Clerk session)
- Dark/Light mode
- Habit edit + delete actions
- AI Weekly Insights card (rule-based fallback if OpenAI key is not set)
- Quick routine seeding button (adds a full Morning/Afternoon/Evening/Night pack in one click)
- Mobile UX improvements: auto-scroll to current day column, collapsible habits list panel
- Next.js (App Router)
- MongoDB + Mongoose
- Tailwind CSS + shadcn/ui
- Redux Toolkit + redux-persist (dashboard state persistence)
- Recharts / Chart.js (analytics)
- Clerk (authentication)
- OpenAI (optional, for AI Insights)
See ARCHITECTURE.md.
- Install dependencies:
npm ci
- Configure environment variables:
- Copy
.env.exampleto.envand fill in values
- Copy
- Start the dev server:
npm run dev
- Open the app at
http://localhost:3000.
If you’re using the Electron build:
- Download the Windows installer:
- GitHub Releases (direct):
https://github.com/RaghavOG/HabbitFlow/releases/download/v1.0.0/HabitFlow.Setup.1.0.0.exe
- GitHub Releases (direct):
- Run the installer.
- If Windows SmartScreen shows a warning, click More info → Run anyway (expected for unsigned builds).
- Launch HabitFlow from the Start Menu.
- Open the web app in Chrome.
- Tap the ⋮ menu.
- Tap Install app (or Add to Home screen).
- Open HabitFlow from your home screen (it runs like an app).
- Open the web app in Safari.
- Tap the Share button.
- Tap Add to Home Screen.
- Open HabitFlow from your home screen.
Required:
MONGODB_URI- MongoDB connection stringNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY- Clerk frontend keyCLERK_SECRET_KEY- Clerk backend secretCLERK_WEBHOOK_SECRET- Clerk webhook signing secret
Optional:
OPENAI_API_KEY- enables real AI insights; when missing, the UI uses deterministic fallback insightsOPENAI_MODEL- OpenAI model name (defaults togpt-4o-mini)
Full list in ./.env.example.
Documentation: docs/api.md.
- Reminders
- Offline sync
- Export data
- PWA service worker wiring
- Improved desktop (Electron) packaging/UX
MIT (see LICENSE).