Git Product home page Git Product logo

soccerbet's Introduction

SoccerBet

SoccerBet is a complete open-source Rails application to run bets or pools for soccer tournaments with friends. At this time, this app only uses Facebook login and all user-management is Facebook-based. So, you need a Facebook API key, get it on Facebook Developer.

Rules of the game

This game give points to the users when they correctly predicting the result:

  • 1 point: When the user predict the game's result (winner, draw or looser).
  • 3 points: When the user predict the game's exact result (number of goals).

The leaderboard automatically updates when the administrator captures the game's result.

Installation

Requirements

  • Ruby >= 2.0.0
  • Up and running instance of Redis. The leaderboard is Redis-based.

Cloning and running

Get the latest version of the app:

git clone https://github.com/edulomeli/soccerbet.git

Install all the dependencies:

bundle install

Run database migrations:

rake db:migrate

Set Facebook API keys as env variables (use the method you like, I use Foreman):

FB_PRIVATE_KEY=XXX
FB_PUBLIC_KEY=XXX

Set Redis URL as env variable:

REDIS_LOCAL_URL=redis://localhost:6379

Run the server:

rails s

Deploy to Heroku

This process will install SoccerBet on Heroku using all free plans available.

heroku apps:create soccerbet-demo
git push heroku master
heroku run rake db:migrate

For Redis I use RedisCloud provider, but you can choose any other you like (take a look to initializers/redis.rb:

heroku addons:add rediscloud:25

Set Facebook API keys as env variables:

heroku config:set FB_PRIVATE_KEY=XXX
heroku config:set FB_PUBLIC_KEY=XXX

Optionally, this app is prepared to run New Relic, so you only need to install the add-on:

heroku addons:add newrelic:stark
heroku config:set NEW_RELIC_APP_NAME="YOUR APP NAME GOES HERE"

Locales and I18n

This first version is available completely in Spanish, English will be added very soon. All the app messages are in the standard config/locales directory.

World Cup 2014

If you want to run a Pool for World Cup 2014, you can find all the teams and games of the tournament in db/seeds/ in CSV. To install it run rake db:seed. All the times are UTC.

Contributing

I hope that you will consider contributing to SoccerBet.

soccerbet's People

Contributors

eduardinni avatar

Watchers

James Cloos avatar john kyony avatar

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.