Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Dancing Together

Build Status

Dancing Together is a website for friends, family, couples, coworkers, and even Internet strangers to listen to Spotify together. Simply sign up for an account, create or join a room with friends, select some killer tunes, and hit play. Each person listens to music using their own Spotify account and Dancing Together keeps the jammin' in sync. Pause it, skip it, rewind it, enjoy it!


  • Create your own radio station and invite friends via email
  • As the DJ, you can change the music from any Spotify app using the "Connect to a device" feature with the "Dancing Together" device
  • Listeners are automatically kept in sync with playback changes
  • Listeners cannot change the radio station music


  • The Dancing Together website only has simple playback controls, it does not support setting the current track or playlist directly. To do this, use the "Connect to a device" feature on any Spotify app
  • There can be only one DJ at a time. This can cause sync issues


Installation and First Time Setup

# Install dependencies
# Add required environment variables
cp .env.example .env
vim .env
# Build containers
make build
# Run database migrations and create a superuser to administer the site
make db-setup


# (Re)build the docker containers after updating dependencies
make build
# Start the docker containers
make run
# Start the frontend server
make watch
# Attach to running containers to enable easy debugging with `pdb`
make attach

NOTE: Do not use seed data in production. This creates two accounts, 'primary' and 'secondary', each with password 'testpassword'.


make check


make test


make deploy

Code Map

  • Dockerfile
  • Pipfile: specifies project dependencies
  • Pipfile.lock: pins dependency versions to ensure deterministic builds
  • Procfile: specifies how to start the app on Heroku
  • this file
  • accounts: Django app for managing user accounts
  • app.json: specifies configuration for Heroku
  • dancingtogether: the main Django project, contains overall url routing
  • docker-compose.yml: specifies Docker services that compose this project
  • main: Django app for site index and management commands
  • Program for running management commands
  • radio: Django app for listening to music
  • tools/scripts: small scripts for developers
  • static: Contains the site's css and js files
  • templates: common templates for the entire project
    • base.html: the base template for every page

Tech Stack

Dancing Together is a Django app running on Heroku.

This project uses the Pipenv Python packaging tool to manage dependencies, manage virtual environments, and produce deterministic builds.

App Dependencies

Dependency How Used Docs
Django URL routing, database
Requests Service-to-service calls (e.g. Spotify API)
channels_redis Admin notifications when a listener joins the station
django-bootstrap4 Easy Bootstrap 4 template styling
channels Websockets for station change notifications
django-webpack-loader Loads the frontend webpack
djangorestframework Provides serialization and REST routing
drf-nested-routers Used for /stations/1/listeners/ routing

Additional Development Depedencies

Dependency How Used Docs
pycodestyle Pep8 style checking
mypy Optional static type checking
yapf Python code formatting
pylint Python code analysis
pytest-django Test fixture support and writing unit tests
pytest-asyncio Websocket consumer tests
python-dateutil Parsing server ping response