Built with Dark Factory v4 — autonomous AI software development pipeline
A clean, modern daily habit tracker built with Next.js 15, TypeScript, and Tailwind CSS. Track your daily habits, build streaks, and visualize your progress with a weekly view.
- ✅ Daily Habit Tracking - Check off habits as you complete them each day
- 🔥 Streak Counter - See your current streak for each habit
- 📅 Weekly View - Visual 7-day grid showing completion patterns
- 💾 Local Storage - Data persists across browser sessions
- 🌙 Dark Theme - Clean, modern dark interface
- 📱 Responsive Design - Works on mobile and desktop
- ⚡ Fast & Lightweight - No external dependencies, pure localStorage
- Node.js 18.0.0 or higher
- npm
- Clone the repository:
git clone https://github.com/ibuzzardo/habit-tracker.git
cd habit-tracker- Install dependencies:
npm install- Start the development server:
npm run dev- Open http://localhost:3000 in your browser.
- Add a Habit: Click "Add Habit" to create a new habit with a name and emoji icon
- Complete Habits: Check off habits as you complete them each day
- View Streaks: See your current streak count next to each habit
- Weekly Progress: Scroll down to see a 7-day completion grid
- Delete Habits: Use the trash icon to remove habits (with confirmation)
- Framework: Next.js 15 (App Router)
- Language: TypeScript (strict mode)
- Styling: Tailwind CSS
- Icons: Lucide React
- Storage: Browser localStorage
- State Management: React hooks
src/
├── app/
│ ├── layout.tsx # Root layout with dark theme
│ ├── page.tsx # Main page component
│ └── globals.css # Tailwind imports
├── components/
│ ├── HabitList.tsx # List of habits with empty state
│ ├── HabitItem.tsx # Individual habit row
│ ├── AddHabitForm.tsx # Modal form for adding habits
│ └── WeeklyView.tsx # 7-day completion grid
├── hooks/
│ └── useLocalStorage.ts # localStorage React hook
├── utils/
│ └── dateUtils.ts # Date handling and streak calculation
└── types.ts # TypeScript type definitions
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run type-check- Run TypeScript compiler check
Habits are stored in browser localStorage as JSON with the following structure:
interface Habit {
id: string;
name: string;
emoji: string;
completions: { [date: string]: boolean };
}Dates are stored in UTC format (YYYY-MM-DD) to avoid timezone issues.
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
npm run type-check - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is open source and available under the MIT License.