Code Monkey home page Code Monkey logo

cubecomp's Introduction

Build Status

Cubecomp

Cubecomp is a web application written in Ruby on Rails which is used by several members of the World Cube Association (WCA) and volunteers around the world to organize Rubik's Cube competitions.

The website features a rich adminstration interface with many useful features for competition organizers, such as creating a public website with a registration form, creating event schedules, confirming competitor registrations, generating printable nametags, and much more.

Since early 2009, cubecomp (or earlier versions of it) has been used to host over 85 different competitions in at least 5 different countries around the world.

Cubecomp is free and open source, published under the MIT license.

How do I use cubecomp?

If you are a competition organizer and want to use cubecomp to host your website, you can either run it on your own server or you can use our hosted version on https://cubecomp.de. Please send an email to [email protected] if you would like us to create an account for you.

Can I use your hosted version of cubecomp, but use a different domain?

We can make this work. Send an email to [email protected].

Cubecomp doesn't support my country's native language

I'm happy to add more languages. Send an email to [email protected] and we can work on a translation (or take a look at config/locales/en.yml and send me a translated version of that for your language).

Screenshots

Screenshots

Getting started

Requirements

  • Ruby 2.2 or higher
  • MySQL or SQLite
  • gem and bundler

Development

Clone the repository:

git clone [email protected]:fw42/cubecomp.git
cd cubecomp

Install dependencies:

bundle install

The default database is MySQL. If you want to use SQLite, please edit "config/database.yml" and "Gemfile" accordingly and run bundle install.

Generate the database:

bundle exec rake db:setup db:seed:themes

Import the WCA database:

bundle exec rake db:load_wca_schema db:seed:wca db:seed:countries

Generate an example competition and some example users:

bundle exec rake db:seed:example_competition

Start a local webserver:

bundle exec rails server

Visit http://localhost:3000/admin in a browser and log in with email "[email protected]", password "admin123".

cubecomp's People

Contributors

cubizh avatar dependabot[bot] avatar fw42 avatar laura-o avatar sauroux avatar timhabermaas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cubecomp's Issues

missing former feature: show guests

I just noticed that the guests are now shown on the public website. The former version had an option to handle this.

As the guests being shown on the pulic registration list is almost never desirable, I propose to either bring back the old option to manage this or to not display guest by default.

emails

implement a basic mailer to send emails to competitors (confirmation when competitor state changes from new to confirmed). in the old software, you can save a mail template for things like that on the competition.

I suggest we also use https://github.com/Shopify/liquid for the templating here instead of those ugly text-replace hacks I did in the old app...

looks like this in the old app:

screen shot 2014-10-01 at 10 38 34 pm

screen shot 2014-10-01 at 10 40 00 pm

financial statistics

the old app shows a financial overview to tell organizers how much they will make from the entrance fees. also allows them to compare pricing models.

looks like this:

screen shot 2014-10-01 at 11 52 42 pm

So a todo item here would be to implement something similar. needs to take into account:

  • Day#entrance_fee_guests
  • Day#entrance_fee_competitors
  • Competitor#guest_on?(day) vs. Competitor#competing_on?(day)
  • Competitor#free_entrance?

The old code also had an option to set the competition to use "alternative pricing model" where you would define a price for the whole competition rather than for each day individually. The statistics (the $2 column) then shows which pricing model would lead to how much money.

I think we should restructure this a little bit and add another pricing model.

I would like to compare the following three and have an option in the settings to select which one you want:

  • each day has it's own price
  • you pay a fixed price for the whole competition, regardless of which days you register for
  • you pay a fixed price for the whole competition, but only if you sign up for all days (to encourage people to come on all days)

for each of those 3, we should always be able to differentiate between competitor price and guest price.

might be useful to have two of those tables, one for "confirmed" competitors and one for "new" competitors maybe? not sure if that makes sense

ajax destroys

destroying an item from a table (competitor, theme file, user, competition, ...) should not reload the whole page but destroy the item via ajax and remove the table row from the dom

request: devide users in admin section

After having learned that old users need to remain for different purposes, I'd like to have the users grouped in "allowed to login: yes" and "allowed to login: no", with the former users being listed first of course.

This way, it is way easier to manage the truely active users and not having them mixed up with the majority of users that only need to remain for other purposes.

Psych sheets

Old software has this feature to compare past results of registered competitors:

screen shot 2014-12-05 at 6 21 48 pm

@timhabermaas, how hard is this to do with your API?

Add quiet_assets to minimize log noise

Started GET "/assets/codemirror/modes/htmlmixed.js?body=1" for 127.0.0.1 at 2014-10-03 00:41:10 +0200


Started GET "/assets/codemirror/modes/xml.js?body=1" for 127.0.0.1 at 2014-10-03 00:41:10 +0200


Started GET "/assets/codemirror/modes/javascript.js?body=1" for 127.0.0.1 at 2014-10-03 00:41:10 +0200


Started GET "/assets/codemirror/modes/css.js?body=1" for 127.0.0.1 at 2014-10-03 00:41:10 +0200

I don't care...

Minor comments for creating a new competition

  • the checkboxes for both languages German and English should better be selected by default (also, they are unselected once a submit was not successful)
  • the entrance fee text boxes are required to be filled when creating a competition. However, the person creating a competition usually is not aware of those. I suggest a default value of 0 to fix this.
  • when a new competition day is added, the default date shows January 1st 2010. If not too much work, the subsequent days of the previously set day would be a way better default.

Show number of WCA competitions for competitor in Checklist

The old software had this feature where we showed the number of competitions for a competitor if it was a special number (like multiples of 10). See here.

