Skip to content

AyushChoudhary6/Scriptify

Repository files navigation

Scriptify: AI-Powered YouTube Video Summarizer

πŸŽ₯ Transform YouTube videos into intelligent, comprehensive summaries using advanced AI models.

Scriptify is a modern web application that generates detailed, structured summaries from YouTube videos using cutting-edge AI technology. Built with a robust DevOps pipeline featuring Docker containerization and Kubernetes orchestration.

✨ Features

  • πŸ€– AI-Powered Summarization: Advanced natural language processing for intelligent video summaries
  • πŸ“Š Multiple Summary Types: Comprehensive, Brief, Bullet Points, and Academic formats
  • ⏱️ Automatic Timestamps: Generated timestamps for key moments in videos
  • 🎯 Key Highlights: AI-extracted important points and insights
  • πŸ“± Modern React Frontend: Built with Vite for fast, responsive user experience
  • πŸš€ FastAPI Backend: High-performance Python backend with async support
  • 🐳 Docker Containerization: Consistent deployment across environments
  • βš™οΈ Kubernetes Orchestration: Production-ready container management
  • πŸ“ˆ Auto-scaling: Horizontal Pod Autoscaler (HPA) for traffic management
  • πŸ” Secure Secrets Management: Kubernetes secrets for API key protection
  • πŸ”„ GitLab CI/CD Pipeline: Automated build, test, and deployment

πŸ—οΈ Architecture

Hybrid Docker + Kubernetes Approach

  • πŸ”§ Docker: Container image building and development
  • ☸️ Kubernetes: Production deployment and orchestration
  • 🌐 Frontend: React + Vite + Nginx (containerized)
  • ⚑ Backend: FastAPI + Python (containerized)
  • πŸ”€ Ingress: Traffic routing and load balancing
  • πŸ“Š HPA: Automatic scaling based on resource usage
  • πŸ” Secrets: Secure API key management

CI/CD Pipeline Flow

Git Push β†’ GitLab CI β†’ Single Build Job β†’ Test β†’ Kubernetes Deploy β†’ Live App
    ↓           ↓            ↓            ↓          ↓              ↓
  Code      Sequential   Backend+Frontend  Image    K8s Manifests   Auto Port
 Changes    Execution      Images Built   Verify     Applied       Forwarding

πŸš€ Quick Start Guide

Option 1: Automatic Deployment (Recommended)

Use the GitLab CI/CD pipeline for automatic deployment:

  1. Clone the Repository
git clone https://github.com/AyushChoudhary6/Scriptify.git
cd Scriptify
  1. Setup GitLab Runner
# Start GitLab runner with Docker
docker compose -f gitlab-runner-docker-compose.yml up -d

# Register runner with your GitLab project
docker exec -it gitlab-runner gitlab-runner register \
  --url https://gitlab.com \
  --registration-token YOUR_TOKEN_HERE \
  --executor docker \
  --docker-image alpine:latest \
  --description "Local Docker Runner" \
  --tag-list "local" \
  --docker-privileged=true \
  --docker-volumes /var/run/docker.sock:/var/run/docker.sock
  1. Configure API Keys Update your Kubernetes secrets file with your API keys:
# Edit k8s/secrets.yml with your actual API keys
kubectl apply -f k8s/secrets.yml
  1. Deploy via Pipeline
git add .
git commit -m "Deploy Scriptify"
git push origin main

The pipeline will automatically:

  • πŸ”§ Build backend and frontend Docker images in sequence
  • πŸ§ͺ Run comprehensive image verification tests
  • πŸš€ Deploy complete application to Kubernetes
  • 🌐 Set up automatic port forwarding
  • βœ… Make app accessible at localhost:3000

Option 2: Manual Deployment

Local Development with Docker

# Build images
docker build -t scriptify-backend:latest ./backend
docker build -t scriptify-frontend:latest ./frontend

# Run with Docker Compose
docker compose up -d

