VotingWorks Ballot Marking Device
master branch of this repo is auto-deployed to:
Each pull request will have a unique demo url which can be found in the comments of the pull request.
Install and Run App Locally
This assumes you have
Clone the repo:
git clone https://github.com/votingworks/bmd.git
Run the app in your local browser:
Hey, we’re stoked that you’d like to contribute. Please let us know how we can help you contribute.
Fork this repo: https://github.com/votingworks/bmd
Clone the repo locally:
git clone https://github.com/YOUR_GITHUB_USERNAME/bmd.git
Optionally, if you already cloned the main repo, you can update your local repo to have two remotes,
votingworksfor the main repo and
originfor your fork:
git remote rename origin votingworks git remote add origin https://github.com/YOUR_GITHUB_USERNAME/bmd.git
Create a branch for the feature/bug/etc:
git checkout -b name-of-your-branch
Run the app:
In a second console window, run the tests:
Tests default to watch-mode: only tests related to changed code will run. Use the available commands in watch-mode to run the tests you want.
Add features, fix bugs, etc. and then use
gitto commit your changes in logical commits.
There is a pre-commit hook (see
lint-stagedin package.json) which will run linting and code formatting scripts. You can run these manually with these commands which are found in the
yarn lint yarn format
Using Visual Studio Code? Autorun linting and code formatting by installing/enabling/disabling the following plugins (which will pick up the respective config files in this project):
TSLintas ESLint handles this functionality
stylelintfor modern CSS linting
Prettier - Code formatterfor code formatting
Check for test coverage. When you push your branch to github, CircleCI will run all the tests and check for test coverage. To check this yourself, run:
In the root of the project there is a
coverage/lcov-report/index.htmlin a browser to navigate the files to view test coverage.
Push your branch to your fork on Github.
Create a pull request to merge your branch into
voingworks/bmd/master. Once the pull request is created CircleCI will automatically run all the tests to ensure the app is working correctly.
The VotingWorks maintainers will
Local Development Scripts
yarn install- Install the dependencies.
yarn start- Run the app locally.
yarn test- Run tests in interactive mode.
yarn test:coverage- Run all tests and update test coverage report.
package.json for all available scripts.
This project was bootstrapped with
Create React App for TypeScript.
It uses Styled Components for styles
css files too). ESLint is configured to lint
Prettier. stylelint is used to
lint modern css. Jest,
and Cypress are used to test components and
end-to-end user flows.
This material is based upon work supported by the Defense Advanced Research Project Agency (DARPA) under Contract No. HR0011-18-C-0013. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of DARPA.
Distribution Statement "A" (Approved for Public Release, Distribution Unlimited)