Not sure how best to do this now that the WCA db is an external service and not sure if the API even supports that yet. Ideally, we would do some kind of batch request and not do one request for each competitor.

@timhabermaas, thoughts?

automated vulnerability reports

I added the bundler-audit gem which can generate a report of the gems in your Gemfile that have known security vulnerabilities. We should have those reports either as part of test runs or in a cronjob with email notifications or something like that.

Something like that might already exist as a free service?

"Are you sure?" delete links show dependent_destroy counts

When clicking various "delete" buttons, we show a popup that asks "Are you sure?". Some models (competition for example) have several dependent_destroy associations. Would be nice if counts for those would be shown in the popup, e.g. "Are you sure you want to delete this competition? This will also delete 17 competitors, 3 theme files, 2 email templates, ...".

printable schedules

the old software has an action to display printable schedules, centred in a very basic layout. we need to have the same for the new app.

screen shot 2014-10-01 at 11 37 08 pm

Alternative financial model support

The settings page only supports entering entrance fees for individual days and then calculates the price for multiple days by adding the values.
The payment system I'm using costs 7.50 euros for either single day but 10 euros for both days instead of 2*7.50 = 15. I'd like to have an option to enter such an alternative price model (which existed in the old admin panel, afaik?) so that the dashboard financial calculations are correct.

Show previous WCA stats on nametags

The old software had this feature for nametags. Would be fancy to have the same here (nametags already exist, just not the WCA stats in the bottom line).

screen shot 2014-12-05 at 6 17 24 pm

Again the question: Should we do this once and then cache it or do it in a batch every time the nametags page is rendered?

@timhabermaas

Competitor registration error

Registering a competitor from the user interface for GO15 I get this error:
"Event registration event is not for registration".
I only get this with some combinations of events and couldn't reproduce when. Registering as guest works.

bildschirmfoto 2015-04-05 um 12 36 51
bildschirmfoto 2015-04-05 um 12 36 41

connect with WCA database

should be able to pull a couple of things from the WCA db, based on a competitors WCA id.

  • first name, last name, gender, country (to autocomplete registration form)
  • best single and best average time for a given category (for comparison sheets)
  • number of competitions attended (for nametags)
  • position in wca ranking (global/national, single/average, ...)
  • ...

Entrance fee valiations too restrictive?

ActiveRecord::RecordInvalid: Validation failed: Entrance fee guests must be greater than 0

So, there's no way to host a competition with no entrance fee? Or do I miss some free flag somewhere?

Suggest corrections for typos in email address etc.

One common problem in the old website was that people would often misspell their own email addresses which then would have to be manually corrected (if even noticed at all).

Would be nice to match a new competitor registration to existing registrations with the same name or same WCA ID and suggest a correction if the email address of the new registration is different than an email address of an old registration.

Also suggest fixes for common typos (such as .co instead of .com).

Nametags too large

The nametags are obviously larger than before.
For the nametags we usually use they should be about 8,9 x 5,3 cm

Remove empty files

There are a bunch of (auto generated) files with no content:

  • Helpers
  • CSS files
  • CoffeeScript files

Add button for "already paid"

image

With our frequently used pre-payment system this has to be selected for almost all competitors, currently by editing the person, scrolling, checking the right check box and saving, which is quite annoying.

Password reset feature

There should be a "reset password" link on the login page that sets a reset token on the User model and sends an email to the user's email address with a URL that has the token in it. Using that URL, the user should be able to set a new password. (reset tokens should be hashed as well)

Readme

Should have a README with some basic instructions on how to get this app running locally and remotely, how to contribute, etc.

Entrance fees automatically displayed on registration page

This is actually more an issue than a feature:

  • it is misleading if competitions have combined fees for multiple days, like 10€ for one day, 15 € for two days, which is quite common
  • for German Open 2015, I had entered 4,55 € as this is what I receive after Paypal removes its fees. I didn't know that this was automatically displayed somewhere and was told by someone who noticed it today.
  • also, after now entering "5", the page shows "5.0 €"

I think I would prefer to simple remove this from the registration page.

Mobile compatibility issue on Android

Trying to access the website on Android 5.1, Firefox Mobile 37.0.1 by simply typing the URL (no typos) results in:
"An error occured during a connection to admin.cubecomp.de. The OCSP server has no status for the certificate. (Error code: sec_error_ocsp_unknown_cert)"

force ssl

Admin area should be forced to SSL (and everything else should work with both SSL and non-SSL).

Three tests fail because of some timezone issue

  1) Failure:
Admin::NewsControllerTest#test_#create [/Users/tim/Projects/cubecomp/test/controllers/admin/news_controller_test.rb:44]:
--- expected
+++ actual
@@ -1 +1 @@
-2014-09-11 11:30:00 +0200
+Thu, 11 Sep 2014 11:30:00 UTC +00:00



  2) Failure:
Admin::NewsControllerTest#test_#update [/Users/tim/Projects/cubecomp/test/controllers/admin/news_controller_test.rb:68]:
--- expected
+++ actual
@@ -1 +1 @@
-2014-09-11 11:30:00 +0200
+Thu, 11 Sep 2014 11:30:00 UTC +00:00



  3) Failure:
Admin::EventsControllerTest#test_#update [/Users/tim/Projects/cubecomp/test/controllers/admin/events_controller_test.rb:69]:
Expected: "13:00"
  Actual: "15:00"

222 runs, 711 assertions, 3 failures, 0 errors, 0 skips

Editting registration comments

I'd like to be able to edit registration comments as it was possible in the previous version.

The goal is, to remove unnecessary information from the checklist, usually by removing the registration comment and aggregating important information as an admin comment.

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.