Lecture2Gether
Watch online lectures together!
View Demo · Report Bug · Request Feature · Send a Pull Request
About The Project
Lecture2Gether makes it possible to watch online lectures with friends by pasting a link to a Lecture2Go Video, a YouTube Video or a simple mp4 link. The video streams are synchronized to partially restore the social aspect of campus life.
Built With
- Vue.js
- Vuetify
- socket.io
- video.js
- videojs-youtube
- videojs-contrib-hls
- Flask
- Flask-SocketIO
- Flask-RESTful
- Prometheus Flask exporter
- Prometheus Python Client
- Eventlet
- Redis
- coolname
Install
Using docker (or podman)
You can either build the image from source or use one of the provided versions from our Docker Hub Repository.
# for building from source
docker build -t lecture2gether
docker run -p 8000:8000 lecture2gether
# for running from docker hub
docker run -p 8000:8000 thenerdful8/lecture2gether
This will start the whole application stack and expose it at http://localhost:8000/.
Install single Backend
The backend runs on a redis database. Run the redis docker docker run -it -p 6379:6379 redis:buster
or install manually by following this guide. Set the environment-variables 'REDIS_HOST', 'REDIS_PORT', 'REDIS_DB', 'REDIS_PASSWORD'
accordingly.
#Clone the repository
git clone https://github.com/TheNerdful8/Lecture2Gether
#Go to the backend folder
cd Lecture2Gether/lecture2gether_flask/
#Get Poetry
pip3 install poetry --user
#install the dependencies
poetry install --no-root
#start the server manually
poetry run python app.py
Install single Frontend
Install npm on your machine
#Clone the repository
git clone https://github.com/TheNerdful8/Lecture2Gether
#Go to the frontend folder
cd Lecture2Gether/lecture2gether-vue/
#Install required npm dependencies
npm install
#Run the application with
npm run serve
Configuration
There are two main ways of configuring the application. While the defaults were chosen in such a way that they work in a development environment (the docker container has different ones) they might need change in a production setup.
The server can be configured via the following environment variables
Name | Default Value | Description |
---|---|---|
SECRET_KEY | codenames | Change this in production |
REDIS_HOST | localhost | Hostname of the redis database which should be used |
REDIS_PORT | 6379 | Port on which redis listens on the redis-host |
REDIS_DB | 0 | Which database on the redis server should be used |
REDIS_PASSWORD | empty | Password to authenticate at the redis server |
CLEANUP_INTERVAL | 900 | Interval (in seconds) of searching for abandoned rooms |
CLEANUP_ROOM_EXPIRE_TIME | 3600 | Time (in seconds) until an empty room gets abandoned |
LOGLEVEL | INFO | Configures the python logging loglevel |
The frontend is configured via a settings.json
file which should be reachable on a request to /
from the running browser application. The format is as follows:
{
"apiRoot": <string>, // Under which url the server is reachable for http api calls
"socketioHost": <string>, // Under which host the socket.io endpoint is served.
// Can be empty which results in the same as one as where the frontend is deployed
"environment": <string> // Not yet used but necessary
}
Statistics
The backend publishes statistical data (No. sessions, No. joined/left rooms, server infos, ...) in the Prometheus format to /metrics
. This can be scraped by a Prometheus server and displayed in e.g. Grafana.
License
Distributed under the MIT License. See LICENSE
for more information.