A full-stack anime streaming platform that downloads torrents and streams them via HLS (HTTP Live Streaming).
- 🎬 Download anime via torrent magnet links
- 🎥 Automatic HLS conversion with multiple quality options (720p, 480p, 360p)
- 📺 Adaptive streaming with quality selection
- 🔄 Real-time download and conversion progress tracking
- 💾 Persistent storage for downloads and converted files
- 🎨 Clean, responsive UI
- Go - High-performance backend server
- Gin - Web framework
- anacrolix/torrent - Torrent client
- FFmpeg - Video conversion to HLS
- React - UI framework
- TypeScript - Type-safe JavaScript
- HLS.js - HLS video player
anime-streamer/
├── backend/
│ ├── main.go # Server setup and routes
│ ├── types.go # Anime type definitions
│ ├── handlers.go # HTTP request handlers
│ ├── torrent.go # Torrent download logic
│ ├── hls.go # HLS conversion logic
│ ├── scanner.go # File scanning and restoration
│ ├── utils.go # Utility functions
│ └── Dockerfile
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── types/ # TypeScript types
│ │ └── config.ts # Configuration
│ ├── nginx.conf
│ └── Dockerfile
├── storage/ # Created automatically
│ ├── downloads/ # Torrent downloads
│ └── hls/ # HLS converted files
└── docker-compose.yml
- Docker and Docker Compose installed on your system
- Clone the repository:
git clone <your-repo-url>
cd anime-streamer- Start the application:
docker-compose up -d- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- Stop the application:
docker-compose down- Navigate to backend directory:
cd backend- Install dependencies:
go mod download- Run the server:
go run .The backend will start on http://localhost:8080
Note: FFmpeg must be installed on your system for HLS conversion.
- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm startThe frontend will start on http://localhost:3000
Create a .env file based on .env.example:
# Backend Configuration
BACKEND_PORT=8080
# Frontend Configuration
REACT_APP_API_URL=http://localhost:8080To change ports or other settings, edit docker-compose.yml:
- Frontend port: Change
3000:80to<your-port>:80 - Backend port: Change
8080:8080to<your-port>:8080
- Add Anime: Enter anime name and torrent magnet link, select desired qualities
- Download: The backend automatically downloads the torrent
- Conversion: After download completes, automatic HLS conversion begins
- Stream: Once ready, click play to stream with adaptive quality selection
All data is persisted in the ./storage directory:
downloads/- Original torrent downloadshls/- Converted HLS files with multiple quality variants
The application automatically restores anime from existing files on startup.
GET /api/anime- List all animePOST /api/anime- Add new animeGET /api/anime/:id- Get anime detailsDELETE /api/anime/:id- Delete animeGET /api/anime/:id/progress- Get download/conversion progressPOST /api/anime/:id/convert- Manually trigger HLS conversionGET /hls/*- Serve HLS streaming files
MIT
- Make sure you have sufficient disk space for downloads and conversions
- HLS conversion can be CPU-intensive
- Only use torrent links for content you have rights to download