Skip to content

Sayan-995/vidquizgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vid-Quiz-Gen

A backend system that recommends LeetCode problems based on YouTube DSA tutorial content using semantic similarity matching.

Overview

Vid-Quiz-Gen extracts transcripts from YouTube DSA tutorials, processes them using AI-powered summarization, and matches them against a database of LeetCode problems using vector embeddings to suggest relevant practice problems.

Features

  • Transcript Extraction: Scrapes YouTube video captions using Colly
  • AI Summarization: Summarizes transcripts using Gemini 2.0 Flash
  • Semantic Search: Generates 768D embeddings with Gemini API and queries using pgvector
  • Problem Matching: Recommends top LeetCode problems based on video content
  • gRPC Service: Python microservice for scraping LeetCode problem statements

Tech Stack

  • Backend: Golang, Python
  • Database: PostgreSQL with pgvector extension
  • AI/ML: Gemini API (text-embedding-004, gemini-2.0-flash)
  • Communication: gRPC, Protocol Buffers
  • Web Scraping: Colly (Go), leetscrape (Python)

Setup

Prerequisites

  • Go 1.21+
  • Python 3.9+
  • PostgreSQL with pgvector extension
  • Gemini API key

Installation

  1. Clone the repository
git clone https://github.com/Sayan-995/vidquizgen.git
cd vidquizgen
  1. Install Go dependencies
go mod download
  1. Install Python dependencies
cd lcscrape
pip install -r requirements.txt
  1. Set environment variables
export GEMINI_API_KEY=your_api_key
export DATABASE_URL=your_postgres_connection_string
  1. Run the services
# Start Python gRPC server
cd lcscrape && python lcscrape.py

# Start Go backend (in another terminal)
go run main.go

API

POST /api/quiz

Generate LeetCode problem recommendations from a YouTube video.

Request:

{
  "url": "https://www.youtube.com/watch?v=VIDEO_ID"
}

Response:

{
  "questions": [
    {
      "title": "Two Sum",
      "url": "https://leetcode.com/problems/two-sum"
    }
  ]
}

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published