You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 ----
5
24
6
25
<!-- TOC -->
7
26
@@ -25,22 +44,7 @@ An API to drive disaster and emergency response systems.
25
44
26
45
<!-- /TOC -->
27
46
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)
41
47
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.
44
48
45
49
# Setup
46
50
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
59
63
```
60
64
npm install
61
65
```
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.
63
67
64
68
## Environment variables
65
69
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
77
81
An example of the `DATABASE_URL` would be `DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres`
78
82
79
83
The various variables are defined as follows:
80
-
-`NODE_ENV` = The label for your environment.
84
+
-`NODE_ENV` = The label for your environment.
81
85
-`PORT` = The local port you wish to run on. Defaults to `3000`.
82
86
-`DATABASE_URL` = The URL string for your db connection. For example: `postgres://user:[email protected]:5432/dbname`
83
87
-`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.
85
89
-`SMTP_HOST` = _optional_ hostname for the SMTP server used to send notification emails
86
90
-`SMTP_PORT` = _optional_ port number for the SMTP server used to send notification emails
87
91
-`SMTP_USER` = _optional_ username for the SMTP server used to send notification emails
@@ -92,7 +96,7 @@ The various variables are defined as follows:
92
96
93
97
_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._
94
98
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:
96
100
-`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`
97
101
-`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`
98
102
@@ -123,7 +127,7 @@ If you're running a database in another way then we trust you can sort it out on
123
127
### Sequelize
124
128
To properly start the application the database needs to be built by Sequlize ahead of time. To do that run the following commands
125
129
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`.
127
131
128
132
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`.
129
133
@@ -138,17 +142,17 @@ Note that `DATABASE_URL` host location will be different depending on what OS yo
138
142
Alternatively you can manually set the environment variables and not use a `.env` file by setting the following vars:
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.
149
153
150
154
# 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.
152
156
153
157
To run the application--after the above steps are completed--run `npm start`.
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:
-[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
37
6
38
7
Regardless of Language:
39
8
@@ -50,19 +19,19 @@ Consistent style guidelines for each language should be used. Where possible, op
50
19
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/)
51
20
52
21
53
-
## Static Code Analysis
22
+
###Static Code Analysis
54
23
55
24
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.
56
25
57
-
## Git and Branching
26
+
###Git and Branching
58
27
59
28
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.
60
29
61
30
### 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`.
63
32
64
33
### Merging and Pull Requests
65
34
66
35
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.
67
36
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