dev-labs-bg / sportify

Football match prediction game with simple rules, built on Symfony
GNU Affero General Public License v3.0
33 stars 13 forks source link

General info

This is a football (soccer :) match prediction game with a simple concept - you and your buddies battle it out to see who's best at predicting match final scores. Each player gives score predictions to upcoming matches, and then points are awarded check the Game Flow. There is a Slack integration for notifications on events like standings, results and fixture updates. The application is fetching real-world football fixtures and scores via a free football API (http://api.football-data.org), but custom tournaments can be created from the administration.

Requirements to run the project

Installation and Environment Setup

The project can be run without issues on both *nix and Windows (Mac OS X, Ubuntu and Windows with LAMP tested :). Check the A to Z wiki article for a step by step guide on how to prepare a 5$ 512MB DigitalOcean Ubuntu LAMP 16.04 droplet for the task.

The major steps needed to set-up Symfony and all the tools (for both development and production):

composer install - for a basic install you just need username and password for mysql, all are written to app/config/parameters.yml check here for those the advanced parameters.
npm install (if running on a machine with 0.5/1GB RAM add swap)
bower install (you may need --allow-root as a parameter if running as sudo)
gulp

We suggest that you setup your web server to use web/ as root directory. The app has two main environments:

Application parameters and initial setup

N.B. After doing any changes on app/config/parameters.yml run php bin/console cache:clear --env=prod for them to take effect.

Changing advanced app settings (app/config/parameters.yml):

mailer_host, mailer_port, mailer_user, mailer_password - SMTP settings in order to have sending of registration confirmation and password reset emails enabled.

Best practice is to use a transactional mail service, like Mailgun, Amazon SES, etc. We recommend Mailgun as registering an account takes a few minutes and the free tier should be enough. Another option is to use Gmail SMTP settings.

football_api.token - you can get one free from football-data.org. If you use the service for a longer time, consider donating :)
slack.url, slack.channel - Generate them in Slack in order to get notifications.
secret - Symfony variable - generate it by going here or running in shell openssl rand -hex 20

N.B. After doing any changes on app/config/parameters.yml run php bin/console cache:clear --env=prod for them to take effect.

Initial application data setup (admin only)

Once the App is up-and-running you have to create at least one tournament, so that users are able to join it when they register and login.

Create tournament by navigating to: Admin Panel -> Tournaments. After the tournament is created, you have to options:

Game flow

Regular user

Admin user

Scoring system - what points are awarded for what

Contribution

We accept all kind of contributions that you guys make and we'll love you for them! <3

If you find any problems, have any suggestions or want to discuss something you can either open an issue here or make a pull request with code changes instead.

If you want to contribute, but you're not sure where to start you can always take a look at the open issues we have and pick any of them.

Try to follow our conventions for naming issues, branches and existing code structure and conventions.