Skip to content

An ethereum based distributed app to create democratic comunities, candidatures and vote candidates.

License

Notifications You must be signed in to change notification settings

moonline/Lab.Coterie.dapp

Repository files navigation

Coterie dApp

Ethereum Truffle Ganache Solidity Web3.js React Bootstrap

Create democratic communities stored on the Ethereum blockchain.

Create a candidature and get voted by existing members.

Vote other candidates and access member list.

Features

  • Smart contract based coterie and candidature creation
  • Candidature voting
  • Coterie, candidatures and members listing

Usage

Create a new Coterie

Create a candidature

Wait for votes

Check my candidature

Check and vote candidatures

List members

Vote candidate

Development

Environment

Install:

Recomended plugins to develop with Visual Studio Code

Install dependencies

yarn install
(cd client; yarn install)

Compile

yarn compile

Migrate

# start ganache network
yarn network
# run migrations
yarn migrate

Test

# start ganache network
yarn network
# run all tests
yarn test
# $ truffle test
# ...
#   37 passing (37s)
# Done in 47.36s.
# run only a specific file
yarn test test/Coterie.test.js
# run only tests matching regex
yarn test -g "should have a candidature"

Pretty print code

yarn format
cd client
yarn format

Run frontend

  1. prepare ganache network:
yarn network
yarn migrate
  1. Run frontend:
cd client
yarn start
  1. Opens the app in your primary navigator at localhost:3000.