Convert YouTube educational lectures into HUMAN-STYLE student notes.
- β Downloads only first 10 minutes of content
- β Extracts maximum 8 frames using scene detection
- β Sequential AI calls (no parallel requests)
- β Automatic retries with exponential backoff
- β Rate limiting (max 3 concurrent jobs)
- β Auto-cleanup of old jobs (1 hour expiry)
- β Background job processing (no timeouts)
- β Real-time progress tracking
- β Graceful degradation (continues without diagrams/frames if they fail)
- β Comprehensive error handling with user-friendly messages
- β Fallback notes structure if AI fails
- β Automatic resource cleanup
- Node.js (v18 or higher) - Download
- Groq API Key (FREE) - Get one here
Note: FFmpeg and yt-dlp are included automatically via npm packages!
npm installCreate a .env file in the root directory:
PORT=5000
GROQ_API_KEY=your_groq_api_key_here
npm startOpen your browser to: http://localhost:5000
User submits URL
β
Job created (returns immediately)
β
Background Processing:
1. Download first 10min audio + video (360p)
2. Transcribe audio (Whisper-v3)
3. Analyze up to 3 frames (Vision AI)
4. Generate notes (Llama-3.3-70b)
5. Create diagrams (Mermaid β SVG)
6. Render PDF (Puppeteer)
β
User downloads PDF
β
Auto-cleanup after 10s
POST /api/generate-notes- Start job (returns jobId)GET /api/status/:jobId- Check progressGET /api/download/:jobId- Download PDFGET /health- Server health check
- No audio detected β Returns transcript-only notes
- Frame extraction fails β Continues with audio analysis
- Diagram generation fails β Skips diagrams, continues PDF
- AI timeout β Automatic retry (3 attempts)
- PDF generation fails β Clear error message to user
- Maximum 3 concurrent jobs
- Jobs expire after 1 hour
- Auto-cleanup every 15 minutes
- Whisper: 30 requests/min
- Vision: 30 requests/min
- LLM: 30 requests/min
- Sequential processing (never parallel)
- 1 second delay between frame analyses
- Exponential backoff on retries
- Maximum 3 frames analyzed per video
- Maximum 3 diagrams generated
- Cause: Temporary network issue with Groq API
- Solution: The app automatically retries 3 times. If it persists, wait 1 minute and try again.
- Cause: 3+ jobs already running (free-tier protection)
- Solution: Wait 1-2 minutes for current jobs to complete.
- Cause: Job expired (>1 hour old)
- Solution: Submit a new request.
- Cause: Browser popup blocker
- Solution: Allow popups for localhost:5000
topnotesai/
βββ frontend/
β βββ index.html # UI
β βββ app.js # Job submission & polling
β βββ assets/
βββ backend/
β βββ server.js # Express server
β βββ routes/
β β βββ notes.js # Job orchestration
β βββ services/
β β βββ videoProcessor.js # yt-dlp + FFmpeg
β β βββ aiAnalyzer.js # Groq API (sequential)
β β βββ diagramGenerator.js # Mermaid CLI
β β βββ pdfGenerator.js # Puppeteer
β βββ templates/
β β βββ notes-template.html # PDF layout
β βββ temp/ # Auto-cleaned
βββ package.json
βββ .env
βββ README.md
- Active recall headings (question format)
- Marginalia with "Aha!" moments
- Emphasis markers (underline, circle, bold)
- Cheat sheet with key formulas
- Golden rule summary
- SVG diagrams (crisp at any zoom level)
- 2-column PDF layout
- Google Fonts (Inter + Caveat)
- Glassmorphism UI
- Real-time progress updates
npm run devPORT=5000 # Server port
GROQ_API_KEY=gsk_xxx # Your Groq API key
NODE_ENV=production # Optional
- Backend: Render, Railway, Fly.io
- Frontend: Vercel, Netlify
- Set environment variables on your hosting platform
- Ensure
NODE_ENV=production - Free-tier servers may sleep after inactivity (first request slower)
MIT License - Feel free to use and modify!
- Groq for free-tier AI APIs
- yt-dlp for YouTube downloading
- FFmpeg for video processing
- Mermaid.js for diagram generation
- Puppeteer for PDF rendering
Made with β€οΈ for students who want better notes