A modern, full-stack habit tracking application with AI-powered insights, personalized habit suggestions, and streak tracking.
The demo account is already available in the database to see all features in action better:
- Email:
demo@example.com - Password:
password123
- Modern UI/UX: Built with React and Tailwind CSS featuring glassmorphism, dynamic layouts, and a responsive design.
- AI Coach: Integrated with Gemini 2.5 Flash to provide personalized weekly reports, habit suggestions, and morning motivation based on your specific goals and struggles.
- Habit Tracking: Track daily habits, view historical completion heatmaps, and monitor your current and longest streaks.
- Secure Authentication: JWT-based authentication using HTTP-only cookies to ensure maximum security.
- Full Stack: Powered by a Node.js/Express backend and MongoDB.
- React
- Vite
- Tailwind CSS
- Axios
- Recharts (for data visualization)
- Lucide React (for icons)
- Node.js
- Express
- MongoDB & Mongoose
- JSON Web Tokens (JWT)
- Google Gen AI SDK (@google/genai)
- bcryptjs
- Node.js installed
- MongoDB URI (local or Atlas)
- Google Gemini API Key
-
Clone the repository
git clone <your-repo-url> cd ai-habit-tracker
-
Setup the Backend
cd server npm installCreate a
.envfile in theserverdirectory:PORT=8080 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret GEMINI_API_KEY=your_gemini_api_key FRONTEND_URL=http://localhost:5173
-
Setup the Frontend
cd ../client npm installCreate a
.envfile in theclientdirectory:VITE_API_URL=http://localhost:8080/api
-
Start the Backend Server
cd server npm run dev -
Start the Frontend Client
cd client npm run dev
If you want to populate the database with a demo user and mock data for the last 90 days:
cd server
npm run seed