Skip to content

Commit 239c148

Browse files
Move around + clean up documentation (#67)
* move the contribution docs, update stale links, and add missing information. * address feedback * organize contribution guide for portal * switch to 8000
1 parent a640529 commit 239c148

File tree

3 files changed

+85
-116
lines changed

3 files changed

+85
-116
lines changed

CONTRIBUTING.md

+77-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,90 @@
1-
# Contributing
1+
# Contributing Guidelines
22

3-
Thank you for considering contributing to COVID Shield!
3+
Welcome, and thank you for considering contributing to COVID Shield!
44

55
We’d love to get your issues (if you find any bugs) and PRs (if you have any fixes)!
66

7+
- [Code of Conduct](#code-of-conduct)
8+
- [Reporting Security Issues](#reporting-security-issues)
9+
- [Contributing](#contributing)
10+
- [Contributing Documentation](#contributing-documentation)
11+
- [Contributing Code](#contributing-code)
12+
- [Running COVID Shield](#running-covid-shield)
13+
- [From Scratch](#from-scratch)
14+
15+
## Code of Conduct
16+
717
First, please review this document and the [Code of Conduct](CODE_OF_CONDUCT.md).
818

9-
## Contributing documentation and non-code changes
19+
## Reporting Security Issues
20+
21+
COVID Shield takes security very seriously. In the interest of coordinated disclosure,
22+
we request that any potential vulnerabilities be reported privately in accordance with
23+
our [security policy](SECURITY.md).
24+
25+
## Contributing
26+
27+
### Contributing Documentation
1028

1129
If you'd like to contribute a documentation or static file change, please
12-
feel free to fork the project in Github and open a PR from that fork against
13-
this repository.
30+
feel free to fork the project in Github and open a PR from that fork against this repository.
31+
32+
### Contributing Code
1433

15-
## Contributing code
34+
If you'd like to contribute code changes, the following steps will help you
35+
setup a local development environment. If you're a Shopify employee, `dev up`
36+
will install the above dependencies and `dev {console,test,etc.}` will work
37+
as you'd expect.
1638

17-
If you'd like to contribute code changes, please first setup a local development
18-
environment following [the steps outlined in the README](README.md#local-development).
39+
If you're not at Shopify, please see below.
1940

2041
Once you're happy with your changes, please fork the repository and push your
2142
code to your fork, then open a PR against this repository.
43+
44+
## Running COVID Shield
45+
46+
### From Scratch
47+
48+
#### Prerequisites
49+
50+
The setup steps expect the following tools to be installed on the system:
51+
52+
* [Ruby](https://guides.rubyonrails.org/getting_started.html#installing-ruby)
53+
* [MySQL](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/)
54+
* [Node.js](https://guides.rubyonrails.org/getting_started.html#installing-node-js-and-yarn)
55+
* [Rails](https://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project-installing-rails-installing-rails)
56+
* [COVID Shield Diagnosis Server](https://github.com/CovidShield/server)
57+
58+
#### Running
59+
60+
1. Check out the repository
61+
62+
```bash
63+
git clone git@github.com:CovidShield/portal.git
64+
```
65+
66+
2. Update database.yml file
67+
68+
Update the database.yml file with your MySQL configuration as required.
69+
70+
3. Create and set up the database
71+
72+
Run the following commands to create and set up the database.
73+
74+
```ruby
75+
bundle exec rake db:create
76+
bundle exec rake db:setup
77+
bundle exec rake db:seed
78+
```
79+
80+
4. Start the Rails server
81+
82+
You can start the rails server using the command given below (replacing the KEY_CLAIM_HOST to match your running diagnosis server config).
83+
84+
```ruby
85+
KEY_CLAIM_HOST=localhost:8000 bundle exec rails s
86+
```
87+
88+
And now you can visit the site with the URL http://localhost:8000
89+
90+
The default username and password is `admin@covidshield.app` and `password`.

README.md

+2-108
Original file line numberDiff line numberDiff line change
@@ -15,115 +15,9 @@ The use of this portal is optional and you can easily integrate the code creatio
1515
- [Design files on Figma](https://www.figma.com/file/b76OYDhkTKJCaqDfVQybQY/Open-Source-COVID-Shield?node-id=68%3A167)
1616
- [Glossary of terms](https://github.com/CovidShield/rationale/blob/master/GLOSSARY.md)
1717

18-
## Local development
18+
## Contributing
1919

20-
### Prerequisites
21-
22-
The setup steps expect the following tools to be installed on the system:
23-
24-
- [Ruby](https://guides.rubyonrails.org/getting_started.html#installing-ruby)
25-
- [Rails](https://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project-installing-rails-installing-rails)
26-
- [MySQL](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/)
27-
- [Node.js](https://guides.rubyonrails.org/getting_started.html#installing-node-js-and-yarn)
28-
- [Webpack](https://github.com/webpack/webpack#install)
29-
- [Yarn](https://yarnpkg.com/getting-started/install#global-install)
30-
- [COVID Shield Diagnosis Server](https://github.com/CovidShield/server)
31-
- [Docker/Docker Compose](https://docs.docker.com/get-started/#set-up-your-docker-environment)
32-
33-
### Check out the repository
34-
35-
```bash
36-
git clone git@github.com:CovidShield/portal.git
37-
```
38-
39-
### Install dependencies
40-
41-
```bash
42-
# If you don't have the bundler gem, do this next line too:
43-
# gem install bundler
44-
45-
bundle install
46-
```
47-
48-
On MacOS, you may get issues installing the `mysql2` Gem. If you have [Homebrew](https://brew.sh/), you can install it this way:
49-
50-
```bash
51-
brew install mysql openssl
52-
gem install mysql2 -- --with-cflags=\"-I/usr/local/opt/openssl@1.1/include\" --with-ldflags=\"-L/usr/local/opt/openssl@1.1/lib\"
53-
bundle install
54-
```
55-
### (Optional) Create a new MySQL Database using Docker
56-
57-
If you don't already have a local MySQL database, you can create one easily.
58-
59-
First, create a directory for the local data storage:
60-
61-
```bash
62-
mkdir mysql-data
63-
```
64-
65-
Second, start the database using Docker:
66-
67-
```bash
68-
docker run -it --rm -p 3306:3306 --name portal-db -v $PWD/mysql-data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=stayhealthy -d mysql
69-
```
70-
71-
This will create a database with the following properties:
72-
73-
- IP: `127.0.0.1`
74-
- Port: `3306`
75-
- User: `root`
76-
- Password: `stayhealthy`
77-
78-
To kill it later, use:
79-
80-
```
81-
docker kill portal-db
82-
```
83-
84-
### Update database.yml file
85-
86-
Update the [database.yml](config/database.yml) file with your MySQL configuration as required.
87-
88-
If you're using the Docker-based MySQL from the above section, your `default` section will look like this:
89-
90-
```yaml
91-
default: &default
92-
adapter: mysql2
93-
encoding: utf8mb4
94-
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
95-
username: root
96-
password: stayhealthy
97-
host: 127.0.0.1
98-
```
99-
100-
### Create and set up the database
101-
102-
Run the following commands to create and set up the database.
103-
104-
```ruby
105-
bundle exec rake db:create
106-
bundle exec rake db:setup
107-
bundle exec rake db:seed
108-
```
109-
110-
### Start the Webpack Server
111-
112-
Open a new terminal window, navigating into the base of the repo, and start the Webpack server:
113-
114-
`./bin/webpack -w`
115-
116-
### Start the Rails server
117-
118-
You can start the rails server using the command given below (replacing the KEY_CLAIM_HOST to match your running diagnosis server config).
119-
120-
```ruby
121-
KEY_CLAIM_HOST=127.0.0.1:8000 bundle exec rails s
122-
```
123-
124-
And now you can visit the site with the URL http://localhost:3000
125-
126-
The default username and password is `admin@covidshield.app` and `password`.
20+
See [CONTRIBUTING.md](CONTRIBUTING.md).
12721

12822
## Who built COVID Shield?
12923

SECURITY.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Security Policy
2+
3+
COVID Shield takes security seriously. If you have found a security vulnerability
4+
in any of the software within this GitHub organization, please **DO NOT** create
5+
a public issue. Instead, send a detailed report to security@covidshield.app. We endeavour
6+
to respond to all security-related emails within 7 days.

0 commit comments

Comments
 (0)