GithubHelp home page GithubHelp logo

veelenga / cybfootball Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 1.45 MB

Футбольні турніри факультету кібернетики

Home Page: http://cybfootball.org.ua

Ruby 69.36% JavaScript 9.61% CSS 2.44% HTML 18.59%
football cybernetics

cybfootball's Introduction

Cybfootball Build Status

Setup

  1. Install ruby of version 2.4.1: https://www.ruby-lang.org/en/documentation/installation/

  2. Install postgresql of version 9: https://wiki.postgresql.org/wiki/Detailed_installation_guides

  3. Clone repo and go to app root dir:

$ git clone https://github.com/veelenga/cybfootball
$ cd cybfootball
  1. Install bundler and all required dependencies:
$ gem install bundler
$ bundle install
  1. Create and migrate database, run tests:
$ bundle exec rake db:create
$ bundle exec rake db:migrate
$ bundle exec rake db:seed
$ bundle exec rake db:migrate RAILS_ENV=test
$ bundle exec rspec
  1. Start app:
$ bundle exec rails server

Data from the book

The information about the players, teams and the tournaments is located by the link https://drive.google.com/drive/folders/0B19XYNc9CGKzMGl4cnNTdVVyUWc?usp=sharing

FB group

There are a bunch of the photos from the several tournaments. https://www.facebook.com/groups/341895829498550

cybfootball's People

Contributors

andriipanasiuk avatar makarychev avatar veelenga avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

cybfootball's Issues

User login via facebook omniauth

In #7 we would implement a way to login admin. This ticket is about to sign in regular user so he would be able to do some action in our app, like adding comments to players/teams/tournaments, leaving some feedback or requesting changes in resources. This might be valuable, 'cause would help to reduce the mistakes in user names, descriptions etc.

We would like to support only omniauth, and for now facebook is enough.

http://sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin/

Anonymous updates

We want to allow anonymous updates. So real people by themselves could contribute.

  • Anonymous should be able to:

    1. Submit edits for tournament/team/player fields
    2. Submit new team/player
  • Anonymous should prove that he is a human using google captcha.

  • Submission should be approved by admin or trusted editors. They are going to see a list of submissions (ideally with a diff if this is an edit) and should be able to accept, reject or edit each submission.

  • Submission should be automatically deleted once it is processed.

Thoughts ?

Image cropper

Each team and player are going to have avatars. To be well shown to user on index page, avatars need to have equal sizes. For this we can use image cropper. Checkout this railscasts for details: http://railscasts.com/episodes/182-cropping-images?autoplay=true

Player avatar need to be squared, team avatar need to be rectangular (where w > h).

The same technic uses Github while uploading user avatar.

Static pages

We need to develop two additional pages:

  • "about" page which describes what this app for and what user can do here
  • "contact" page where user can contact us easily via https://formspree.io/

Coming release plans

The things to be done till we release:

  • setup production and stage envs.
  • #40
  • #41
  • #42
  • move to custom domain
  • make the repo public
  • prepare informational pages /about, /contact, /faqs

Better pagination

We think pagination with numbers of pages (i.e. Prev 1 2 3 4 5 6 7 8 Next) is useless. So this task is about add just two buttons Prev, Next

Save "per_page" across page reloads

We developed ajax pagination and it works nicely. But for now once user go to a different page (or just reload the current one), "per page" parameter is set to default (20). And this is really inconvenient if he prefers non-default per page value.

This task is about to save "per_page" value chosen by user on a particular page and use his last choice once he is again on this page. User should be able to have different "per page" preferred values for different pages.

Hint: use cookies or localStorage or what is more suitable for this kind of task.

Convenient way to create tournaments

Admin should have a very useful, simple and intuitive way to create new tournament.

Creating tournament means:

  • create new tournament (with date, description, number)
  • add teams
  • create group(s)
  • add matches
  • add players ( create if there is a new one )
  • add goals with authors

Ideally would be if the system could automatically create tables, calculate points, chose winner.

Tournament date field improvement

In bf23d76 (feature/tournament_date) I added a basic setup for a date field:

image

Please improve tournaments#edit & tournaments#new (the actual code is here) pages so the user will have a date field that will match the following requirements:

  • default date (while creating new tournament) should be today (this need to be set on model, here is example)
  • add validation to Tournament model, so we will validate the date on backend with min year: 1990, max year: current_year + 1. Checkout active_record_validations for details.

Please add tests accordingly.

Tournament.no field improvements

Tournament.no field represents a number of the tournament. This field is uniq and has a direct connection to the number of the tournament in the book (i.e. Tournament №50).

Currently user has to enter the no on his own (while creating a tournament), what is super inconvenient. Let's improve it with:

  1. Drop down (instead of a spin box) with available values 1..100 (+ validation on backend).
  2. Default value: latest used no + 1 (yes, that's it Tournaments.last.no + 1)

Internationalization support

Follow this guide to setup internationalization.

Supported languages: only ua
Fallbacks: en

Views, error/warning/info messages, pagination, model validation messages

Admin log-in using devise

Create sign-in page, login/logout actions:

https://github.com/plataformatec/devise

For now, only admin should be able to login, create/update/delete(CUD) resources and see CUD buttons/links. But probably in future we will let other users to be able to login, so we can start creating role model.

Also we have to deny access on controller side, so the user will not bypass. Each of those might help:

https://github.com/CanCanCommunity/cancancan
https://github.com/elabs/pundit
https://github.com/nathanl/authority

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.