Skip to content

πŸ’₯ Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, Relay, Material UI.

License

Notifications You must be signed in to change notification settings

wuzengfu/relay-starter-kit

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GraphQL
GraphQL API and Relay Starter Kit

Features

  • Monorepo project structure powered by Yarn with PnP
  • GraphQL API using code-first development approach (TypeScript, GraphQL.js, Knex, PostgreSQL)
  • Stateless JWT cookie-based authentication (supporting SSR, OAuth 2.0 via Google, Facebook, etc.)
  • Database tooling β€” seed files, migrations, Knex.js REPL shell, etc.
  • Front-end boilerplate pre-configured with TypeScript, Webpack v5, React, Relay, and Materia UI
  • Serverless deployment β€” api, img β†’ Cloud Functions, web β†’ Cloudflare Workers
  • HTML page rendering (SSR) at CDN edge locations, all ~100 points on Lighthouse
  • Pre-configured dev, test / QA, production, and review (per PR) environments
  • Pre-configured VSCode code snippets and other VSCode settings
  • The ongoing design and development is supported by these wonderful companies:

Β Β Β Β 


This project was bootstrapped with GraphQL API Starter Kit. Be sure to join our Discord channel for assistance.

Directory Structure

β”œβ”€β”€.github β€” GitHub configuration including CI/CD workflows
β”œβ”€β”€.vscode β€” VSCode settings including code snippets, recommended extensions etc.
β”œβ”€β”€env β€” environment variables that are used for local development (local, test, prod)
β”œβ”€β”€db β€” database schema, seeds, and migrations (Cloud SQL, Knex.js)
β”œβ”€β”€api β€” GraphQL API and authentication (Could SQL, Cloud Functions, GraphQL.js)
β”œβ”€β”€img β€” dynamic image resizing (Cloud Functions, [Cloud Storage](https:// cloud.google.com/storage))
β”œβ”€β”€infra β€” cloud infrastructure configuration (Terraform)
β”œβ”€β”€web β€” React / Relay web application with CDN rendering (Webpack, Cloudflare Workers)
β”œβ”€β”€scripts β€” Automation scripts shared across the project
└── ... β€” add more packages such as worker, admin, mobile, etc.

Requirements

Getting Started

Just clone the repo and run yarn setup followed by yarn start:

$ git clone --origin=seed --branch=main --single-branch \
    https://github.com/kriasoft/relay-starter-kit.git example
$ cd ./example                  # Change current directory to the newly created one
$ yarn install                  # Install project dependencies
$ yarn setup                    # Configure environment variables
$ yarn db:reset                 # Create or update PostgreSQL database
$ yarn api:start                # Launch GraphQL API and authentication server
$ yarn web:start                # Launch React/Relay front-end app

The API server must become available at http://localhost:8080/api.
The web application front-end must become available at http://localhost:3000/.

References

How to Update

In the case when you kept the original Node.js Starter Kit git history, you can always pull and merge updates from the "upstream" repository back into your project by running:

$ git fetch seed                # Fetch Node.js Starter Kit (upstream) repository
$ git checkout main             # Switch to the main branch (or, master branch)
$ git merge seed/main           # Merge upstream/master into the local branch

In order to update Yarn and other dependencies to the latest versions, run:

$ yarn set version latest       # Upgrade Yarn CLI to the latest version
$ yarn upgrade-interactive      # Bump Node.js dependencies using an interactive mode
$ yarn install                  # Install the updated Node.js dependencies
$ yarn dlx @yarnpkg/sdks vscode # Update VSCode settings

Backers

Β Β Β Β Β Β Β Β Β Β Β Β Β Β 

How to Contribute

Anyone and everyone is welcome to contribute. Start by checking out the list of open issues marked help wanted. However, if you decide to get involved, please take a moment to review the guidelines.

License

Copyright Β© 2016-present Kriasoft. This source code is licensed under the MIT license found in the LICENSE file.


Made with β™₯ by Konstantin Tarkus (@koistya, blog) and contributors.

About

πŸ’₯ Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, Relay, Material UI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 76.9%
  • JavaScript 18.6%
  • HCL 2.0%
  • Handlebars 1.4%
  • Other 1.1%