Releases: hamidukarimi/Vidiflow-backend
Releases · hamidukarimi/Vidiflow-backend
Release list
v2.0.0 - Vidiflow Backend V2
Vidiflow Backend V2.0.0
Real video extraction, real-time progress tracking, and complete API documentation.
New Features ✨
Video Extraction
- Real yt-dlp Integration: Extract actual video metadata and download URLs from YouTube
- Multi-Provider Support: YouTube and TikTok providers now use real extraction
- Format/Quality Detection: Dynamic available formats and qualities per video
- Direct Download URLs: Return actual platform URLs instead of mocking data
Real-Time Progress
- WebSocket Support: Real-time download status updates instead of polling
- Download Rooms: Clients subscribe to specific download updates
- Event Emitters: PROCESSING, COMPLETED, FAILED status events
- Better UX: Frontend gets instant feedback on download progress
API Documentation
- Swagger/OpenAPI: Interactive API docs at
/api-docs - Complete Endpoint Docs: All endpoints documented with examples
- Request/Response Schemas: Clear input/output formats
- Authentication Docs: Bearer token requirements clearly marked
Architecture Improvements
- Unified Extraction Service: Single yt-dlp wrapper used by all providers
- Provider Pattern Proven: Easy to add new providers (same as YouTube/TikTok)
- Scalable Design: WebSocket doesn't block worker threads
- Production Ready: Real extraction, real-time updates, full documentation
What Works Now ✅
- Register/Login with JWT + refresh tokens
- Download videos from YouTube with real metadata
- TikTok support (extraction may vary due to platform restrictions)
- Real-time download status via WebSocket
- Download history and favorites
- Rate limiting on auth endpoints
- Comprehensive API documentation
- Background job processing with BullMQ
- Error handling and validation
Tech Stack Updates
socket.io: Real-time WebSocket communicationyt-dlp: Cross-platform video extractionswagger-jsdoc&swagger-ui-express: API documentationbullmq: Background job queue (from V1)redis: Queue storage (from V1)
API Endpoints
Auth:
POST /api/v1/auth/register- Register userPOST /api/v1/auth/login- LoginPOST /api/v1/auth/logout- Logout
Downloads:
POST /api/v1/downloads- Create downloadGET /api/v1/downloads/{id}- Get download detailsGET /api/v1/downloads/{id}/status- Poll status (optional, use WebSocket instead)GET /api/v1/downloads/info?url=...- Get video formats/qualitiesPOST/DELETE /api/v1/downloads/{id}/favorite- Manage favoritesGET /api/v1/downloads/favorites- Get favorites list
WebSocket Events
// Client subscribes to download
socket.emit('subscribe-download', downloadId);
// Server broadcasts status updates
socket.on('download-status', {
downloadId: string,
status: 'PROCESSING' | 'COMPLETED' | 'FAILED',
progress: 0-100,
error?: string
});Documentation
Interactive API docs available at: http://localhost:3000/api-docs
Known Limitations
- TikTok extraction is unreliable due to platform anti-bot measures
- File downloads go directly to user device (as designed)
- No persistent file storage on server (by design)
Next Steps (V3 Roadmap)
- Add more providers (Instagram, Facebook, Reddit, X/Twitter)
- Improve TikTok extraction (alternative methods)
- Browser extension for one-click downloads
- Mobile app (iOS/Android)
- Premium features (faster downloads, priority queue)
- Analytics dashboard
- User subscriptions and payments
- Admin panel
Breaking Changes from V1
- Removed file serving endpoints (no longer needed)
- Download metadata now includes error messages
- Provider contract changed: returns downloadUrl instead of filePath
Setup
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Run migrations
npx prisma migrate dev
# Start API
npm run dev
# In another terminal, start worker
npm run workerContributors
Built with focus on clean architecture, scalability, and production-grade practices.
v1.0.0 - Vidiflow Backend V1
Vidiflow Backend V1.0.0
Production-grade backend service for the Vidiflow video downloading platform.
Features ✨
- Authentication: Registration, login/logout, JWT + refresh tokens
- Downloads: Create, track progress, view history, favorite downloads
- Provider System: Extensible architecture (YouTube, TikTok examples)
- Background Jobs: Async download processing with BullMQ + Redis
- Rate Limiting: Protection against brute force attacks
- Database: PostgreSQL with Prisma ORM
API Endpoints
Auth
POST /api/v1/auth/register- Register new userPOST /api/v1/auth/login- Login userPOST /api/v1/auth/logout- Logout user
Downloads
POST /api/v1/downloads- Create download (guests + users)GET /api/v1/downloads/:id- Get download detailsGET /api/v1/downloads/:id/status- Poll download statusGET /api/v1/downloads/info?url=...- Preview video infoGET /api/v1/downloads/history- User's download historyPOST/DELETE /api/v1/downloads/:id/favorite- Manage favorites
Tech Stack
- Runtime: Node.js
- Framework: Express.js
- Language: TypeScript
- Database: PostgreSQL + Prisma
- Auth: JWT + bcrypt
- Queue: BullMQ + Redis
- Security: helmet, cors, rate-limit, express-validator
Known Limitations (V2 planned)
- Video extraction currently returns mock data (placeholder)
- File storage not yet implemented
- No admin dashboard
- No analytics
Setup
npm install
npm run dev # Start API server
npm run worker # Start background worker in separate terminalEnvironment Variables
See .env.example
Next Steps (V2 Roadmap)
- Real video extraction with yt-dlp
- File storage (local → S3)
- WebSocket for real-time progress
- More providers (Instagram, TikTok real implementation)
- Admin dashboard
- Analytics
- API documentation (Swagger)
- Unit tests