Skip to content
mifdlaldevPublic

About

Extract direct video sources from video hosting sites. A Playwright-powered video stream extractor with Express API and React frontend.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Conduit Logo

Conduit

Extract direct video sources from popular hosting platforms.

Live Demo Codespaces License

TypeScript React Vite Express Tailwind Playwright Tests


Conduit Screenshot


Try It Now

βœ… Works on Live Demo

# Click the link below β€” no installation needed
https://conduit-iota-rust.vercel.app

Paste this test URL into the input field:

https://videy.co/v?id=o8KUmW4

πŸ”§ Full Extraction (All Providers)

Method Providers Cost Setup Time
GitHub Codespaces βœ… All 4 providers Free (60h/month) 1 click
Docker βœ… All 4 providers Free (forever) ~2 minutes
Local CLI βœ… All 4 providers Free (forever) ~3 minutes

Features

  • Multi-provider β€” Supports videqs.download, playvvip.top, fwh.is, and videy.co
  • Direct resolution β€” videy.co URLs resolved instantly (no browser needed)
  • Smart detection β€” Playwright headless Chrome intercepts network traffic and scans DOM for media sources
  • Heuristic scoring β€” 15+ rules to select the best media candidate while filtering ads and trackers
  • Proxy download β€” Streams media with proper headers and range request support
  • Production-grade security β€” Helmet, CORS, rate limiting, Zod input validation, structured error handling
  • 99 tests β€” Unit + integration, 90%+ line coverage
  • Docker ready β€” One-command setup with docker compose up

Tech Stack

Layer Technology
Frontend React 19, Vite 8, Tailwind CSS 3, shadcn/ui, Lucide icons
Backend Express 5, TypeScript (strict), Playwright 1.42, Zod 4, Pino
Testing Vitest, Supertest, V8 coverage
CI/CD GitHub Actions, Vercel
DevOps Docker Compose, Husky, lint-staged

Why This Architecture?

The Core Problem

This project uses Playwright (headless Chromium) to extract video streams. Chromium is a ~300MB binary needing 1-2GB of RAM. Most free hosting platforms cannot run it:

Platform Free Tier Playwright-Compatible Hidden Cost
Vercel βœ… Free, no CC ❌ 10s timeout, no persistent processes β€”
Netlify βœ… Free, no CC ❌ No headless browser support β€”
Render βœ… 750h/month βœ… Runs Docker 512MB RAM limit, $5/month if exceeded
Fly.io βœ… 3 shared VMs βœ… Runs Docker Requires credit card
Railway ❌ $5 credit then pay βœ… Runs Docker Requires credit card

The Solution: Hybrid Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Vercel (Free, No CC)         β”‚
β”‚                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Frontend (React SPA)        β”‚    β”‚  Always UP
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Serverless API              β”‚    β”‚  videy.co direct resolve
β”‚  β”‚  /api/v1/extract             β”‚    β”‚  (no Playwright needed)
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ (non-videy providers)
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  GitHub Codespaces / Local (Free)    β”‚
β”‚                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Full Backend + Playwright   β”‚    β”‚  All 4 providers
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Engineering Rationale

  1. Pragmatism β€” The live demo showcases the product and the videy.co flow. Full functionality is one click away in Codespaces.
  2. Zero cost guarantee β€” No credit card required at any layer. No surprise bills.
  3. Always accessible β€” The Vercel frontend is up 24/7. Only Playwright-dependent providers need the full backend.
  4. Transparent β€” Users know upfront which providers work on the demo.

Quick Start

Option 1: GitHub Codespaces (1 Click)

Open in Codespaces

Click the badge above. Codespaces auto-installs everything including Playwright Chromium. 60 hours/month free, no credit card.

Option 2: Local Development

# Prerequisites: Node.js >= 22, npm >= 10
git clone https://github.com/mifdlaldev/conduit.git
cd conduit

# Backend
cd backend
npm install
npm run playwright:install  # Installs Chromium
npm run dev                  # β†’ localhost:3001

