Coder Social home page Coder Social logo

isabella232 / student_21_d-voting_admin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dedis/student_21_d-voting_admin

0.0 0.0 0.0 1.92 MB

Administration tools for the D-Voting student project, spring 2021.

JavaScript 88.43% CSS 9.83% HTML 1.73%

student_21_d-voting_admin's Introduction

Front-end of the DELA evoting system

This project is the front-end part of an evoting system based in dela, a distributed ledger from the DEDIS lab.

It allows the user to create a new election, close/cancel it and also vote on on-going elections. All the elections and their operations are saved on smart contracts from dela.

There is currently no real authentication mechanism, simply a login button that gives an id and a token to a user. When a user cast a vote, his/her vote is encrypted using the dkg public key of the nodes running the dela system. The anonymity of a voter is not guaranteed, only the content of the vote meaning that it is possible to know who voted. It needs to have Dela nodes running every time you want to run the frontend web-application. The user interface uses React, a javascript library. You can find the instruction about running a react-app in the app folder.

Installation instruction of Dela library

For the front-end to work, you need to have 3 dela nodes running on your computer. To do that, you first need to clone the dela/dedis repository and then go on the d-voting-code-refactoring branch. Memcoin is the default CLI to handle Dela nodes. You can find it in “cli/node/memcoin”. Be sure to run “go install” in it and add GOPATH/bin to your PATH environment. You also need to run "go install" in cli/crypto.

Running the Dela nodes

For all the following instruction, you should be in the dela folder. Then run :

LLVL=info memcoin --config /tmp/node1 start --port 2001
LLVL=info memcoin --config /tmp/node2 start --port 2002
LLVL=info memcoin --config /tmp/node3 start --port 2003

Now run the file 3nodes.sh (that can be found in the dela folder).

You also need to run

 memcoin --config /tmp/node1 dkg export
 memcoin --config /tmp/node2 dkg export
 memcoin --config /tmp/node3 dkg export

These 3 commands will display in the terminal 'addressOfNode:keyOfNode', information that you will need to update a front-end file as described in the following section.

Updating the address and the public key of the Dela node

Every time you run the 3 nodes, their address and their public key might change so you need to hardcode those in the app/src/components/utils/CollectiveAuthorityMembers.js that can be found in this repository. You need to update const address1, PK1, address2, PK2, address3, PK3 with the values obtained in the previous section.

Dependencies

The project uses the following external libraries:

Running the tests

The unit tests can be found in src/components/test folder. They can be run with npm run test.

student_21_d-voting_admin's People

Contributors

santille avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.