Skip to content

Commit

Permalink
voting schemes readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Dec 20, 2023
1 parent a916515 commit 528e147
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
6 changes: 5 additions & 1 deletion bulletin_board/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ The Bulletin Board is a service composed by an Encryption Engine and an Append-O
- System dependencies:
- Python gmpy2 package dependencies: libgmp, libmpfr and libmpc

The Bulletin Board is intended to use alongside a Decidim installation. It's main purpose is to provide a GraphQL interface to a secure, auditable and verifiable voting system. This is currently achieved by using the [ElectionGuard python implementation](https://github.com/microsoft/electionguard-python), developed by Microsoft. So this server acts as a wrapper to the ElectionGuard python code.
The Bulletin Board is intended to use alongside a Decidim installation. It's main purpose is to provide a GraphQL interface to a secure, auditable and verifiable voting system. This is currently achieved by using the [ElectionGuard python implementation](https://github.com/microsoft/electionguard-python), developed by Microsoft. So this server acts as a [wrapper to the ElectionGuard python code](../../voting_schemes/electionguard/python-wrapper).

See how python code is executed using PyCall here:
- https://github.com/decidim/decidim-bulletin-board/blob/develop/bulletin_board/server/app/services/voting_scheme/electionguard/voter.rb
- https://github.com/decidim/decidim-bulletin-board/blob/develop/bulletin_board/server/app/services/voting_scheme/electionguard/bulletin_board.rb

Please check the [main documentation](../../README.adoc) for this repository for more convenient ways to run the Bulletin Board.

Expand Down
14 changes: 6 additions & 8 deletions voting_schemes/dummy/ruby-adapter/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# VotingSchemes::Dummy

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/voting_schemes/dummy`. To experiment with that code, run `bin/console` for an interactive prompt.

TODO: Delete this and the text above, and describe your gem
The Bulletin Board is a generic API for storing and retrieving ballots and tallies for elections. The final implementation of the protocol used for creating an election may vary. This gem provides a dummy implementation for testing purposes.

## Installation

Expand All @@ -22,14 +20,14 @@ Or install it yourself as:

## Usage

TODO: Write usage instructions here
This implementation is intended for testing purposes only. It allows to test the Bulletin Board without the need to use a fully configured Decidim installation.
It also skips the encryption and decryption steps, so it is not suitable for production use.

## Development
You can [start the server](../../bulletin_board/server) in development mode and connect to the built-in testing admin sandbox at:

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
http://localhost:3000/sandbox

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/voting_schemes-dummy.
Bug reports and pull requests are welcome on GitHub at https://github.com/decidim/decidim-bulletin-board/issues.
19 changes: 11 additions & 8 deletions voting_schemes/electionguard/ruby-adapter/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# VotingSchemes::Electionguard

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/voting_schemes/electionguard`. To experiment with that code, run `bin/console` for an interactive prompt.
The Bulletin Board is a generic API for storing and retrieving ballots and tallies for elections. The final implementation of the protocol used for creating an election may vary. This gem provides the [Microsoft's ElectionGuard](https://github.com/microsoft/electionguard-python) Javascript implementation for production use in Decidim.

TODO: Delete this and the text above, and describe your gem
Note that the ElectionGuard implementation works by using two different wrappers around Electionguard:

- A [Python Wrapper](../python-wrapper) for its use in the backend of the [GraphQL API server](../../../bulletin_board/server).
- A [Javascript Wrapper](../js-adapter) that compiles the whole Electionguard python app into web-assembly and allows to use it in the frontend (this ensure that the voting process is not tampered by sending any data to the backend).

This gem provides a very simple gem that wraps the Javascript implementation and allows to use it in the frontend of a Decidim application (Elections module).

## Installation

Expand All @@ -22,14 +27,12 @@ Or install it yourself as:

## Usage

TODO: Write usage instructions here

## Development
You can see examples of usage by looking at the Decidim Elections module:

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
- https://github.com/decidim/decidim/blob/develop/decidim-elections/app/packs/src/decidim/elections/voter/casting-vote.js
- https://github.com/decidim/decidim/blob/develop/decidim-elections/app/packs/src/decidim/elections/election_log.js

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/voting_schemes-electionguard.
Bug reports and pull requests are welcome on GitHub at https://github.com/decidim/decidim-bulletin-board.

0 comments on commit 528e147

Please sign in to comment.