{"id":39444256,"url":"https://github.com/profullstack/media-streamer","last_synced_at":"2026-01-18T04:23:33.967Z","repository":{"id":330583249,"uuid":"1123229796","full_name":"profullstack/media-streamer","owner":"profullstack","description":"A comprehensive multi-media streaming platform that allows users to stream music, movies, books, and live TV from torrents and IPTV sources - without downloading content until playback.","archived":false,"fork":false,"pushed_at":"2026-01-04T22:00:47.000Z","size":2411,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-05T03:12:04.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bittorrented.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/profullstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-26T12:47:32.000Z","updated_at":"2026-01-04T22:00:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/profullstack/media-streamer","commit_stats":null,"previous_names":["profullstack/media-streamer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/profullstack/media-streamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fmedia-streamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fmedia-streamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fmedia-streamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fmedia-streamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/profullstack","download_url":"https://codeload.github.com/profullstack/media-streamer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fmedia-streamer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-18T04:23:33.901Z","updated_at":"2026-01-18T04:23:33.958Z","avatar_url":"https://github.com/profullstack.png","language":"TypeScript","readme":"# BitTorrented\n\nA comprehensive multi-media streaming platform that allows users to stream music, movies, books, and live TV from torrents and IPTV sources - without downloading content until playback.\n\n## Features\n\n### Torrent Streaming\n- 🎵 **Music Streaming** - Stream FLAC, MP3, OGG, and more with full player controls\n- 🎬 **Video Streaming** - Watch videos with seeking, fullscreen, and picture-in-picture\n- 📚 **Ebook Reader** - Read PDFs and EPUBs with progress tracking\n- 🔍 **Deep Search** - Search across file names, paths, and metadata\n- ⬇️ **Download** - Download individual files or entire torrents\n- 🎙️ **Podcasts** - Browse and stream podcasts with episode tracking\n\n### IPTV Support\n- 📺 **Live TV** - Stream from M3U playlists and Xtream Codes providers\n- 📋 **EPG Guide** - Electronic Program Guide for live channels\n- 🔄 **Multiple Providers** - Manage multiple IPTV sources\n- 🔐 **IPTV Subscriptions** - Premium IPTV access with subscription management\n\n### Personal Library\n- ❤️ **Favorites** - Save your favorite files for quick access\n- 📁 **Collections** - Create custom playlists and watchlists\n- 📜 **Watch History** - Track your viewing and reading progress\n- 🔄 **Progress Sync** - Resume where you left off across devices\n\n### Social Features\n- 🎉 **Watch Parties** - Synchronized viewing with friends\n- 💬 **Real-time Chat** - Chat while watching together\n\n### Premium Features\n- 💳 **Crypto Payments** - Pay with cryptocurrency via CoinPayPortal\n- 👨‍👩‍👧‍👦 **Family Plans** - Share with up to 10 family members\n- 📺 **IPTV Add-on** - Premium live TV subscription\n\n### Platform\n- 📱 **PWA Support** - Install as a native app on mobile and desktop\n- 🌙 **Dark Mode** - Premium dark-mode-first design\n- 🔒 **Server-side Security** - All sensitive operations server-side only\n- ⚡ **Server-Side Rendering** - Fast page loads with pre-fetched data\n\n## Tech Stack\n\n- **Frontend**: Next.js 16, React 19, TypeScript, Tailwind CSS\n- **Backend**: Next.js API Routes (Server-side only)\n- **Database**: Supabase (PostgreSQL with Full-Text Search)\n- **Torrent**: WebTorrent (metadata-only fetching)\n- **Video**: Video.js with HLS.js for M3U8 streaming\n- **Payments**: CoinPayPortal (cryptocurrency)\n- **Testing**: Vitest with TDD approach\n- **Deployment**: DigitalOcean Droplet (with UDP support for DHT)\n\n## Prerequisites\n\n- Node.js v24+\n- pnpm v9+\n- Supabase account\n\n## Getting Started\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/your-org/bittorrented.git\ncd bittorrented\n```\n\n### 2. Install dependencies\n\n```bash\npnpm install\n```\n\n### 3. Set up environment variables\n\n```bash\ncp .env.example .env.local\n```\n\nEdit `.env.local` with your credentials:\n\n```env\n# Supabase\nSUPABASE_URL=https://your-project.supabase.co\nSUPABASE_SERVICE_ROLE_KEY=your-service-role-key\nSUPABASE_ANON_KEY=your-anon-key\n\n# Metadata APIs\nTHETVDB_API_KEY=your-thetvdb-key\nOMDB_API_KEY=your-omdb-key\n\n# CoinPayPortal (for payments)\nCOINPAYPORTAL_MERCHANT_ID=your-merchant-id\nCOINPAYPORTAL_API_KEY=your-api-key\n```\n\n### 4. Run the development server\n\n```bash\npnpm dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser.\n\n## Scripts\n\n| Command | Description |\n|---------|-------------|\n| `pnpm dev` | Start development server |\n| `pnpm build` | Build for production |\n| `pnpm start` | Start production server |\n| `pnpm test` | Run tests in watch mode |\n| `pnpm test:run` | Run tests once |\n| `pnpm test:coverage` | Run tests with coverage |\n| `pnpm lint` | Run ESLint |\n| `pnpm typecheck` | Run TypeScript type checking |\n\n## Project Structure\n\n```\nbittorrented/\n├── src/\n│   ├── app/                    # Next.js App Router\n│   │   ├── api/                # API routes (server-side only)\n│   │   │   ├── library/        # Library API (favorites, collections, history)\n│   │   │   ├── iptv/           # IPTV API (channels, playlists, subscriptions)\n│   │   │   ├── auth/           # Authentication API\n│   │   │   ├── payments/       # Payment processing API\n│   │   │   └── stream/         # Streaming API\n│   │   ├── library/            # My Library page (server-rendered)\n│   │   ├── live-tv/            # Live TV page\n│   │   ├── podcasts/           # Podcasts page\n│   │   ├── layout.tsx          # Root layout\n│   │   └── page.tsx            # Home page\n│   ├── components/             # React components\n│   │   ├── layout/             # Layout components (sidebar, header)\n│   │   ├── torrents/           # Torrent-related components\n│   │   ├── live-tv/            # Live TV components (HLS player)\n│   │   ├── media/              # Media player components\n│   │   └── ui/                 # UI primitives\n│   ├── lib/                    # Utility functions and services\n│   │   ├── supabase/           # Supabase client (server-side only)\n│   │   ├── library/            # Library repository (favorites, collections, history)\n│   │   ├── iptv/               # IPTV services (M3U parser, playlist cache)\n│   │   ├── iptv-proxy/         # IPTV proxy for HLS rewriting\n│   │   ├── podcasts/           # Podcast services\n│   │   ├── torrent/            # Torrent services\n│   │   ├── streaming/          # Streaming services\n│   │   ├── magnet/             # Magnet URL parsing\n│   │   ├── payments/           # Payment processing\n│   │   └── indexer/            # File indexing\n│   ├── hooks/                  # React hooks\n│   └── types/                  # TypeScript types\n├── public/                     # Static assets\n├── supabase/                   # Supabase migrations\n└── plans/                      # Implementation plans\n```\n\n## Testing\n\nThis project follows Test-Driven Development (TDD). Tests are written first, then implementation.\n\n```bash\n# Run tests in watch mode\npnpm test\n\n# Run tests once\npnpm test:run\n\n# Run tests with coverage\npnpm test:coverage\n```\n\n## Deployment\n\n### DigitalOcean Droplet (Recommended)\n\nWe use a DigitalOcean Droplet instead of App Platform because **App Platform doesn't support UDP**, which is required for DHT (Distributed Hash Table) peer discovery in BitTorrent.\n\n**Quick Start:**\n\n```bash\n# 1. SSH into your Droplet\nssh root@YOUR_DROPLET_IP\n\n# 2. Run the setup script\ncurl -fsSL https://raw.githubusercontent.com/profullstack/music-torrent/main/scripts/setup-droplet.sh | bash\n\n# 3. Setup SSL\ncertbot --nginx -d yourdomain.com -d www.yourdomain.com\n```\n\n**What the setup script does:**\n- Installs Node.js 22, pnpm, FFmpeg, Nginx\n- Clones the repository\n- Creates a systemd service for auto-restart\n- Configures Nginx as reverse proxy\n\n**GitHub Actions auto-deploy:**\n- Push to `main` branch triggers automatic deployment\n- Required GitHub Secrets:\n  - `DROPLET_HOST` - Droplet IP address or hostname\n  - `DROPLET_USER` - SSH username (e.g., `ubuntu`)\n  - `DROPLET_SSH_KEY` - Private SSH key for authentication\n  - `ENV_FILE` - Contents of `.env` file for production\n- Optional GitHub Secrets:\n  - `DROPLET_PORT` - SSH port (defaults to `22` if not set)\n\nSee [docs/deployment-droplet.md](docs/deployment-droplet.md) for detailed instructions.\n\n## Security\n\n- **All Supabase calls are server-side only** - No client-side database access\n- **Rate limiting** - Prevents abuse of magnet ingestion and streaming\n- **Input validation** - All user inputs are validated\n- **No content storage** - Only metadata is stored, content is streamed on-demand\n- **Webhook verification** - Payment webhooks are cryptographically verified\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Write tests first (TDD)\n4. Implement the feature\n5. Ensure all tests pass\n6. Submit a pull request\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fmedia-streamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofullstack%2Fmedia-streamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fmedia-streamer/lists"}