A web application to explore, search and play videos of torrent providers. Videos are downloaded on the backend using the BitTorrent protocol and streamed to the browser. The front-end features a beautiful discovery page and social features such as comments.
Learn more about how this project workd with the wiki
- Docker
>2.0
Replace the environment variables inside the docker-compose.yml
file.
docker-compose up # Start all services
The web app is listening on localhost:4242
. The API is accessible on localhost:3000
.
Start a mongodb process in the background
docker-compose up -d db_mongo
In development mode, the app is served using hot reload (A change in the code source automatically reload the app).
# Requires NodeJS >=12
yarn # Install dependencies
yarn dev
The app is available by default on http://localhost:4242/
The API service requires environment variables. You can either pass them as usual process environment variables or create a .env
file in the server
.
MONGO_URL: mongodb://localhost/hypertube
SERVER_PORT: 3000
API_URL: http://localhost:3000
CLIENT_URL: http://localhost:4242
CAPTCHA_KEY: XXXXX
API_NODE_MAILER_KEY: XXXXX
API_NODE_MAILER_DOMAIN: XXXXX
API_THE_MOVIE_DB_KEY: XXXXX
API_YTS_KEY: XXXXX
API_GOOGLE_CONSUMER_KEY: XXXXX
API_GOOGLE_CONSUMER_SECRET: XXXXX
API_FACEBOOK_APP_ID: XXXXX
API_FACEBOOK_APP_SECRET: XXXXX
API_FORTYTWO_APP_ID: XXXXX
API_FORTYTWO_APP_SECRET: XXXXX
API_GITHUB_CLIENT_ID: XXXXX
API_GITHUB_CLIENT_SECRET: XXXXX
# Requires NodeJS >= 12 and yarn
yarn # Installs dependencies
yarn dev # Hot reloaded API
yarn lint # Lint code
yarn reset # Clean all temporary files
The API service provides all the data needed by the web client. It provides endpoints for searching and hot lists of movies, user informations and authentication, video streaming endpoint, etc. Most of the endpoints requires authentication. Authentication must be set on the cookies (see passport.js documentation).
It uses NodeJS
with the framework koa
and typescript
. The data is persisted by MongoDB
.
Auto generated API documentation
The web client is served with SSR (server side rendering) with the NextJS
framework (ReactJS
with SSR).
On top of the required project, we did:
- Github authentication
- Custom
magnet-link
player - A RESTFUL API
- NextJS Server side rendering + ReactJS: Fast first html downloading / page rendering, + web app in the browser
- Captcha for registration
- Docker: one line start
- Real email domain name
- @abbensid - Frontend
- @jterrazz - Backend