Skip to content

πŸ’₯ Yarn v2 based monorepo template (seed project) pre-configured with GraphQL API and PostgreSQL.

License

Notifications You must be signed in to change notification settings

valeeum/nodejs-api-starter

Β 
Β 

Repository files navigation

GraphQL
Node.js API Starter Kit

Yarn v2 based monorepo template for quickly bootstrapping production ready web application projects optimized for serverless infrastructure, using code-first GraphQL API and PostgreSQL backend.


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

Directory Structure

β”œβ”€β”€.github β€” GitHub configuration including CI/CD
β”œβ”€β”€.vscode β€” VSCode settings including code snippets, recommended extensions etc.
β”œβ”€β”€env β€” environment variables used for local development
β”œβ”€β”€db β€” database schema and some administration tools
β”œβ”€β”€api β€” GraphQL API server and authentication middleware
β”œβ”€β”€proxy β€” reverse proxy implemented using Cloudflare Workers
β”œβ”€β”€web β€” web application project skeleton based on React.js and Next.js
β”œβ”€β”€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=upstream --branch=main --single-branch --depth=0 \
    https://github.com/kriasoft/nodejs-api-starter.git example
$ cd ./example                  # Change current directory to the newly created one
$ yarn setup                    # Configure environment variables
$ yarn start                    # Launch Node.js API and web application

The API server must become available at http://localhost:8080/graphql.
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 upstream            # Fetch Node.js Starter Kit (upstream) repository
$ git checkout main             # Switch to the main branch (or, master branch)
$ git merge upstream/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 pnpify --sdk vscode      # Update VSCode settings

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

πŸ’₯ Yarn v2 based monorepo template (seed project) pre-configured with GraphQL API and PostgreSQL.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 56.1%
  • JavaScript 43.2%
  • Handlebars 0.7%