@@ -5,6 +5,8 @@ optimized for hosting in a [serverless](https://cloud.google.com/serverless)
5
5
environment such as [ Google Cloud Functions] ( https://cloud.google.com/functions )
6
6
or [ Google Cloud Run] ( https://cloud.google.com/run ) .
7
7
8
+ ---
9
+
8
10
This project was bootstrapped with [ Node.js API Starter Kit] ( https://github.com/kriasoft/nodejs-api-starter ) .
9
11
Be sure to join our [ Discord channel] ( https://discord.com/invite/bSsv7XM ) for
10
12
assistance.
@@ -13,29 +15,31 @@ assistance.
13
15
14
16
- [ Node.js] ( https://nodejs.org/ ) ` v12 ` , [ Yarn] ( https://yarnpkg.com/ ) ` v2 ` , [ TypeScript] ( https://www.typescriptlang.org/ ) , [ Babel] ( https://babeljs.io/ ) , [ Prettier] ( https://prettier.io/ ) , [ ESLint] ( https://eslint.org/ ) — core platform and dev tools
15
17
- [ GraphQL.js] ( https://github.com/graphql/graphql-js ) , [ GraphQL.js Relay] ( https://github.com/graphql/graphql-relay-js ) , [ DataLoader] ( https://github.com/graphql/dataloader ) , [ Validator.js] ( https://github.com/validatorjs/validator.js ) — [ GraphQL] ( https://graphql.org/ ) schema and API endpoint(s)
16
- - [ PostgreSQL] ( https://www.postgresql.org/ ) , [ Knex] ( https://knexjs.org/ ) , [ pg ] ( https://node-postgres.com/ ) , [ GCP Storage ] ( https://cloud.google.com/ storage ) — data access
17
- - [ Firebase Admin SDK ] ( https://firebase. google.com/docs/admin/setup ) - stateless authentication via 3rd party providers (Google, Apple, etc.)
18
+ - [ PostgreSQL] ( https://www.postgresql.org/ ) , [ Knex.js ] ( https://knexjs.org/ ) , [ ` pg ` ] ( https://node-postgres.com/ ) , [ ` @google-cloud/storage ` ] ( https://googleapis.dev/nodejs/ storage/latest ) — data access
19
+ - [ ` jswonwebtoken ` ] ( https://github.com/auth0/node-jsonwebtoken ) , [ ` google-auth-library ` ] ( https://github .com/googleapis/google-auth-library-nodejs ) — stateless JWT-based sessions and authentication
18
20
- [ Jest] ( https://jestjs.io/ ) - unit and snapshot testing
19
21
20
22
``` bash
21
23
.
22
24
├── scripts # Automation scripts
25
+ │ ├── deploy.ts # - deploys the app to Google Cloud
23
26
│ ├── update-schema.ts # - generates `schema.graphql` file
24
27
│ └── update-types.ts # - generates TypeScript definitions
25
28
├── src #
26
- │ ├── mutations # GraphQL API mutation endpoints
27
- │ ├── queries # The top-level GraphQL API query fields
28
- │ ├── types # GrapHQL API schema types
29
- │ ├── utils # Helper functions
30
- │ ├── auth.ts # Authentication middleware
29
+ │ ├── auth/ # Authentication middleware
30
+ │ ├── mutations/ # GraphQL API mutation endpoints
31
+ │ ├── queries/ # The top-level GraphQL API query fields
32
+ │ ├── types/ # GrapHQL API schema types
33
+ │ ├── utils/ # Helper functions
31
34
│ ├── context.ts # GraphQL API context variable(s)
32
35
│ ├── db.ts # PostgreSQL client and query builder
33
36
│ ├── errors.ts # Custom error types
34
37
│ ├── fields.ts # Helper functions for GraphQL fields
35
38
│ ├── index.ts # GraphQL API server entry point
36
39
│ ├── node.ts # GraphQL Relay Node interface
37
40
│ ├── schema.ts # GraphQL API schema definition
38
- │ └── validator.ts # User input validator
41
+ │ ├── validator.ts # User input validator
42
+ │ └── session.ts # Stateless JWT-based session middleware
39
43
├── babel.config.js # Babel.js configuration
40
44
├── package.json # Node.js dependencies
41
45
├── README.md # This file
0 commit comments