Stream is a webapp using Django, DRF, and Django Channels as backend and using React as frontend which can be use to stream live music on a PC, while you can control the song using other PC's connected by LAN, in a network.
- Clone the Repository
$ git clone https://github.com/pradumangoyal/stream.git stream
$ cd stream
- Make virtual environment setup
$ sudo apt-get install python3-venv
$ python3 -m venv <env_name>
- Activate your environment
$ source <env_name>/bin/activate
- Install requirements
$ cd ./backend/
$ pip install -r requirement.txt
- Migrate Files
$ python manage.py makemigrations
$ python manage.py migrate
- Make a Superuser with username 'stream_mainpc'(keep this in mind)
$ python manage.py createsuperuser
- Make a necessary entry in Song_model
$ python manage.py shell
> from stream_sockets.models import Song_model
> Song_model.objects.create()
Press Ctrl-D
- Run the app(on localhost:8000)
$ docker run -p 6379:6379 -d redis:2.8
$ python manage.py runserver
- Run react
$ cd ../frontend
$ npm install
$ npm start
- Browser part
- Open localhost:3000/stream on a window preferably on the PC connected by speakers (Song will play on this window)
- Go to localhost:3000 and make a new user before using it you have to approve the user
- Using Drag and Drop menu at localhost:8000/ approve users.
- Login using the user you have created and enjoy the streaming and best use of common speakers at your workplace or home.
Design Credits: @github/gouranshi