Habitat is a modern habit tracking application built with Next.js, focusing on positive reinforcement through visually appealing animations and intuitive design. Track your daily activities, build consistent habits, and visualize your progress over time.
- 🎯 Daily habit tracking with streaks
- ✨ Visually appealing animations and UI
- 🌓 Dark/Light theme support
- 📊 Progress visualization
- 🔐 GitHub authentication
- 🚀 Real-time updates
- 📱 Responsive design
- Framework: Next.js 15.3
- Styling: Tailwind CSS, Framer Motion
- Database: PostgreSQL with Drizzle ORM
- Authentication: NextAuth.js
- UI Components: Radix UI, shadcn/ui
- Deployment: Vercel/Netlify ready
- Hobby: Choose and modify completions of previous days
- Hobby: View Hobby in detail giving information of past completions and helpful data
- Best streaks Bar
- Calendar heatmap of completions
- Frequency map of days within months
- Have tree/ui based feedback on growing a habitat - tree or anything as such
- Add optimizations
- Faster rendering (Reduce overhead calculations and manipulations)
- Faster response time (Use minimal amount of SQL to get data)
- Node.js (18.18.0 or higher)
- PostgreSQL
- pnpm/npm/yarn/bun
- Clone the repository:
git clone https://github.com/redsteadz/habitat
cd hobbyist- Create a
.envfile in the root directory:
DATABASE_URL="postgresql://admin:root@localhost:5432/test_db"
GITHUB_ID=your_github_id
GITHUB_SECRET=your_github_secret- Start the PostgreSQL database using Docker:
cd src/server/db
docker-compose up -d- Install dependencies:
pnpm install- Set up the database:
pnpm db:generate # Generate migrations
pnpm db:push # Push migrations to database
pnpm db:seed # (Optional) Seed the database- Start the development server:
pnpm devThe application will be available at http://localhost:3000.
pnpm db:migrate- Run database migrationspnpm db:generate- Generate new migrationspnpm db:push- Push schema changespnpm db:studio- Open Drizzle Studio
src/
├── app/ # Next.js app router
├── components/ # Reusable components
├── lib/ # Utility functions
├── server/ # Server-side code
│ └── db/ # Database configuration
└── middleware.ts # Next.js middleware
Contributions are welcome! Please feel free to submit a Pull Request.
- Built with Next.js
- UI components from shadcn/ui
- Animations powered by Framer Motion