Giter VIP home page Giter VIP logo

like_stream's Introduction

SoundCloud Like Stream

Check it out live!

This site was built as an experiment in using the SoundCloud public API along with Flask.

Installation

Create a virtual environment:

$ mkvirtualenv like-stream --python=python3

Install dependencies:

$ pip install -r requirements.txt

Create a local PostgreSQL databse:

$ psql
-> CREATE DATABASE dbname;
-> CREATE USER username WITH PASSWORD password;
-> GRANT ALL PRIVILEGES ON DATABASE dbname TO username;
-> \q

Create a config.py file in the root directory:

DEBUG = True

DATABASE = {
  'NAME': 'dbname',
  'USER': 'username',
  'PASSWORD': 'password',
  'HOST': 'localhost',
  'PORT': ''
}

SECRET_KEY = '<some secret key>'

SOUNDCLOUD_CLIENT_ID = '<your api key>'

Running

Development

To run the devlopment server:

$ python run.py

To run the background update process:

$ python worker.py

Production

To run the production server:

$ gunicorn -b 127.0.0.1:8000 app:app

To run the background process every 15 minutes, add the following to your crontab ($ crontab -e):

*/15 * * * * /full/path/to/env/bin/python /full/path/to/project/worker.py

TODO Tasks

  • Update form input for new targets
  • Set intervals to keep checking if last song has finished (stops in inactive tab)
  • Auto load at top when new songs are available
  • Use auth to provide suggested targets
  • Autocomplete names
  • Use meta tag for better mobile experience

like_stream's People

Contributors

willshowell avatar

Watchers

James Cloos avatar  avatar

like_stream's Issues

Add admin view

It would be cool to be able to quickly see how many users there are, how many new targets are being added, etc.

Stream length

The stream should initially only show a subset of the songs. Pagination can be added later, but the first 15 would probably work for now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.