Skip to content
/ nota Public

"None Of The Above" - is going to be a secure online voting system, intended to give the electorate better choices. It always adds one additional choice to anything to be voted on: If more than 50% of voters choose "None of the Above", the election is considered null and void.

License

Notifications You must be signed in to change notification settings

Adaptech/nota

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTA ("None Of The Above") will be a secure online voting system. We are building it at https://www.meetup.com/DDD-CQRS-ES/. We develop example DDD/CQRS/ES systems on a regular basis as part of the meetup.

See also: https://github.com/Adaptech/notasimulator

Requirements

Below is the result of the event storming we did for this system:

NOTA Minimum Viable Event Storm

Functionality

For what you can do and what events happen as a result, see src/commands and src/events:

  • CreateElectionAdmin
  • CreateOrganization
  • CreateReferendum
  • RegisterVoter
  • OpenPolls
  • AuthenticateVoter
  • CastVote
  • ClosePolls
  • DeleteReferendum

Getting Started

Installing & running the event store

See https://geteventstore.com/downloads/ .

  • unzip at ~/
  • cd into extracted folder
  • ./run-node.sh (start event store) or ./run-node.sh --int-ip=0.0.0.0 --ext-ip=0.0.0.0 if running in a Vagrant box
  • For the admin UI, go to http://localhost:2113
  • login: admin pass: changeit (defaults)

Installing & running the API

Change to api directory

cd api

Install modules

npm install

Run the API

npm start

Run the unit tests

npm test

Run the API integration tests

  1. Find the eventstore data folder and delete everything in it; the tests won't pass if there are results from a previous run.
  2. Start eventstore
  3. cd api
  4. Delete any existing read model data: rm -fr db
  5. Start API: npm start.
  6. Run the tests: npm run test-api

Exploring the API

  1. Install https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop
  2. In Postman, import the api/noneoftheabove-localhost.postman_environment.json environment. (Top right in Postman: "Cogwheel-thingy" -> "Manage Environments" -> "Import")
  3. Import the collection api/noneoftheabove.postman_collection.json. (Top left in Postman: "Import" button.)

The collection has examples of API calls.

Installing & running the web app

Change to web directory

cd web

Install modules

npm install

Run the web application

npm start

View the web application

Open localhost:3000

About

"None Of The Above" - is going to be a secure online voting system, intended to give the electorate better choices. It always adds one additional choice to anything to be voted on: If more than 50% of voters choose "None of the Above", the election is considered null and void.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published