You'll need the following installed on your computer:
- Erlang.
- Rebar, a package manager for Erlang. Get it with the appropriate system package.
You can then use rebar to install the Erlang dependencies:
$ rebar get-deps
$ rebar compile
In order to point erl
at all of the deps we installed via Rebar, we have to
run it with:
erl -pa ebin deps/*/ebin
Then, from there, run:
manager:init().
You can then go to the following URL on your local machine provided port 8888 is not already bound to some other process and play with it:
http://localhost:8888
include/
- record declarationsvote.hrl
- frontend server config record
src/
- source filesvote.app.src
- tells rebar what to compilebooth.erl
- routes votes between UI and talliersfrontend.erl
- configures and starts YAWSfrontent_config.erl
- unpacksvote.hrl
frontend_sup.erl
- supervises YAWS started infrontend.erl
result_events.erl
- sends events fromwinner_collector.erl
winner_collector.erl
- collects winners from talliers, maintaining list of most recent winners, and allowing others to subscribe for notifications on changes
manager.erl
- starts everything, informs modules about each otherregistrar.erl
- assigns passwords and voting locations to others, prevents duplicate registations, notifies booths of valid passwordstally.erl
- implements tallierscount_map.erl
- maps, whose values are numbers, which are combined by adding valuespairwise.erl
- computes the graph of pairwise differences between candidatespoint_scheme.erl
- implements four schemes which assign points to candidatesschultze.erl
- the best voting schemevote_count.erl
- counts votesall_votes.erl
- lists all votesdebug.erl
- collection of debug utilities
www/
- YAWS view filesindex.yaws
- list of major pages in the web UImagic.yaws
- contains buttons to flush and simulate votesregister.yaws
- contains registration formregister_post.yaws
- processes registration form, shows success/fail messages
vote.yaws
- contains vote formvote_post.yaws
- processes vote, shows success/fail messages
winners.yaws
- displays winners