# Access at:
# Frontend: http://localhost:3000
# Backend: http://localhost:8000

Kubernetes Deployment

# Build Docker images
docker build -t scriptify-backend:latest ./backend
docker build -t scriptify-frontend:latest ./frontend

# Apply Kubernetes manifests
kubectl apply -f k8s/

# Port forward to access locally
kubectl port-forward service/frontend-service 3000:80
kubectl port-forward service/backend-service 8000:8000

πŸ”§ DevOps Pipeline Details

GitLab CI/CD Stages

  1. πŸ”§ Build: Complete application build (Backend + Frontend in sequence)
  2. πŸ§ͺ Test: Validation of built images and application health
  3. πŸš€ Deploy: Kubernetes deployment with automatic port forwarding

Single Pipeline Approach

  • βœ… Sequential Execution: Build β†’ Test β†’ Deploy (one after another)
  • βœ… Single Job per Stage: No parallel executions, clean pipeline flow
  • βœ… Local GitLab Runner: Custom runner with "local" tag
  • βœ… Dependency Management: Each stage waits for the previous to complete
  • βœ… Kubernetes Integration: Complete k8s manifest application
  • βœ… Auto Port Forwarding: Immediate localhost access after deployment

The pipeline will automatically:

  • πŸ”§ Build backend and frontend Docker images sequentially
  • πŸ§ͺ Run comprehensive tests on built images
  • πŸš€ Deploy to Kubernetes with all components
  • 🌐 Set up automatic port forwarding
  • βœ… Make app accessible at localhost:3000

Kubernetes Components Applied

  • πŸ“¦ Deployments: backend-deployment.yml, frontend-deployment.yml
  • 🌐 Services: backend-service.yml, frontend-service.yml
  • πŸ” Secrets: secrets.yml (API keys management)
  • πŸ”€ Ingress: ingress.yml (traffic routing)
  • πŸ“ˆ HPA: hpa.yml (horizontal pod autoscaling)

πŸ› οΈ Technology Stack

Frontend

  • βš›οΈ React 18: Modern component-based UI
  • ⚑ Vite: Fast build tool and dev server
  • 🎨 CSS3: Custom styling with gradients and animations
  • 🐳 Nginx: Production web server in container

Backend

  • 🐍 FastAPI: High-performance async Python framework
  • πŸ€– AI Integration: AssemblyAI + Gemini APIs
  • πŸ“¦ Uvicorn: ASGI server for production
  • 🐳 Docker: Containerized deployment

DevOps & Infrastructure

  • 🐳 Docker: Container runtime and image building
  • ☸️ Kubernetes: Container orchestration platform
  • πŸ”„ GitLab CI/CD: Automated pipeline with local runner
  • πŸ“Š HPA: Kubernetes Horizontal Pod Autoscaler
  • πŸ” Secrets Management: Kubernetes native secret storage

Monitoring & Scaling

  • πŸ“ˆ Resource Monitoring: CPU/Memory usage tracking
  • πŸ”„ Auto-scaling: Dynamic pod scaling based on load
  • πŸ” Health Checks: Liveness and readiness probes
  • πŸ“Š Deployment Status: Real-time pod and service monitoring

πŸ“‹ Prerequisites

  • 🐳 Docker & Docker Compose: Container runtime
  • ☸️ Kubernetes Cluster: Local (kind, minikube) or cloud cluster
  • πŸ”„ GitLab Runner: For CI/CD pipeline execution
  • πŸ”‘ API Keys: AssemblyAI and Gemini API access

Usage

  1. Access the Application: http://localhost:3000
  2. Paste YouTube URL: Any valid YouTube video link
  3. Select Summary Type: Choose from 4 AI summary formats
  4. Get AI Summary: Receive intelligent video summary with timestamps

πŸ“Š Application URLs

After successful deployment:

Contributing

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

πŸ“„ License

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

Built with ❀️ by Ayush Choudhary | Showcasing DevOps Excellence with Docker + Kubernetes

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors