A modern sleep tracking web application built with Next.js 15, featuring real-time analytics, personalized insights, and comprehensive sleep data visualization.
- Sleep Duration Tracking: Record and monitor your daily sleep hours
- Visual Charts: Beautiful data visualizations using Chart.js
- Best & Worst Sleep Analysis: Track your sleep patterns and extremes
- Average Sleep Calculation: Get insights into your sleep habits
- Sleep Record Management: Add, edit, and delete sleep entries with ease
- Creating Sleep Goal: User can set sleep goal and check the status
- Real-time Statistics: Comprehensive sleep analytics dashboard
- Sleep History: Complete sleep record history with search and filter
- Date-based Tracking: Track sleep patterns over time
-
Clone the repository
git clone https://github.com/sahandghavidel/sleep-tracker-next.git cd sleep-tracker-next
-
Install dependencies
npm install # or yarn install # or pnpm install
-
Set up environment variables Create a
.env
file in the root directory:# Database DATABASE_URL="your-neon-database-url" # Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="your-clerk-publishable-key" CLERK_SECRET_KEY="your-clerk-secret-key" NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in" NEXT_PUBLIC_CLERK_SIGN_UP_URL="/sign-up" NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL="/" NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL="/" # App URL NEXT_PUBLIC_APP_URL="http://localhost:3000"
-
Set up the database
npx prisma generate npx prisma db push
-
Run the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser Navigate to http://localhost:3000