Welcome, and thank you for considering contributing to COVID Shield!
We’d love to get your issues (if you find any bugs) and PRs (if you have any fixes)!
First, please review this document and the Code of Conduct.
COVID Shield takes security very seriously. In the interest of coordinated disclosure, we request that any potential vulnerabilities be reported privately in accordance with our security policy.
If you'd like to contribute a documentation or static file change, please feel free to fork the project in Github and open a PR from that fork against this repository.
If you'd like to contribute code changes, the following steps will help you
setup a local development environment. If you're a Shopify employee, dev up
will install the above dependencies and dev {console,test,etc.} will work
as you'd expect.
If you're not at Shopify, please see below.
Once you're happy with your changes, please fork the repository and push your code to your fork, then open a PR against this repository.
The setup steps expect the following tools to be installed on the system:
1. Ruby - 2.7.1
You can use rbenv or rvm to install the specific version you need.
Example using rvm:
rvm install 2.7.1
rvm use 2.7.12. MySQL - 5.7
You can use the official MySQL installer or you can use homebrew.
Example using homebrew:
brew install mysql
brew services start mysqlYou can use the official Node.js installer or nvm.
Example using nvm:
nvm install 12.17.0
nvm use 12.17.0You can use the official installation script or homebrew.
Example using homebrew:
brew install yarngem install rails -v 6.0.3.1You will need to follow the instructions for setting up the Diagnosis Server.
git clone git@github.com:CovidShield/portal.gitThere are several environment variables you can set to configure the application.
To configure these:
cp config/local_env.yml.sample config/local_env.yml- Open
config/local_env.ymland edit the values as needed
The available variables you can configure are:
DATABASE_HOST- The host the MySQL server is running on (defaults tolocalhost)DATABASE_USER- The user MySQL is configured with for acces (defaults toroot)DATABASE_PASSWORD- The password for the MySQL user (defaults to blank)KEY_CLAIM_HOST- The host the COVID Shield server is running onKEY_CLAIM_TOKEN- The token the COVID Shield server is configured to use
bundle install
yarn installRun the following commands to create and set up the development database.
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seedYou can start the rails server using the command given below replacing the KEY_CLAIM_HOST to match the URL of your running diagnosis server config and the KEY_CLAIM_TOKEN to match the token it is running with.
bundle exec rails serverAnd now you can visit the portal with the URL http://localhost:3000
The default username and password is admin@covidshield.app and password.
bundle exec rails testbundle exec rails test:system