Skip to content

πŸŽ“ AI-powered video learning platform - Transform YouTube videos into summaries, key points & interactive quizzes using Google Gemini AI

License

Notifications You must be signed in to change notification settings

shrutisingh1170/learnstream-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ LearnStream AI

Transform YouTube videos into structured learning experiences with AI-powered summaries, key points, and interactive quizzes.

LearnStream AI React Node.js MongoDB Gemini AI

✨ Features

  • πŸŽ₯ 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

πŸ–ΌοΈ Screenshots

Click to view screenshots

Dashboard

alt text

Quiz Interface

alt text

Profile Page

alt text

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account (free tier works)
  • Google Gemini API key
  • Python 3.x (for YouTube transcript extraction)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/learnstream-ai.git
    cd learnstream-ai
  2. Install dependencies

    # Install root dependencies
    npm install
    
    # Install client dependencies
    cd client && npm install
    
    # Install server dependencies
    cd ../server && npm install
  3. 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
  4. Install Python dependency

    pip install youtube-transcript-api
  5. 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
  6. Open the app

πŸ—οΈ Project Structure

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

πŸ”§ Configuration

Environment Variables

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

Getting API Keys

  1. MongoDB Atlas

    • Create account at mongodb.com
    • Create a free cluster
    • Get connection string from "Connect" β†’ "Connect your application"
  2. Google Gemini API

πŸ“¦ Deployment

Deploy Full Stack to Vercel (Recommended)

This project is configured to deploy both frontend and backend to Vercel as a single deployment.

  1. Push your code to GitHub

    git add .
    git commit -m "Ready for deployment"
    git push origin main
  2. Import project in Vercel

    • Go to Vercel
    • Click "New Project"
    • Import your GitHub repository
    • Don't change root directory (leave it as root)
  3. 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
    
  4. Deploy!

    • Vercel will automatically build and deploy
    • Your app will be available at https://your-project.vercel.app

Deploy Frontend & Backend Separately

Frontend (Vercel/Netlify)

  1. Create new project in Railway or Render
  2. Connect your GitHub repository
  3. Set root directory to server
  4. Add environment variables
  5. Deploy!

Docker Deployment

# Build and run with Docker Compose
docker-compose up -d

πŸ› οΈ API Endpoints

Authentication

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/login Login user
GET /api/auth/me Get current user

Videos

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

User

Method Endpoint Description
GET /api/user/profile Get user profile
PUT /api/user/profile Update profile
PUT /api/user/stats Update quiz stats

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“§ Contact

shrutisingh24@gmail.com

Project Link: https://github.com/shrutisingh1170/learnstream-ai


Made with ❀️ for better learning

About

πŸŽ“ AI-powered video learning platform - Transform YouTube videos into summaries, key points & interactive quizzes using Google Gemini AI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages