Listen to music with friends, together! Colaborate and maintain a playlist with friends real time. Create a room and let friends join you. Built using: React, Django, NodeJs, Socket.io
friendzone.live (hosted on heroku)
- Listen to music with friends together, live.
- Group chat with your friends while enjoying music.
- Private rooms - Only people you want can join.
The whole repo is divided into 3 parts
- Location:
/server
- This is the main django server serving files, APIs and implementing most of the features.
- Location:
/liveServer
- This is the nodeJS server is used to push realtime updates to clients via websockets and also implements the group chat feature, it listens to updates from the main server via
Redis
pub/sub feature and relays the updates to appropriate rooms and clients. It usesMongoDB
for storing chat messages andsocket.io
to connecting with clients.
- Location:
/webapp
- This is the React Frontend codebase that gets bundled and served by our main server.
This codebase is in Django
virtualenv venv
venv\Scripts\activate
pip install -r requirements.txt
python manage.py collectstatic
python manage.py makemigrations musicroom
python manage.py migrate --run-syncdb
python manage.py runserver 0.0.0.0:8000
(This will only work on linux)
gunicorn -b 0.0.0.0:80 musicroom.wsgi
For local setup, you can also use settings_dev.py
file
DJ_SECRET_KEY
: Django secret keyBASE_URLBASE_URL
: Root url of the server. eg:https://example.com
DATABASE_URL
: eg:postgres://user:password@localhost/dbname
DOMAIN_NAME
: eg:example.com
LIVE_ACCESS_KEY
: A random string that needs to be same both servers. eg:xx-access-key-xx
LIVE_URL
: Thesocket.io
url of the live server. eg:https://live.friendzone.live/updates
REDIS_URL
: eg:redis://user1:[email protected]:31949
SNAPKIT_CLIENT_ID
: Optional
This codebase is in NodeJs
npm i
For local setup, you can also use .env
file
MAIN_SERVER_URL
: eg:https://example.com
if running on same machine as main server, you can use the local address ielocalhost:port
ACCESS_KEY
: Same access key set in the main server.REDIS_URL
: Should be same as main serverMONGO_URL
: eg:mongodb://localhost:27017/mr
MAIN_SERVER_PUBLIC_URL
: eg:https://example.com
node index.js