Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple song voting app built using Padrino and PubNub.
JavaScript Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
admin
app
config
db
lib
models
public
test
.components
.gitignore
Gemfile
Gemfile.lock
Rakefile
config.ru
readme.md
vote-mockup.psd

readme.md

Votr

A real time voting example made using PubNub and Padrino. If you're interested in how this application was made, there's a writeup.

About

This is a pretty simple little app built primarily to demonstrate PubNub and Padrino. As such, the admin interface is simplistic at best, and there are many aspects that aren't realistic in a production application.

For instance, there is a limit of 10 votes per round that exists purely on the client side. If a user refreshes their browser window, that count refreshes, but the main goal was to allow people to be able to play with the live vote tabulation but restrict them from inundating the system with hundreds of votes in a few minutes. A UUID is sent along with the vote, which could be used to more effectively restrict the number of votes allowed based on that ID.

Install

Clone the repository and install dependencies.

$ git clone git://github.com/sh1ps/padrino-pubnub-votr.git
$ cd padrino-pubnub-votr
$ bundle install

Set up the database and admin account.

$ padrino rake ar:create
$ padrino rake ar:migrate
$ padrino rake seed

Start everything up with padrino start and you should be up and running!

Setup

In order to use the admin interface, first create an initial admin. Use the command padrino rake ar:seed and log in using the credentials you set in db/seeds.rb. For now you must first create a round, then add songs to that round by adding new songs and using the ID of the round you just created. This will become a one page process shortly.

Something went wrong with that request. Please try again.