Skip to content

Commit f09d26c

Browse files
authored
Merge branch 'master' into snyk-upgrade-74f19e43ed7a2dd24d076f24ea82b23a
2 parents 7ca8aca + 68fafa0 commit f09d26c

File tree

18 files changed

+225
-167
lines changed

18 files changed

+225
-167
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,15 @@
162162
"contributions": [
163163
"infra"
164164
]
165+
},
166+
{
167+
"login": "mschechter-bellese",
168+
"name": "Michael Schechter",
169+
"avatar_url": "https://avatars3.githubusercontent.com/u/61873300?v=4",
170+
"profile": "https://bellese.io/",
171+
"contributions": [
172+
"code"
173+
]
165174
}
166175
],
167176
"contributorsPerLine": 7,

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,26 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
3333
<!-- markdownlint-disable -->
3434
<table>
3535
<tr>
36-
<td align="center"><a href="https://ao10.github.io"><img src="https://avatars3.githubusercontent.com/u/14120224?v=4" width="100px;" alt=""/><br /><sub><b>Ati Ok</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=ao10" title="Code">💻</a></td>
37-
<td align="center"><a href="https://dependabot.com"><img src="https://avatars1.githubusercontent.com/u/27347476?v=4" width="100px;" alt=""/><br /><sub><b>Dependabot</b></sub></a><br /><a href="#security-dependabot[bot]" title="Security">🛡️</a></td>
38-
<td align="center"><a href="https://gnboor.se"><img src="https://avatars0.githubusercontent.com/u/2052524?v=4" width="100px;" alt=""/><br /><sub><b>Gabriel Boorse</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=gnboorse" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Agnboorse" title="Reviewed Pull Requests">👀</a></td>
3936
<td align="center"><a href="http://www.jasonanton.com"><img src="https://avatars0.githubusercontent.com/u/6391564?v=4" width="100px;" alt=""/><br /><sub><b>Jason Anton</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=revjtanton" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=revjtanton" title="Documentation">📖</a> <a href="#infra-revjtanton" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
4037
<td align="center"><a href="http://jasonbixon.netlify.com"><img src="https://avatars3.githubusercontent.com/u/32110237?v=4" width="100px;" alt=""/><br /><sub><b>Jason Bixon</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=jbixon13" title="Code">💻</a> <a href="#infra-jbixon13" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Ajbixon13" title="Reviewed Pull Requests">👀</a></td>
41-
<td align="center"><a href="https://github.com/mpiroc"><img src="https://avatars2.githubusercontent.com/u/1623344?v=4" width="100px;" alt=""/><br /><sub><b>Matthew Pirocchi</b></sub></a><br /><a href="#infra-mpiroc" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
42-
<td align="center"><a href="https://github.com/seancrim23"><img src="https://avatars1.githubusercontent.com/u/48462417?v=4" width="100px;" alt=""/><br /><sub><b>Sean Crim</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=seancrim23" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Aseancrim23" title="Reviewed Pull Requests">👀</a></td>
38+
<td align="center"><a href="https://github.com/cshamrick"><img src="https://avatars0.githubusercontent.com/u/2623452?v=4" width="100px;" alt=""/><br /><sub><b>cshamrick</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=cshamrick" title="Code">💻</a> <a href="#infra-cshamrick" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#security-cshamrick" title="Security">🛡️</a></td>
39+
<td align="center"><a href="https://ao10.github.io"><img src="https://avatars3.githubusercontent.com/u/14120224?v=4" width="100px;" alt=""/><br /><sub><b>Ati Ok</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=ao10" title="Code">💻</a></td>
40+
<td align="center"><a href="https://github.com/joffutt4"><img src="https://avatars0.githubusercontent.com/u/10181869?v=4" width="100px;" alt=""/><br /><sub><b>joffutt4</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=joffutt4" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=joffutt4" title="Documentation">📖</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Ajoffutt4" title="Reviewed Pull Requests">👀</a></td>
41+
<td align="center"><a href="https://snyk.io"><img src="https://avatars2.githubusercontent.com/u/19733683?v=4" width="100px;" alt=""/><br /><sub><b>Snyk bot</b></sub></a><br /><a href="#security-snyk-bot" title="Security">🛡️</a></td>
42+
<td align="center"><a href="https://dependabot.com"><img src="https://avatars1.githubusercontent.com/u/27347476?v=4" width="100px;" alt=""/><br /><sub><b>Dependabot</b></sub></a><br /><a href="#security-dependabot[bot]" title="Security">🛡️</a></td>
4343
</tr>
4444
<tr>
45-
<td align="center"><a href="https://snyk.io"><img src="https://avatars2.githubusercontent.com/u/19733683?v=4" width="100px;" alt=""/><br /><sub><b>Snyk bot</b></sub></a><br /><a href="#security-snyk-bot" title="Security">🛡️</a></td>
45+
<td align="center"><a href="https://gnboor.se"><img src="https://avatars0.githubusercontent.com/u/2052524?v=4" width="100px;" alt=""/><br /><sub><b>Gabriel Boorse</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=gnboorse" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Agnboorse" title="Reviewed Pull Requests">👀</a></td>
4646
<td align="center"><a href="https://github.com/bani-bellese"><img src="https://avatars0.githubusercontent.com/u/62711535?v=4" width="100px;" alt=""/><br /><sub><b>bani-bellese</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=bani-bellese" title="Code">💻</a> <a href="#infra-bani-bellese" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#security-bani-bellese" title="Security">🛡️</a></td>
47+
<td align="center"><a href="https://github.com/seancrim23"><img src="https://avatars1.githubusercontent.com/u/48462417?v=4" width="100px;" alt=""/><br /><sub><b>Sean Crim</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=seancrim23" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Aseancrim23" title="Reviewed Pull Requests">👀</a></td>
48+
<td align="center"><a href="https://github.com/carorm"><img src="https://avatars2.githubusercontent.com/u/8696896?v=4" width="100px;" alt=""/><br /><sub><b>carorm</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=carorm" title="Tests">⚠️</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Acarorm" title="Reviewed Pull Requests">👀</a></td>
4749
<td align="center"><a href="https://github.com/blakenan-bellese"><img src="https://avatars1.githubusercontent.com/u/61432973?v=4" width="100px;" alt=""/><br /><sub><b>blakenan-bellese</b></sub></a><br /><a href="#ideas-blakenan-bellese" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=blakenan-bellese" title="Tests">⚠️</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=blakenan-bellese" title="Documentation">📖</a></td>
4850
<td align="center"><a href="https://github.com/c-w-allen"><img src="https://avatars0.githubusercontent.com/u/64177457?v=4" width="100px;" alt=""/><br /><sub><b>c-w-allen</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=c-w-allen" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Ac-w-allen" title="Reviewed Pull Requests">👀</a></td>
49-
<td align="center"><a href="https://github.com/carorm"><img src="https://avatars2.githubusercontent.com/u/8696896?v=4" width="100px;" alt=""/><br /><sub><b>carorm</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=carorm" title="Tests">⚠️</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Acarorm" title="Reviewed Pull Requests">👀</a></td>
50-
<td align="center"><a href="https://github.com/cshamrick"><img src="https://avatars0.githubusercontent.com/u/2623452?v=4" width="100px;" alt=""/><br /><sub><b>cshamrick</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=cshamrick" title="Code">💻</a> <a href="#infra-cshamrick" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#security-cshamrick" title="Security">🛡️</a></td>
51-
<td align="center"><a href="https://github.com/joffutt4"><img src="https://avatars0.githubusercontent.com/u/10181869?v=4" width="100px;" alt=""/><br /><sub><b>joffutt4</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=joffutt4" title="Code">💻</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=joffutt4" title="Documentation">📖</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Ajoffutt4" title="Reviewed Pull Requests">👀</a></td>
51+
<td align="center"><a href="https://github.com/msmith125"><img src="https://avatars2.githubusercontent.com/u/58228205?v=4" width="100px;" alt=""/><br /><sub><b>msmith125</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=msmith125" title="Tests">⚠️</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Amsmith125" title="Reviewed Pull Requests">👀</a></td>
5252
</tr>
5353
<tr>
54-
<td align="center"><a href="https://github.com/msmith125"><img src="https://avatars2.githubusercontent.com/u/58228205?v=4" width="100px;" alt=""/><br /><sub><b>msmith125</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=msmith125" title="Tests">⚠️</a> <a href="https://github.com/CodeForBaltimore/Bmore-Responsive/pulls?q=is%3Apr+reviewed-by%3Amsmith125" title="Reviewed Pull Requests">👀</a></td>
54+
<td align="center"><a href="https://github.com/mpiroc"><img src="https://avatars2.githubusercontent.com/u/1623344?v=4" width="100px;" alt=""/><br /><sub><b>Matthew Pirocchi</b></sub></a><br /><a href="#infra-mpiroc" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
55+
<td align="center"><a href="https://bellese.io/"><img src="https://avatars3.githubusercontent.com/u/61873300?v=4" width="100px;" alt=""/><br /><sub><b>Michael Schechter</b></sub></a><br /><a href="https://github.com/CodeForBaltimore/Bmore-Responsive/commits?author=mschechter-bellese" title="Code">💻</a></td>
5556
</tr>
5657
</table>
5758

