Voting Web App -- 2

Job ID: 33563556

Budget: $250 – $750 USD

The voting app should run some electoral algorithms. The project has already been started so I will give you a git repo and branch to start making your modifications. You can modify the code as you wish but I expect frequent git commits as I want to learn from your progress aswell.
• Git Repo: < Will be provided >
Front-end
• I will provide layouts for each page on the 28/04/22 before 5 pm UK time

Back-End
There are 3 users
• Admin: The Normal admin privileges
• Host: This is the Host of the ballot
• Voter: This is the voter of a given ballot

The Host:
• On account creation the Host should be able to create new ballots.
• Ballots have the following parameters
o user_id
o title
o description
o start_date
o end_date
o access_token - Access token to enter the ballot
o show_voter_results - This flag is to decide whether the voter user can see the results of the ballot
• The host should be able to create a new ballot, add questions to the given ballot and add options to the given question.
• The host should be able to start the ballot immediately OR schedule the ballot to begin based on the start time specified
• At the end of the ballot the host should be able to view the results

The Voter:
• Voters will need to enter the ballot access_token to enter a given ballot
• After this they will be prompted to input a username
• If the ballot:
o Has not started the voter should be put into a waiting room
o If the ballot has started the voter should be able to see the question and choose their options

The Questions:
o This is where the app differs from a normal polling application
o After a ballot has been created the host should be able to add questions to the ballot. The host must select the question_type.
o The question_type selection should include the 2 election algorithms I specified and should also have the option “normal” for a normal poll.
 “normal” poll means that the option that receives the most votes win
 List PR using D'Hondt method would need an extra attribute of seats as per the attribute requirements. It is expected that the host can specify the number of seats.
o Questions have options. The host should be allowed to specify any number of options for the question. Options are what are used to calculate the results.
o Voters can either rank their favourite option from 1..N with 1 being the highest or select a singular option.
 if selecting a singular option only “normal” question_type would be available
 If the voter is ranking options List PR using D'Hondt method and Modified Borda count calculation are to be used

The voting algorithms
 Question_types are below. For the election algorithms there are some useful YouTube videos that explain how it works. I also have some code I did myself that implements the algorithm(although it’s very rough):
o Normal
o Modified Borda count
o List PR using D'Hondt method

 Bonus system
o Mixed Electoral system
 I will provide more details on this once I understand more. But this is how it will operate:
1. First-Past-the-Post using Modified Borda count would be used to elect a single option as the winner
2. List PR using D'Hondt method would be used to calculate the remainder of seats

Other Requirements :
• Frequent git commits so I can see the changes.
o Commit messages using the following standards. (example in the git tree)
 Feat<num>: (new feature for the user, not a new feature for build script)
 fix<num>:: (bug fix for the user, not a fix to a build script)
 docs<num>:: (changes to the documentation)
 style<num>:: (formatting, missing semi colons, etc; no production code change)
 refactor<num>:: (refactoring production code, eg. renaming a variable)
 test<num>:: (adding missing tests, refactoring tests; no production code change)
 chore<num>:: (updating grunt tasks etc; no production code change)
• Use RSPEC for tests
o Current testing paths
 spec/models
 spec/features
 spec/requests
Related categories: JavaScript Website Design Ruby on Rails Ruby jQuery