Transform YouTube videos into structured learning experiences with AI-powered summaries, key points, and interactive quizzes.
- π₯ YouTube Video Processing - Paste any YouTube URL and extract learning content
- π AI-Generated Summaries - Comprehensive summaries of video content
- π‘ Key Learning Points - Extracted main concepts and takeaways
- π― Interactive Quizzes - 10-question quizzes to test your understanding
- π Learning History - Track all your processed videos
- π€ User Profiles - Personal dashboard with learning statistics
- π Dark Mode - Beautiful light and dark themes
- π¨ Modern UI - Glassmorphism design with animated backgrounds
- Node.js 18+
- MongoDB Atlas account (free tier works)
- Google Gemini API key
- Python 3.x (for YouTube transcript extraction)
-
Clone the repository
git clone https://github.com/yourusername/learnstream-ai.git cd learnstream-ai -
Install dependencies
# Install root dependencies npm install # Install client dependencies cd client && npm install # Install server dependencies cd ../server && npm install
-
Set up environment variables
Server (.env)
PORT=3001 NODE_ENV=development MONGODB_URI=mongodb+srv://your-connection-string JWT_SECRET=your-super-secret-jwt-key-here GEMINI_API_KEY=your-gemini-api-key CLIENT_URL=http://localhost:5173
Client (.env)
VITE_API_URL=http://localhost:3001/api
-
Install Python dependency
pip install youtube-transcript-api
-
Start the development servers
# From root directory npm run dev # Or start separately: # Terminal 1 - Server cd server && npm run dev # Terminal 2 - Client cd client && npm run dev
-
Open the app
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001/api
learnstream-ai/
βββ client/ # React frontend (Vite)
β βββ src/
β β βββ app/
β β β βββ components/ # React components
β β β βββ context/ # React contexts (Auth, App)
β β βββ styles/ # CSS styles
β β βββ main.jsx # Entry point
β βββ package.json
β βββ vite.config.js
β
βββ server/ # Express.js backend
β βββ src/
β β βββ controllers/ # Route controllers
β β βββ middleware/ # Auth middleware
β β βββ models/ # MongoDB models
β β βββ routes/ # API routes
β β βββ services/ # AI & YouTube services
β β βββ app.js # Express app
β βββ package.json
β βββ .env.example
β
βββ package.json # Root package.json
βββ README.md
| Variable | Description | Required |
|---|---|---|
PORT |
Server port (default: 3001) | No |
NODE_ENV |
Environment (development/production) | No |
MONGODB_URI |
MongoDB connection string | Yes |
JWT_SECRET |
Secret for JWT tokens | Yes |
GEMINI_API_KEY |
Google Gemini API key | Yes |
CLIENT_URL |
Frontend URL for CORS | Yes |
VITE_API_URL |
Backend API URL (client) | Yes |
-
MongoDB Atlas
- Create account at mongodb.com
- Create a free cluster
- Get connection string from "Connect" β "Connect your application"
-
Google Gemini API
- Go to Google AI Studio
- Create a new API key
- Use the
gemini-2.0-flashmodel
This project is configured to deploy both frontend and backend to Vercel as a single deployment.
-
Push your code to GitHub
git add . git commit -m "Ready for deployment" git push origin main
-
Import project in Vercel
- Go to Vercel
- Click "New Project"
- Import your GitHub repository
- Don't change root directory (leave it as root)
-
Add Environment Variables In Vercel project settings β Environment Variables:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/learnstream JWT_SECRET=your-super-secret-jwt-key GEMINI_API_KEY=your-gemini-api-key -
Deploy!
- Vercel will automatically build and deploy
- Your app will be available at
https://your-project.vercel.app
- Create new project in Railway or Render
- Connect your GitHub repository
- Set root directory to
server - Add environment variables
- Deploy!
# Build and run with Docker Compose
docker-compose up -d| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login user |
| GET | /api/auth/me |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/videos/process |
Process YouTube video |
| GET | /api/videos/history |
Get user's video history |
| GET | /api/videos/:id |
Get specific video |
| DELETE | /api/videos/:id |
Delete video |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/user/profile |
Get user profile |
| PUT | /api/user/profile |
Update profile |
| PUT | /api/user/stats |
Update quiz stats |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for AI content generation
- YouTube Transcript API for caption extraction
- Tailwind CSS for styling
- Lucide Icons for beautiful icons
Project Link: https://github.com/shrutisingh1170/learnstream-ai
Made with β€οΈ for better learning


