@@ -5,6 +5,8 @@ optimized for hosting in a [serverless](https://cloud.google.com/serverless)
55environment such as [ Google Cloud Functions] ( https://cloud.google.com/functions )
66or [ Google Cloud Run] ( https://cloud.google.com/run ) .
77
8+ ---
9+
810This project was bootstrapped with [ Node.js API Starter Kit] ( https://github.com/kriasoft/nodejs-api-starter ) .
911Be sure to join our [ Discord channel] ( https://discord.com/invite/bSsv7XM ) for
1012assistance.
@@ -13,29 +15,31 @@ assistance.
1315
1416- [ 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
1517- [ 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
1820- [ Jest] ( https://jestjs.io/ ) - unit and snapshot testing
1921
2022``` bash
2123.
2224├── scripts # Automation scripts
25+ │ ├── deploy.ts # - deploys the app to Google Cloud
2326│ ├── update-schema.ts # - generates `schema.graphql` file
2427│ └── update-types.ts # - generates TypeScript definitions
2528├── 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
3134│ ├── context.ts # GraphQL API context variable(s)
3235│ ├── db.ts # PostgreSQL client and query builder
3336│ ├── errors.ts # Custom error types
3437│ ├── fields.ts # Helper functions for GraphQL fields
3538│ ├── index.ts # GraphQL API server entry point
3639│ ├── node.ts # GraphQL Relay Node interface
3740│ ├── 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
3943├── babel.config.js # Babel.js configuration
4044├── package.json # Node.js dependencies
4145├── README.md # This file
0 commit comments