Skip to content
Abakus Decision System
JavaScript HTML Gherkin CSS Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Refactoring some serial code and add error page Feb 4, 2020
bin Fix deprecation errors, set mocha to 3000ms Jan 28, 2020
client Fix redirect and fix docs Feb 4, 2020
deployment
features Move moderator tests to own file, and fix old test Feb 4, 2020
public Add webpack dev server Mar 3, 2016
test Fix race condition and add test Feb 18, 2019
.dockerignore Fix redirect and fix docs Feb 4, 2020
.drone.yml Move rest to node v13 Jan 14, 2020
.eslintrc Qr v2 2 Feb 18, 2019
.gitignore Add public/*.js to gitignore Feb 18, 2019
.npmrc JSHint/JSCS -> ESLint Feb 13, 2016
Dockerfile Move rest to node v13 Jan 14, 2020
LICENSE Update README and LICENSE Jan 14, 2020
README.md Fix redirect and fix docs Feb 4, 2020
app.js Fix deprecation errors, set mocha to 3000ms Jan 28, 2020
docker-compose.yml Fix race condition and add test Feb 18, 2019
env.js Fix race condition and add test Feb 18, 2019
index.js PRETTIER LIFE Jan 23, 2018
package.json Bump to v.1.3.0 Feb 4, 2020
server.js Even more docs Feb 17, 2019
usage.yml Update Update Feb 4, 2020
webpack.config.js Move login code to webpack Feb 14, 2019
yarn.lock Move from bcrypt to bcryptjs Jan 14, 2020

README.md

vote DroneCI Coverage Status dependencies Status devdependencies Status

vote optimizes the election

Digital voting system for Abakus' general assembly, built using the MEAN-stack (mongoDB, Express, AngularJS, Node.js). Relevant (Norwegian) blog post: http://webkom.abakus.no/vote/

vote

Setup

vote assumes you have a MongoDB-server running on mongodb://localhost:27017/vote. To change the URL, export MONGO_URL as an environment variable.

$ git clone git@github.com:webkom/vote.git
$ cd vote

# Start MongoDB-server
$ docker-compose up -d

$ yarn

# Create a user via the CLI. You are promted to select usertype.
$ ./bin/users create-user <username> <cardKey>

Usage

vote uses a RFID-reader to register and activate/deactivate users. This is done to make sure that only people that are at the location can vote. The RFID-reader needs to be connected to the computer that is logged in to the moderator panel.

An example deployment can be found in the ./deployment folder.

Development

$ yarn start

Environment variables

  • MONGO_URL
    • Url to the database connection
    • default: mongodb://localhost:27017/vote
  • REDIS_URL
    • Hostname of the redis server
    • default: localhost
  • LOGO_SRC (optional)
    • Url to the main logo on all pages
    • default: /static/images/Abakule.jpg
  • COOKIE_SECRET
    • IMPORTANT to change this to a secret value in production!!
    • default: in dev: localsecret, otherwise empty

See app.js for the rest

Production

$ yarn build
$ LOGO_SRC=https://my-domain.tld/logo.png NODE_ENV=production yarn start

Tests

vote uses mocha for the backend tests and cucumber.js/protractor for the frontend tests. To run them all you can do:

$ yarn test
# To run in headless mode:
$ HEADLESS=true yarn test

Vote occasion

We have a list of every occasion vote has been used. If you or your organization use vote for your event we would love if you made a PR where you append your event to the list.

The list is located at ./usage.yml. Just create a new entry at the bottom.


MIT © webkom, Abakus Linjeforening

You can’t perform that action at this time.