Skip to content

Commit 6c56f4f

Browse files
authored
Merge branch 'master' into snyk-upgrade-92ac3c9be4dca607ff38b5cfabcaa9e2
2 parents 2915f0c + 1b85212 commit 6c56f4f

File tree

19 files changed

+545
-356
lines changed

19 files changed

+545
-356
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,7 @@ dist
113113
.idea
114114
.terraform
115115
*.plan
116-
*.out
116+
*.out
117+
118+
# MKDocs Wiki
119+
site/

CONTRIBUTING.md

Lines changed: 1 addition & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,2 @@
11
# Contributing
2-
When contributing to this repository, please first discuss the change you wish to make via issue,
3-
email, slack, or any other method with the contributes of this repository, or Code for Baltimore, before making a change.
4-
5-
Please note we have a [Code of Conduct](/docs/Code_of_Conduct.md), please follow it in all your interactions with the project.
6-
7-
## Overview
8-
In the event of a disaster a municipality or state may have need to check in on the status of all healthcare providers,
9-
or other types of entities, within in the jurisdiction. This system will provide methods for healthcare providers and
10-
entities to check-in during disasters, and update their contact information during non-emergency periods. During an
11-
emergency this system will track (among other things) if any entity:
12-
13-
* Has power
14-
* Has sufficient supplies
15-
* Is informed about the emergency
16-
17-
This system will make use of digital services and modern methodologies to automate and simplify parts of the check-in process
18-
to help the municipality prioritize its call/check-in list and response plan. Additionally, the system will validate contact
19-
information regularly during non-emergency times to ensure the municipality has the most up-to-date information for each entity.
20-
21-
### Non Goals
22-
What will this project not accomplish during its initial creation?
23-
24-
- No front-end website or app
25-
- No outside data interactions
26-
- Non-city employee full login (dashboard, etc)
27-
- Statistical or analytical endpoints
28-
29-
### Minimum Viable Product
30-
To use this product as quickly as possible we will be implementing the following features:
31-
- User creation
32-
- Contact creation
33-
- Entity creation
34-
- Contact->Entity linking
35-
- Contact single-use login check-in ability
36-
37-
### Roadmap
38-
Milestones and project timelines can be viewed on the [Projects page](https://github.com/CodeForBaltimore/Bmore-Responsive/projects)
39-
40-
## Technology and Code
41-
42-
This project will make exclusive use of open-source software, packages, and contributions. The application is built with the following
43-
technologies:
44-
45-
- Javascript (ES6)
46-
- [Node.js](https://nodejs.org/en/)
47-
- [Express.js](https://expressjs.com/)
48-
- [Sequelize](https://sequelize.org/v3/)
49-
- [Docker](https://www.docker.com/)
50-
- [Terraform](https://www.terraform.io/)
51-
52-
Please see our [Tech Spec](/docs/Tech_Spec.md) for a full breakdown of the project and workflows.
53-
54-
Please see our [Best Practices](/docs/Best_Practices.md) for code standards, git standards, and other guidance for writing clean and well
55-
documented code.
56-
57-
### Pull Request Process
58-
1. Ensure you thoroughly fill out the pull request form presented when submitting the request.
59-
This includes listing what work was done, what issues are resolved by that work, what tests
60-
have been added, how to perform other tests or run the code, and other potentially relevant
61-
notes.
62-
2. Update the README.md with details of changes to the application, this includes new environment
63-
variables, exposed ports, useful file locations and/or container parameters.
64-
3. If you are on the project team you may merge the Pull Request in once you have the sign-off of one other developer, or if you
65-
do not have permission to do that, you may request the second reviewer to merge it for you.
66-
67-
## Contact
68-
The best ways to get in touch with us is via Slack. An active Slack link can be found on our website:
69-
70-
***[codeforbaltimore.org](https://codeforbaltimore.org/)***
71-
72-
You can also reach out to the tech lead [Jason Anton](https://github.com/revjtanton) via email at [[email protected]](mailto:[email protected]).
73-
74-
## Sources and Links
75-
We are also building a front-end application called [Healthcare Rollcall](https://github.com/CodeForBaltimore/Healthcare-Rollcall) to interact
76-
with this backend API. To view that project, or to contribute to it, please visit the repo here: https://github.com/CodeForBaltimore/Healthcare-Rollcall
2+
Bmore-Responsive is an Open Source project maintained by [CodeForBaltimore](https://codeforbaltimore.org). We welcome contributions to anyone that accepts the [project's license](./LICENSE) and abides by our [Code of Conduct](./docs/Code_of_Conduct.md). For more details, please refer to [How to Contribute](./docs/HowToContribute.md) in our project Wiki.

README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
[![Build Status](https://travis-ci.org/CodeForBaltimore/Bmore-Responsive.svg?branch=master)](https://travis-ci.org/CodeForBaltimore/Bmore-Responsive) [![codecov](https://codecov.io/gh/CodeForBaltimore/Bmore-Responsive/branch/master/graph/badge.svg)](https://codecov.io/gh/CodeForBaltimore/Bmore-Responsive)
22

33
# Bmore Responsive
4-
An API to drive disaster and emergency response systems.
4+
A simple, flexible API to support emergency response coordination. Sample use cases include:
5+
6+
- keeping track of local nursing home status and needs during a global pandemic
7+
- identifying hospitals lacking power during a natural disaster
8+
- assuring safety of hikers in a national park during a snow storm
9+
10+
Bmore-Responsive provides the following primary features via a secure REST API:
11+
12+
- Maintain set of Entities (could be hospitals, nursing homes, campers, etc)
13+
- Maintain set of Contacts for Entities (people who can provide status/need info for entities)
14+
- Capture of status/need information about Entities
15+
- User account and role management to enable secure authentication and authorization
16+
- Export of any data via CSV
17+
18+
<<TODO: Conclude with reference to QuickStart and/or Wiki>>
19+
20+
21+
22+
23+
## --- Old README content below, Refactored version above ----
524

625
<!-- TOC -->
726

@@ -25,22 +44,7 @@ An API to drive disaster and emergency response systems.
2544

2645
<!-- /TOC -->
2746

28-
## Documentation
29-
Detailed documents describing this project and its use are available in this repository. The documentation currently available is as follows:
30-
- [Best Practices](/docs/Best_Practices.md)
31-
- [Code of Conduct](/docs/Code_of_Conduct.md)
32-
- [Sequelize](/sequelize/README.md)
33-
- [Tech Spec](/docs/Tech_Spec.md)
34-
- [Terraform](/terraform/README.md)
35-
36-
### API Spec
37-
Our API spec is on Swagger. You can view it here https://app.swaggerhub.com/apis/codeforbaltimore/bmoreResponsive or you can find the `swagger.json` file in our `docs` folder and use it via http://localhost:3000/api-docs/ when the app is running locally.
38-
39-
### Database Documentation
40-
Our database documentation can be found in the `/sequelize` directory or you can [click here](/sequelize/README.md)
4147

42-
### Infrastructure and Deployment
43-
We have included a `terraform` option to deploy to AWS. For more information on how to use this feature, please see the [terraform](/terraform/README.md) directory.
4448

4549
# Setup
4650
This setup section will focus on setting up the local dev environment. For more detailed instructions for how to deploy this to a production environment please see the section above this one :point_up:
@@ -59,7 +63,7 @@ This application is designed to work as an API driven by Express. To setup your
5963
```
6064
npm install
6165
```
62-
Once all dependencies are installed you will need to setup some environment variables to interact with your database and application.
66+
Once all dependencies are installed you will need to setup some environment variables to interact with your database and application.
6367

6468
## Environment variables
6569
You will need to set some local environment variables to run this application. This is true even if you're using Docker.
@@ -77,11 +81,11 @@ The `DATABASE_URL` is not a very clear var name, and the string is broken down a
7781
An example of the `DATABASE_URL` would be `DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres`
7882

7983
The various variables are defined as follows:
80-
- `NODE_ENV` = The label for your environment.
84+
- `NODE_ENV` = The label for your environment.
8185
- `PORT` = The local port you wish to run on. Defaults to `3000`.
8286
- `DATABASE_URL` = The URL string for your db connection. For example: `postgres://user:[email protected]:5432/dbname`
8387
- `DATABASE_SCHEMA` = Your local database schema. Postgres default is `public`.
84-
- `JWT_KEY` = A secret value to generate JWT's locally.
88+
- `JWT_KEY` = A secret value to generate JWT's locally.
8589
- `SMTP_HOST` = _optional_ hostname for the SMTP server used to send notification emails
8690
- `SMTP_PORT` = _optional_ port number for the SMTP server used to send notification emails
8791
- `SMTP_USER` = _optional_ username for the SMTP server used to send notification emails
@@ -92,7 +96,7 @@ The various variables are defined as follows:
9296

9397
_We do not recommend using the default options for PostgreSQL. The above values are provided as examples. It is more secure to create your own credentials._
9498

95-
**Warning**: If you are running Docker Toolbox instead of Docker Desktop (likely meaning you are running Windows 10 Home, not Professional) you will need to change your `.env` to reflect Docker running on a VM:
99+
**Warning**: If you are running Docker Toolbox instead of Docker Desktop (likely meaning you are running Windows 10 Home, not Professional) you will need to change your `.env` to reflect Docker running on a VM:
96100
- `DATABASE_HOST`: The IP address Docker is running on. You can find this by running `docker-machine ip` but it's usually `192.168.99.100` instead of `localhost`
97101
- `DATABASE_URL`: This will need to be adjusted as well, for example `DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres` would become `DATABASE_URL=postgres://postgres:[email protected]:5432/postgres`
98102

@@ -123,7 +127,7 @@ If you're running a database in another way then we trust you can sort it out on
123127
### Sequelize
124128
To properly start the application the database needs to be built by Sequlize ahead of time. To do that run the following commands
125129
1. You must create your database tables without running the application by running `npm run db-create` first.
126-
2. _optional_ You can now seed your database if you wish by running `npm run db-seed`.
130+
2. _optional_ You can now seed your database if you wish by running `npm run db-seed`.
127131

128132
Example `/migrations` and `/seeders` scripts have been supplied. You can rollback your all seeded data at any time by running `npm run db-unseed` and delete all created tables with `npm run db-delete`.
129133

@@ -138,17 +142,17 @@ Note that `DATABASE_URL` host location will be different depending on what OS yo
138142
Alternatively you can manually set the environment variables and not use a `.env` file by setting the following vars:
139143
```
140144
-e NODE_ENV=development
141-
-e PORT=3000
145+
-e PORT=3000
142146
-e JWT_KEY=<your JWT phrase>
143147
-e DATABASE_URL=<your connection string>
144148
-e DATABASE_DATABASE_SCHEMA=<your database schema>
145149
```
146150

147151
### docker-compose
148-
To use the `docker-compose.yml` file included you will first need to set [environment variables](#environment-variables). You **MUST** set your `DATABASE_HOST` to `db` to use the `docker-compose` solution. It is not recommended to use `docker-compose` for any reason other than to test a solution for a separate front-end component.
152+
To use the `docker-compose.yml` file included you will first need to set [environment variables](#environment-variables). You **MUST** set your `DATABASE_HOST` to `db` to use the `docker-compose` solution. It is not recommended to use `docker-compose` for any reason other than to test a solution for a separate front-end component.
149153

150154
# Using this product
151-
You may use this product to create and manage users for your front-end.
155+
You may use this product to create and manage users for your front-end.
152156

153157
To run the application--after the above steps are completed--run `npm start`.
154158

docs/Best_Practices.md

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,8 @@
11
# Best Practices
2-
Code for Baltimore projects should be built with the intention of deploying on [Heroku](https://heroku.com) or [AWS](https://aws.amazon.com/). For details on Heroku Best Practices see their [developer documentation](https://devcenter.heroku.com/articles/node-best-practices).
2+
Here's an incomplete list of things that are inportant to consider when developing code to be controibuted to Bmore Responsive:
33

4-
<!-- TOC -->
54

6-
- [Best Practices](#best-practices)
7-
- [Project Management](#project-management)
8-
- [Projects](#projects)
9-
- [Issues and Milestones](#issues-and-milestones)
10-
- [Tagging Issues](#tagging-issues)
11-
- [Code Quality Standards](#code-quality-standards)
12-
- [Style Guides](#style-guides)
13-
- [Static Code Analysis](#static-code-analysis)
14-
- [Git and Branching](#git-and-branching)
15-
- [Branch Names](#branch-names)
16-
- [Merging and Pull Requests](#merging-and-pull-requests)
17-
18-
<!-- /TOC -->
19-
20-
## Project Management
21-
22-
We are using Github Issues to track outstanding issues and work for projects.
23-
24-
### Projects
25-
26-
Github Projects help organize our repositories by creating a Kanban board to track issues. These boards can be automatically generated by Github when creating the Project and should include a Todo, In Progress, Under Review, Reviewer Approved, and Done column. As issues are added to a Project they should be added to the board. A repo can have one or many Projects or boards at any given time.
27-
28-
### Issues and Milestones
29-
30-
When breaking down work it is important to add tasks to the Github project. For convenience various types of issues have templates built into this repo for easy issue entry. Before tasks are entered the project managers should agree on milestones based on the Project objectives. Issues should be tracked against Milestones so progress can be measured and planned for.
31-
32-
### Tagging Issues
33-
34-
When entering issues tagging can be used to further organize work or make work more visible to team members.
35-
36-
## Code Quality Standards
5+
### Code Quality Standards
376

387
Regardless of Language:
398

@@ -50,19 +19,19 @@ Consistent style guidelines for each language should be used. Where possible, op
5019
Example: Google has openly published style guides for many languages in wide use on their open source projects, and these can be adopted for use in this project: [Google Language Specific Styleguides](https://google.github.io/styleguide/)
5120

5221

53-
## Static Code Analysis
22+
### Static Code Analysis
5423

5524
Static code analysis tools should be used when possible, to monitor and improve code quality. This may be integrated in the local development environment, automated repository commit checks, automated CI/CD pipelines, or other steps in the code development process.
5625

57-
## Git and Branching
26+
### Git and Branching
5827

5928
All code work should be done in an isolated or feature branch off of the `master` branch. Before starting work on new code, developers should create their feature branch using a standard naming convention determined by the project.
6029

6130
### Branch Names
62-
Branch names should follow this patter: `<your github username>/issue-<github issue number>`. This will ensure there are no branch name conflicts, and anyone looking for your branch will know what it is called based on the issue addressed. For example if your username was `letsGoOs`, and you were working on issue 8, then your branch name would be `letsGoOs/issue-8`. If you wanted to make a new branch to continue your work on your issue then add a suffix with an incremented number. To continue the previous example if you wanted to make a second branch for your issue 8 work your second branch would be called `letsGoOs/issue-8-2`.
31+
Branch names should follow this pattern: `<your github username>/issue-<github issue number>`. This will ensure there are no branch name conflicts, and anyone looking for your branch will know what it is called based on the issue addressed. For example if your username was `letsGoOs`, and you were working on issue 8, then your branch name would be `letsGoOs/issue-8`. If you wanted to make a new branch to continue your work on your issue then add a suffix with an incremented number. To continue the previous example if you wanted to make a second branch for your issue 8 work your second branch would be called `letsGoOs/issue-8-2`.
6332

6433
### Merging and Pull Requests
6534

6635
When work is complete, and after static code analysis has been performed, the developer should submit a pull request in Github. A pull request template has been provided, and developers should take care to fill out the form as completely as possible when submitting new pull requests omitting any sections that are deemed unnecessary for that particular submission. Pull requests should require at least 1 review from another verified team member before they are approved and merged into the `master` branch.
6736

68-
While not strictly required, it is recommended that pull requests are submitted early on in the development process with the intention of maintaining high visibility over the work while it is in progress.
37+
While not strictly required, it is recommended that pull requests are submitted early on in the development process with the intention of maintaining high visibility over the work while it is in progress.

0 commit comments

Comments
 (0)