HackVoter is a simple responsive web app to facilitate voting at hackathons written in Clojure.
It stores data about hacks and votes in DynamoDB
and has a few configurable elements to allow customisation.
The main parts of the app:
- the main page that lists the hacks and allows voting within the configured budget
- creation / editing of hack details
- admin functions to preview the votes coming in, allow editing and deletion and setting of the
voting stage
.
The voting stage is one of the following:
submission
- allow hacks to be registered before the demos and voting starts.votingallowed
- typically when the demos are underway and voting is allowed. Last minute submissions and changes are still allowed.completed
- no more submissions or votes - the winner is announced!
A hack consists of a title
, description
, creator
and an image - nice and simple.
Behind the scenes, a hack has a publicid
(used for the voting side of the app) and an editorid
(a private id that only the creator and admins have access to that allows editing and deletion).
FilePicker is used to handle image upload and storage - you'll need to sign up for a free account to get a key to enable this.
This isn't designed to be a bullet-proof web app, but there is validation around voting to stop smart-ass devs trying to cheat ;)
As part of the project properties, the following items can also be configured:
hacks-table
- the name of DynamoDB table name to use to store hack details. The app will automatically create the table as needed.readalloc-hack
/writealloc-hack
- read and write capacity to use for the hack table.hack-votes-table
- the name of DynamoDB table name to use to store votes - again automatically created when needed.readalloc-vote
/writealloc-vote
- read and write capacity to use for the votes table.
Voting is based on each person being allocated a certain number of votes to "spend". A limit can optionally be placed on the number votes that can be used on each hack to ensure people don't just vote for one.
currency
- the display name for the voting currency - for example, "you have 5 hack pounds available".allocation
- the total number of votes each person has to start with.max-spend
- the maximum number of votes each person can "spend" on a hack. Set this to the same asallocation
to remove this limit.
voting-stage
- as described above, one ofsubmission
,votingallowed
,completed
.admin-key
- a simple approach to locking down admin access - rather than username / password, this key is used to restrict access.filepicker-key
- your FilePicker account key.