Transform YouTube videos into interactive courses using AI-powered content analysis and quiz generation.
- Smart Content Analysis: AI-powered video transcript analysis and segmentation
- Interactive Quizzes: Difficulty-based question generation (Easy/Medium/Hard)
- Modern UI: Beautiful React frontend with responsive design
- Real-time Processing: Background task processing with progress tracking
- FastAPI Backend: High-performance Python backend with async support
- Frontend: React 18 + TypeScript + Tailwind CSS
- Backend: FastAPI with async/await support
- AI Integration: OpenRouter.ai for content analysis and quiz generation
- Database: File-based caching (SQLAlchemy ready for production)
- Python 3.8+
- Node.js 16+
- npm 8+
- OpenRouter API Key (for AI content generation)
- Transcript API Key (optional, for reliable transcript extraction)
# Navigate to backend
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .env
# Edit .env and add your OPENROUTER_API_KEY# Navigate to frontend
cd frontend
# Install dependencies
npm installOpenRouter API Key (Required):
- Go to OpenRouter
- Sign up and create an API key
- Add it to
backend/.env:OPENROUTER_API_KEY=your_api_key_here
Transcript API Key (Optional but Recommended):
- Go to TranscriptAPI.com
- Sign up and get an API key
- Add it to
backend/.env:TRANSCRIPT_API_KEY=your_transcript_api_key_here
Note: The transcript API provides more reliable transcript extraction than the free fallback method. It includes professional features like rate limiting, caching, and better error handling.
Terminal 1 - Backend:
cd backend
python main.pyTerminal 2 - Frontend:
cd frontend
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Enter YouTube URL: Paste any YouTube video URL (ensure it has captions)
- Select Difficulty: Choose Easy (3 questions), Medium (4 questions), or Hard (5 questions)
- Generate Course: Click "Generate Course" to start AI processing
- Learn Interactively: Navigate through sections, watch video segments, and complete quizzes
POST /api/course/process-complete- Start complete course generationGET /api/course/status/{task_id}- Check processing statusPOST /api/course/chunks- Generate video chunks onlyPOST /api/course/quiz- Generate quiz for a specific chunk
GET /health- Health checkGET /docs- Interactive API documentation
Test the API with the included test script:
cd backend
python test_api.pyskillvid/
βββ backend/ # FastAPI backend
β βββ app/
β β βββ models/ # Pydantic models
β β βββ routers/ # API endpoints
β β βββ services/ # Business logic
β βββ temp/ # Temporary file storage
β βββ main.py # FastAPI app
β βββ requirements.txt # Python dependencies
β βββ test_api.py # API test script
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # UI components
β β βββ pages/ # Page components
β β βββ services/ # API integration
β β βββ types/ # TypeScript types
β βββ package.json # Node dependencies
βββ docs/ # Documentation
βββ SETUP_GUIDE.md # Detailed setup guide
- User enters YouTube URL on frontend
- Frontend sends request to FastAPI backend
- Backend extracts transcript using:
- Primary: Professional TranscriptAPI.com service (if API key provided)
- Fallback: youtube-transcript-api library
- OpenRouter AI analyzes content and creates logical sections
- OpenRouter generates quiz questions for each section
- Results cached in temp files (or database in production)
- Frontend displays interactive learning interface
# Install production server
pip install gunicorn
# Run with gunicorn
gunicorn main:app -w 4 -k uvicorn.workers.UnicornWorker --bind 0.0.0.0:8000# Build for production
npm run build
# Serve static files
npm run previewBackend:
- Add endpoints in
app/routers/ - Implement business logic in
app/services/ - Define data models in
app/models/schemas.py
Frontend:
- Create components in
src/components/ - Add pages in
src/pages/ - Update API service in
src/services/api.ts
# Required
OPENROUTER_API_KEY=your_api_key_here
# Optional (but recommended for better reliability)
TRANSCRIPT_API_KEY=your_transcript_api_key_here
# Optional
ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
HOST=0.0.0.0
PORT=8000- Backend won't start: Check Python version and virtual environment
- API key errors: Verify OPENROUTER_API_KEY in
.envfile - Transcript errors:
- If using TranscriptAPI: Check TRANSCRIPT_API_KEY and credits
- If using fallback: Ensure YouTube video has captions enabled
- Frontend connection issues: Verify backend is running on port 8000
# Backend with debug logging
uvicorn main:app --reload --log-level debug
# Frontend with network inspection
npm run dev
# Check browser dev tools for API requests- Detailed Setup Guide
- Frontend README
- API Documentation (when running)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is for educational and demonstration purposes.
- TranscriptAPI.com for professional transcript extraction
- OpenRouter for AI model access
- FastAPI for the backend framework
- React for the frontend framework
- YouTube Transcript API for fallback transcript extraction