# Frontend (new terminal)
cd ../frontend
npm install
npm run dev                  # β†’ localhost:5173

Option 3: Docker

docker compose up

Quick Test

Test the Live API

# videy.co β€” should return 200 with direct download URL
curl -X POST https://conduit-iota-rust.vercel.app/api/v1/extract \
  -H "Content-Type: application/json" \
  -d '{"url":"https://videy.co/v?id=o8KUmW4"}'

# Non-videy provider β€” should return 501 with setup instructions
curl -X POST https://conduit-iota-rust.vercel.app/api/v1/extract \
  -H "Content-Type: application/json" \
  -d '{"url":"https://videqs.download/test"}'

Test Locally (Full Backend)

cd backend
npm test            # 99 tests
npm run test:coverage  # 90%+ coverage

API Reference

POST /api/v1/extract

Extract a video URL from a supported provider.

Request:

{ "url": "https://videqs.download/abc123" }

Success (200):

{
  "meta": { "status": 200, "message": "Success" },
  "data": {
    "title": "Video Title",
    "downloadUrl": "https://cdn.provider.com/video.mp4",
    "provider": "videqs",
    "deliveryMethod": "proxy",
    "proxyDownloadUrl": "/api/v1/extract/download?source=..."
  }
}
Status Meaning
200 Video extracted successfully
400 Invalid URL or unsupported domain
404 No media stream found
429 Rate limited (5 req/min)
501 Provider needs full backend (Playwright)
503 Playwright browser not installed

GET /api/v1/extract/download

Proxy download a media stream.

Param Required Description
source βœ… Direct media URL from extraction
headers βœ… Base64url-encoded JSON of request headers
filename ❌ Custom filename

Supports range requests for resumable downloads.


Project Structure

conduit/
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ api/v1/extract.ts       # Serverless function (videy.co resolve)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.tsx              # Main UI with dark theme + glassmorphism
β”‚   β”‚   β”œβ”€β”€ components/ui/       # shadcn/ui components
β”‚   β”‚   └── lib/utils.ts         # cn() utility
β”‚   β”œβ”€β”€ vercel.json              # Vercel config
β”‚   └── package.json
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.ts             # Express app entry
β”‚   β”‚   β”œβ”€β”€ config.ts            # Zod-validated environment
β”‚   β”‚   β”œβ”€β”€ logger.ts            # Pino structured logger
β”‚   β”‚   └── extractor/
β”‚   β”‚       β”œβ”€β”€ errors.ts        # Custom error classes
β”‚   β”‚       β”œβ”€β”€ helpers.ts       # 17 pure utility functions
β”‚   β”‚       β”œβ”€β”€ schemas.ts       # Input validation
β”‚   β”‚       β”œβ”€β”€ browser.ts       # Playwright lifecycle
β”‚   β”‚       β”œβ”€β”€ routes.ts        # Route handlers
β”‚   β”‚       └── providers/
β”‚   β”‚           └── videy.ts     # Videy direct resolver
β”‚   └── src/__tests__/           # 99 tests (Vitest)
└── .github/workflows/ci.yml     # CI pipeline

Testing

cd backend
npm test             # 99 tests, all passing
npm run test:coverage  # 90%+ line coverage
Metric Coverage
Statements 90.01%
Branches 86.06%
Functions 92.30%
Lines 90.01%

Environment Variables

Variable Default Description
PORT 3001 Backend server port
NODE_ENV development development, production, or test
ALLOWED_ORIGINS * Comma-separated CORS origins
LOG_LEVEL info Pino log level
VITE_BACKEND_URL http://localhost:3001 Frontend β†’ backend proxy

Changelog

See CHANGELOG.md.

License

MIT


Built with TypeScript, React, Express, and Playwright.
Designed for zero-cost, no-CC deployment.

About

Extract direct video sources from video hosting sites. A Playwright-powered video stream extractor with Express API and React frontend.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages