A distraction-free, YouTube-powered study platform for deep learning and habit-building
Features β’ Demo β’ Getting Started β’ Tech Stack β’ Contributing
- πΊ Import YouTube Playlists - Transform any public YouTube playlist into a structured study course
- β Smart Progress Tracking - Videos auto-complete at 30% watch time with real-time streak updates
- π₯ GitHub-Style Streaks - Visual heatmap to track your daily learning consistency
- π Notes & Bookmarks - Take notes and bookmark important videos for later review
- π― Dashboard Analytics - Track watched videos, active streaks, and course completion
- β‘ Real-time Updates - All stats update instantly without page refresh
- π Dark Mode - Pure black theme for comfortable studying
- π Secure Authentication - Google OAuth powered by Clerk
- π± Fully Responsive - Mobile-friendly with collapsible sidebar navigation
- β¨οΈ Keyboard Shortcuts - Fast navigation with hotkeys (C, B, N, P, L)
Coming soon!
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Icons: Lucide React
- API: Next.js API Routes (Server Actions)
- Database: Neon (Serverless PostgreSQL)
- Authentication: Clerk
- External API: YouTube Data API v3
- Hosting: Vercel
- Database: Neon Cloud
git clone <your-repo>
cd learnsy
npm install- Create a Neon project at neon.tech
- Copy the connection string from your Neon dashboard
- Run the database schema:
- Go to Neon SQL Editor
- Copy and run the contents of
/database/schema.sql
- Create a Clerk application at clerk.com
- Enable Google OAuth in Social Connections
- Copy your API keys from the Clerk dashboard
- Go to Google Cloud Console β APIs & Services
- Enable YouTube Data API v3
- Create API Key
Create a .env.local file in the project root:
# Database (Neon)
DATABASE_URL=postgres://user:password@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxxxxxxxxxxxxxxxxxx
CLERK_SECRET_KEY=sk_test_xxxxxxxxxxxxxxxxxxxxx
# YouTube API
YOUTUBE_API_KEY=AIzaSyxxxxxxxxxxxxxxxxxxxxxSee .env.example for a full template.
npm run devVisit http://localhost:3000 to see your app!
The app uses the following main tables:
- courses - Imported YouTube playlists
- videos - Individual videos from playlists
- user_progress - User's progress, notes, and bookmarks
- streak_activity - Daily learning activity tracking
- video_timestamps - Resume playback functionality
All tables have Row Level Security (RLS) enabled for data protection.
- Connect your repository to Netlify
- Set environment variables in Netlify dashboard:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key YOUTUBE_API_KEY=your_youtube_api_key - Deploy - Netlify will automatically build and deploy your app
After deployment, update your Supabase project:
- Go to Authentication β URL Configuration
- Add your production URL to Site URL and Redirect URLs:
- Site URL:
https://your-app.netlify.app - Redirect URLs:
https://your-app.netlify.app/auth/callback
- Site URL:
/app
βββ (dashboard)/ # Protected dashboard routes
β βββ dashboard/ # Main dashboard
β βββ courses/ # Course management
β βββ study/[id]/[vid]/ # Video study interface
β βββ bookmarks/ # Saved bookmarks
β βββ notes/ # User notes
βββ actions/ # Server actions
βββ globals.css # Global styles
/components
βββ ui/ # Reusable UI components
βββ auth-provider.tsx # Authentication context
βββ youtube-player.tsx # Video player component
βββ ... # Other components
/lib
βββ supabase.ts # Supabase client
βββ database.ts # Database service layer
βββ youtube-server.ts # YouTube API functions
/supabase
βββ migrations/ # Database migrations
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Your Supabase project URL | β |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Your Supabase anonymous key | β |
YOUTUBE_API_KEY |
YouTube Data API v3 key | β |
- Playlist Limit: Users can import up to 4 playlists (configurable in
app/actions/youtube.ts) - Auto-complete: Videos auto-complete at 90% progress
- Resume Playback: Videos resume from last watched position
- Streak Tracking: Daily activity tracking with visual calendar
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For detailed deployment instructions to production, see DEPLOYMENT.md
Quick deploy:
- Set up Neon database and run schema
- Configure Clerk authentication
- Connect GitHub repo to Vercel
- Add environment variables in Vercel
- Deploy!
Recommended stack: Neon + Clerk + Vercel (all have generous free tiers)
MIT License - see LICENSE file for details
Made with β€οΈ by Alok Tripathi
- GitHub: @aloktripathi1
If you encounter any issues:
- Check the Issues page
- Create a new issue with detailed information
- Include error messages and steps to reproduce
- Video speed controls
- Offline mode support
- Course sharing
- Advanced analytics
- Mobile app
- AI-powered study recommendations