A fast, secure, and free YouTube video and audio downloader web application. Download your favorite content in multiple formats with time range cutting capabilities, all without storing files on our servers.
- π₯ Video Downloads: MP4, WebM, AVI formats with quality selection
- π΅ Audio Extraction: MP3, WAV formats with bitrate options
- βοΈ Time Range Cutting: Trim videos and audio to specific time segments
- π± Mobile Responsive: Optimized for all device sizes
- π Privacy Focused: No file storage on servers - direct streaming downloads
- β‘ Real-time Progress: Animated progress indicators with stage visualization
- π Fast Processing: Powered by FFmpeg for efficient media processing
- β±οΈ Duration Limit: 10-minute maximum to prevent abuse
- Node.js 18+
- npm or yarn package manager
- FFmpeg (automatically handled in production)
-
Clone the repository
git clone <repository-url> cd techormehtube
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5000
That's it! The app will be running locally with both frontend and backend services.
βββ client/ # React frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ services/ # API service layer
β β βββ utils/ # Utility functions
β β βββ constants/ # App constants and configurations
β β βββ pages/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Core utilities and configurations
β β βββ types/ # TypeScript type definitions
βββ server/ # Express.js backend
β βββ controllers/ # Request handlers
β βββ services/ # Business logic layer
β βββ utils/ # Server utilities
β βββ middleware/ # Express middleware
β βββ config/ # Configuration files
β βββ routes/ # API route definitions
β βββ storage.ts # Data storage interface
βββ shared/ # Shared types and schemas
β βββ schema.ts # Database and validation schemas
βββ tests/ # Comprehensive test suite
β βββ server/ # Server-side tests
β βββ client/ # Client-side tests
β βββ shared/ # Shared code tests
βββ README.md # Project documentation
Frontend:
- React 18 with TypeScript
- Tailwind CSS + shadcn/ui components
- TanStack Query for state management
- Wouter for routing
- React Hook Form with Zod validation
Backend:
- Express.js with TypeScript
- @distube/ytdl-core for YouTube integration
- FFmpeg for media processing
- Drizzle ORM for database operations
- Streaming downloads (no file storage)
Development:
- Vite for fast builds and HMR
- ESBuild for TypeScript compilation
- Hot module replacement in development
# Start development server (frontend + backend)
npm run dev
# Build for production
npm run build
# Run database migrations
npm run db:push
# Generate database migrations
npm run db:generate
# Run unit tests
npm test
# Run tests in watch mode (for development)
npm run test:watch
# Run tests with coverage report
npm run test:coverage
# Run tests for CI/CD (no watch, with coverage)
npm run test:ciCreate a .env file in the root directory:
# Database (Optional - uses in-memory storage by default)
DATABASE_URL=postgresql://username:password@localhost:5432/database
# Node Environment
NODE_ENV=developmentExtract YouTube video metadata and available formats.
Request:
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}Response:
{
"videoId": "VIDEO_ID",
"title": "Video Title",
"duration": "180",
"thumbnail": "thumbnail_url",
"videoFormats": [...],
"audioFormats": [...]
}Stream video or audio download with optional time range cutting.
Request:
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"format": "mp4",
"quality": "720p",
"startTime": 30,
"endTime": 120
}Response: Direct file stream with appropriate headers.
The application is containerized and ready for deployment on multiple platforms.
-
Build the Docker image
docker build -t techormehtube . -
Run the container
docker run -p 5000:5000 techormehtube
Railway (Recommended):
- Connect your GitHub repository
- Railway auto-detects the Node.js environment
- Automatic deployments on git push
Digital Ocean App Platform:
- Import from GitHub
- Configure build/run commands
- Auto-scaling enabled
Digital Ocean Droplets:
- Use provided Dockerfile
- Configure reverse proxy with Nginx
- SSL certificate setup required
See DEPLOYMENT.md for detailed deployment instructions.
- No File Storage: All downloads stream directly through the server without disk storage
- Duration Limits: 10-minute maximum video length prevents server abuse
- URL Validation: Strict YouTube URL validation and sanitization
- Rate Limiting: Built-in protection against excessive requests
- CORS Security: Properly configured cross-origin request handling
The project includes comprehensive unit tests for both server and client code:
# Run all tests
npm test
# Run tests in watch mode (recommended for development)
npm run test:watch
# Generate coverage report
npm run test:coverage
# Run tests for CI/CD
npm run test:ci- Server Tests (
tests/server/): API endpoints, services, utilities, and middleware - Client Tests (
tests/client/): React components, utilities, and services - Shared Tests (
tests/shared/): Validation schemas and shared utilities
- Server Code: 90%+ coverage for critical paths (YouTube service, download logic)
- Client Code: 80%+ coverage for utilities and services
- Shared Code: 95%+ coverage for validation schemas
# Test specific file
npm test -- youtube.test.ts
# Test with verbose output
npm test -- --verbose
# Test in watch mode with coverage
npm run test:watch -- --coverageWe welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Write tests for new functionality
- Ensure all tests pass:
npm test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Write comprehensive unit tests for new features
- Maintain test coverage above 80%
- Use the existing ESLint/Prettier configuration
- Write meaningful commit messages
- Test your changes across different devices
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- ytdl-core for YouTube integration
- FFmpeg for media processing
- shadcn/ui for beautiful UI components
- Tailwind CSS for styling
Developer: @_pvgomes
GitHub: github.com/pvgomes
YouTube: @tech-or-meh
Built with β€οΈ for the community β’ Report Issues