Skip to content

Commit

Permalink
docs: usage - configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed May 1, 2021
1 parent 0dfbbd2 commit a521f02
Showing 1 changed file with 50 additions and 5 deletions.
55 changes: 50 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,56 @@ Alongside an abstract database access layer, repositories also support:
yarn add @flex-development/dreepo # or npm i @flex-development/dreepo
```

## :construction: Usage
## Usage

[Configuration](#configuration)
[Creating a New Model & Repository](#creating-a-new-model-&-repository)
[CRUD Operations](#crud-operations)
[Schema Validation](#schema-validation)
[Contributing](docs/CONTRIBUTING.md)

### Configuration

#### Firebase Service Account

1. Navigate to [Service Accounts][7] section of the Firebase console

2. Click **Generate New Private Key** to generate a new service account key file
if you do not have one already

Dreepo communicates with your Realtime Database using the [Firebase Database
REST API][2].

[Google OAuth2 access tokens][8], generated by service accounts, are used to
authenticate requests.

#### Environment Variables

- `DEBUG`: Toggle [debug][9] logs from the `dreepo` namespace
- `DEBUG_COLORS`: Toggle [debug][9] log namespace colors
- `FIREBASE_CLIENT_EMAIL`: Firebase Admin service account `client_email`
- `FIREBASE_DATABASE_URL`: Firebase Realtime Database URL
- `FIREBASE_PRIVATE_KEY`: Firebase Admin service account `private_key`

### Creating a New Model & Repository

**TODO**: Update documentation.

### CRUD Operations

**TODO**: Update documentation.

### Schema Validation

**TODO**: Update documentation.

## Built With

- [Axios][7] - Promise based HTTP client
- [Axios][10] - Promise based HTTP client
- [Firebase Database REST API][2] - REST API for Firebase Realtime Database
- [Google APIs Node.js Client][8] - Node.js client library for using Google APIs
- [Google APIs Node.js Client][11] - Node.js client library for using Google
APIs
- [debug][9] - JavaScript debugging utility
- [mingo][3] - MongoDB query language for in-memory objects
- [runtypes][4] - Runtime validation for static types

Expand All @@ -61,5 +102,9 @@ Alongside an abstract database access layer, repositories also support:
https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
[6]:
https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes
[7]: https://github.com/axios/axios
[8]: https://github.com/googleapis/google-api-nodejs-client
[7]:
https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk
[8]: https://developers.google.com/identity/protocols/oauth2
[9]: https://github.com/visionmedia/debug
[10]: https://github.com/axios/axios
[11]: https://github.com/googleapis/google-api-nodejs-client

0 comments on commit a521f02

Please sign in to comment.