- The front app is deployed with heroku on https://alyravoting.herokuapp.com
- The smart contract is deployed on kovan on the address 0xBCd0a034222E20cC9073936309dae48514A421F3
- A demo vidéo is available on loom
First you need to clone the project
git clone git@github.com:JeremieSamson/alyra_voting.git
Then you will need to install the project dependencies, if you are familiar with docker there is a special instruction file for it.
In order to install all dependencies (ganache, truffle ...), please do like the following
npm install
// To install truffle globaly
npm install -g truffle
// To install ganache globaly
npm install -g ganache-cli
To run the project tests suite, do the following
// Run ganache localy
ganache-cli -h 127.0.0.1
// Run migrations
truffle migrate
// Launch test suite
truffle test
- 36 tests passing
- Every functions are tested
- 100% coverage
- ✔ Contract ownership
- ✔ Ownership has been transferred
- ✔ As a voter, I should not be able to get a vote if I am not registered
- ✔ As a voter, I should not be able to add a proposal yet
- ✔ As a voter, I should be able to get my own vote
- ✔ As a voter, I should be able to get others vote
⚠️
- ✔ As the owner, I can't add new voters after starting proposal registration
- ✔ As a voter, I should not be able to get a proposal if I am not registered
- ✔ As a voter, I should be able to get a proposal informations
- ✔ The workflow status must start with RegisteringVoters
- ✔ Only startProposalsRegistering can be done with RegisteringVoters status
- ✔ The workflow status must start with RegisteringVoters
- ✔ Only endProposalsRegistering can be done with ProposalsRegistrationStarted status
- ✔ The workflow status must start with ProposalsRegistrationStarted
- ✔ Only startVotingSession can be done with ProposalsRegistrationEnded status
- ✔ The workflow status must start with ProposalsRegistrationEnded
- ✔ Only startVotingSession can be done with ProposalsRegistrationEnded status
- ✔ The workflow status must start with VotingSessionStarted status
- ✔ Only the owner can add voters
- ✔ A voter can not access voters information if he has not been registered
- ✔ A voter can be registered
- ✔ An address could not be registered more than once
- ✔ Only a voter can add a proposal
- ✔ A voter can't add an empty proposal
- ✔ A voter can add a proposal
- ✔ A voter can add another proposal
- ✔ Only a voter can vote
- ✔ A voter can't vote on a wrong status
- ✔ A voter can not vote on an inexisting proposal
- ✔ A voter can vote on an existing proposal
- ✔ A voter can not vote another time
- ✔ A proposal should be incremented after a vote
- ✔ Only the owner can tally
- ✔ A owner can't tally on a wrong status
- ✔ A owner can tally
- ✔ The winningProposalID must be proposalIdLoremDolor after tally
- ✔ The workflow status must be equal to VotesTallied after tally
The list of feature for the project can be found here