The Powerful Backend Engine for YouClipper
Clip Processing • Queue Management • API Services
This is the backend service that powers YouClipper - handling video processing, queue management, and API services for seamless YouTube video clipping.
Before you begin, ensure you have:
- 🧰 Node.js (v16+) and npm
- 🧠 Redis Server (running)
- 📺 YouTube API Key
- 🗄️ MongoDB Connection
-
Clone this repository:
git clone https://github.com/Abhijit-Jha/you-clipper-backend cd you-clipper-backend -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
You can find the
.env.examplefile here. Update the values in.envwith your actual credentials and configuration. -
Start the server:
npm run start-server
✅ Backend running at: http://localhost:3001
Cloud Options:
- Railway - Quick Redis deployment
- Upstash - Serverless Redis
- AWS ElastiCache - Enterprise Redis
Local Setup:
# Using Docker
docker run --name youclipper-redis -d -p 6379:6379 redis
# Or install Redis locally
# macOS: brew install redis
# Ubuntu: sudo apt install redis-server- Go to Google Cloud Console
- Create/select a project
- Enable YouTube Data API v3
- Create API credentials
- Copy your API key
MongoDB Atlas (Recommended):
- Visit MongoDB Atlas
- Create free cluster
- Get connection string
Local MongoDB:
# Using Docker
docker run --name youclipper-mongo -d -p 27017:27017 mongoOnce running, your backend will serve these endpoints:
POST /api/video/startDownload
Content-Type: application/json
{
"youtubeURL": "https://www.youtube.com/watch?v=VIDEO_ID"
}Response: { "jobId": "unique-job-id" }
GET /api/video/downloadStatus/:jobIdResponse: { "id": "job-id", "state": "waiting|active|completed|failed", "progress": {...} }
GET /api/video/combineStatus/:jobId
- :jobId — The ID of the download jobResponse: { "id": "job-id", "state": "waiting|active|completed|failed", "progress": {...} }
POST /api/video/trim?startTime=00:00:10&endTime=00:01:30
Content-Type: application/json
{
"videoId": "video-identifier",
"combinedVideoPath": "/path/to/combined/video.mp4"
}Response: { "jobId": "trim-job-id" }
GET /api/video/trimStatus/:jobIdResponse: { "id": "job-id", "state": "waiting|active|completed|failed", "progress": {...} }
POST /api/video/quality?resolution=720p&aspectRatio=reels
Content-Type: application/json
{
"trimmedVideoPath": "/path/to/trimmed/video.mp4",
"videoId": "video-identifier"
}Response: { "jobId": "quality-job-id", "status": "queued" }
GET /api/video/qualityJobStatus/:jobIdResponse: { "id": "job-id", "state": "waiting|active|completed|failed", "progress": {...} }
POST /api/queue/status/:jobId
Content-Type: application/json
{
"qualityJobId": "quality-job-id" // optional
}Response:
{
"currentWaitingJobs": 3,
"statusOfYourJob": "active|waiting|completed|failed",
"qualityJobStatus": "waiting|active|completed|failed" // if qualityJobId provided
}GET /api/video/test
GET /api/queue/testResponse: { "user": {...} }
- 🎥 Video Processing: yt-dlp, FFmpeg
- ⚡ Queue System: BullMQ + Redis
- 🔧 Server: Node.js + Express
- 🗄️ Database: MongoDB
- ✅ Redis must be running before starting the server
- 🔒 Never commit secrets - use environment variables
- 🌐 CORS is configured for frontend communication
- 🔄 Queue processing handles video operations asynchronously
This backend works with the YouClipper frontend. For COMPLETE SELF-HOSTING of the entire YouClipper platform:
📖 Follow the Complete Setup Guide
The main repository contains:
- ✅ Complete setup instructions
- ✅ Frontend setup steps
- ✅ Service configuration guides
- ✅ Production deployment tips
Check .env.example for all available configuration options.
We love contributions!
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.