docs/HowToUse.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,25 @@ Once you've installed the
22

33

44
## API Spec
5-
The Bmore Responsive API is documented via a OAS 3.0 API spec in the `swagger.json` file. This API spec lists all the end points, supported REST actions, request parameters and response data formats. While you can open the `swagger.json` file in any text editor, there are better ways to view it in a richer format, such as:
5+
The Bmore Responsive API is documented via a OAS 3.0 API specification in the file `swagger.json`. This API spec lists all the endpoints, supported REST actions, and the request and response data formats. While you can open the `swagger.json` file in any text editor, there are better ways to view it in a richer format, such as:
66

77
- View the [API Spec on Swaggerhub](https://app.swaggerhub.com/apis/codeforbaltimore/bmoreResponsive)
8-
- If you are running Bmore Responsive, then you can just point your browser at the root URL of your server, often `http://localhost:3000/`, you'll be redirected to `http://localhost:3000/api-docs/`.
8+
- If you are running Bmore Responsive, then you can just point your browser at the root URL of your server, often `http://localhost:3000/`, you'll be redirected to `http://localhost:3000/api-docs/`
99

1010
## Postman Collection
1111

12-
For a library (aka collection) of sample API calls, please refer to Postman the collection saved as `Bmore-Responsive.postman_collection.json`. Need Postman? Click [here](https://www.postman.com/downloads/).
12+
For a library of sample API calls, please refer to the Postman collection `Bmore-Responsive.postman_collection.json`. Need Postman? Click [here](https://www.postman.com/downloads/).
1313

1414
<TODO: Add explanation of folder structure, tests, token mgmt and dependencies, environments/variables>
1515

1616
## Authentication
1717

18-
The Bmore Responsive API provides security by limiting use of nearly all feature to authenticated users. If you have NOT disabled login, you'll need to pass a token (aka "JWT") with every call, except `/health` and `/user/login` endpoints. To get this token, you'll need to pass a valid username and password to `/user/login` which will reply with a JWT. This JWT should be passed as a query parameter named `token`. This token will expire after a short period of time. Once expired you can get a new token by another call to `user/login`.
18+
The Bmore Responsive API provides security by limiting use of nearly all features to authenticated users. If you have NOT disabled login, you'll need to pass a [JSON Web Token (JWT)](https://jwt.io/) with every call to a secured endpoint. Only the login (`/user/login`) and health (`/health`) endpoints are unsecured. To get a JWT, you'll need to pass a valid username and password to `/user/login`; the encoded JWT is the response body. This JWT should be passed as the `Authorization` header using the `Bearer` [authentication scheme](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). This token will expire after a short period of time. If it expires, you can get a new token by making another call to `user/login`.
1919

2020
_Note: If you have used the db-seed script, you'll already have a user account created that will enable you to login. This default login is username `homer.simpson@sfpp.com` and password `donuts`._
2121

2222
<TODO: Add subsections to describe common tasks like adding user, adding role, setting/changing access, adding entity, relating contact to entity, etc...>
2323

24-
2524
## Seed and re-seed the database
2625

2726
This repo has four scripts that simplifies the creation and loading of the database. These script commands are as follows:

docs/QuickStart.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ You'll need to create a text file named `.env` in your Bmore-Responsive director
2424
NODE_ENV=development
2525
PORT=3000
2626
JWT_KEY=test123
27-
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
27+
DATABASE_HOST=localhost
28+
DATABASE_PORT=5432
29+
DATABASE_USERNAME=postgres
30+
DATABASE_PASSWORD=postgres
31+
DATABASE_NAME=postgres
2832
DATABASE_SCHEMA=public
2933
BYPASS_LOGIN=true
3034
```
3135

32-
*Note: The DATABASE_URL above asserts that your username and password for your DB are both `postgres` as the URL format is generally `postgres://user:pass@example.com:5432/dbname`.* _We highly recommend_ *changing these values in this step and the following step.*
36+
*Note: The settings above assume that your username and password for your DB are both `postgres`.* _We highly recommend_ *changing these values in this step and the following step.*
3337

3438
## Step 4 - Start Up a Database
3539

@@ -47,11 +51,11 @@ To populate the DB with sample users, entities and contacts that may resemble th
4751

4852
## Step 6 - Run Server
4953

50-
To run the application run `npm start`. Your terminal output should end with a line like `Bmore Responsive is available at http://localhost:5000`
54+
To run the application run `npm start`. Your terminal output should end with a line like `Bmore Responsive is available at http://localhost:3000`
5155

5256
## Step 7 - Confirm Success
5357

54-
To confirm the server is running, just point your browser to [http://localhost:5000/entity](http://localhost:5000/entity) (or just add "/entity" to the URL from the previous step). A response like the sample below lets you know your server is healthy.
58+
To confirm the server is running, just point your browser to [http://localhost:3000/entity](http://localhost:3000/entity) (or just add "/entity" to the URL from the previous step). A response like the sample below lets you know your server is healthy.
5559

5660
```
5761
{

0 commit comments

Comments
 (0)