Working link : reels-downloader
A full-stack MERN web application to download YouTube Shorts and Instagram Reels as MP4 video or MP3 audio, with thumbnail preview, dynamic quality selection, and download analytics.
Made by OM
reels-downloader/
βββ backend/ # Node.js + Express API
β βββ models/
β β βββ DownloadLog.js # MongoDB schema for download logs
β βββ routes/
β β βββ info.js # POST /api/info β fetch video metadata
β β βββ download.js # POST /api/download β stream file
β β βββ analytics.js # GET /api/analytics β stats & logs
β βββ utils/
β β βββ validateUrl.js # URL safety validator
β β βββ ytdlp.js # yt-dlp wrapper
β βββ .env.example
β βββ package.json
β βββ server.js # App entry point
β
βββ frontend/ # React + Vite + Tailwind
β βββ src/
β β βββ components/
β β β βββ DownloaderCard.jsx # Main UI card
β β β βββ VideoPreview.jsx # Thumbnail + meta display
β β β βββ SkeletonPreview.jsx # Loading skeleton
β β β βββ ProgressBar.jsx # Download progress
β β βββ hooks/
β β β βββ useVideoInfo.js # Info fetch hook
β β β βββ useDownload.js # Download trigger hook
β β βββ utils/
β β β βββ api.js # Axios instance
β β βββ App.jsx
β β βββ main.jsx
β β βββ index.css
β βββ .env.example
β βββ index.html # SEO meta tags
β βββ tailwind.config.js
β βββ vite.config.js
β βββ package.json
β
βββ .gitignore
βββ package.json # Root scripts for running both
βββ README.md
Make sure these are installed:
- Node.js v18+
- MongoDB (local or Atlas URI)
- yt-dlp β Install guide
- ffmpeg β Required for merging video/audio
# Install yt-dlp (macOS/Linux)
pip install yt-dlp
# or
brew install yt-dlp
# Install ffmpeg
brew install ffmpeg # macOS
sudo apt install ffmpeg # Ubuntu/Debiangit clone https://github.com/yourusername/reels-downloader.git
cd reels-downloadernpm run install:allOr manually:
cd backend && npm install
cd ../frontend && npm installBackend:
cp backend/.env.example backend/.envEdit backend/.env:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/reels-downloader
NODE_ENV=development
FRONTEND_URL=http://localhost:5173
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX=50Frontend:
cp frontend/.env.example frontend/.envEdit frontend/.env:
VITE_API_URL=http://localhost:5000/apiNote: In development, the Vite proxy in
vite.config.jsautomatically forwards/apirequests to the backend on port 5000, soVITE_API_URLcan be left as/apifor local dev.
# Run both frontend and backend simultaneously
npm run devOr separately:
npm run dev:backend # Starts backend on http://localhost:5000
npm run dev:frontend # Starts frontend on http://localhost:5173Fetch video metadata and available formats.
Request body:
{ "url": "https://www.youtube.com/shorts/..." }Response:
{
"success": true,
"data": {
"title": "Video Title",
"thumbnail": "https://...",
"duration": 30,
"uploader": "Channel Name",
"platform": "Youtube",
"formats": [
{ "formatId": "137", "label": "1080p", "height": 1080 },
{ "formatId": "22", "label": "720p", "height": 720 }
]
}
}Download the video/audio file (streamed directly).
Request body:
{
"url": "https://www.youtube.com/shorts/...",
"format": "mp4",
"quality": "720p",
"title": "My Video"
}Response: Binary file stream with Content-Disposition: attachment
Returns aggregate download stats.
Returns paginated download logs.
Health check endpoint.
cd backend
npm startSet environment variables in your host's dashboard.
cd frontend
npm run build
# Deploy the dist/ folderUpdate VITE_API_URL in the frontend env to point to your production backend URL.
- URL whitelist: only YouTube and Instagram domains allowed
- Rate limiting: 20 info requests/min, 10 downloads/min per IP
- No permanent file storage: files are streamed and deleted immediately
- CORS configured to only allow the frontend origin
| Field | Type | Description |
|---|---|---|
| url | String | Original video URL |
| platform | String | youtube / instagram |
| format | String | mp4 / mp3 |
| quality | String | e.g. 720p |
| title | String | Video title |
| success | Boolean | Whether download succeeded |
| errorMessage | String | Error if failed |
| createdAt | Date | Auto timestamp |
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS |
| Backend | Node.js, Express |
| Database | MongoDB, Mongoose |
| Downloader | yt-dlp, ffmpeg |
| Fonts | Syne (display), DM Sans (body) |
All rights reserved Β· Made by OM Β·(https://instagram.com/omkedare.dev)