/nestjs-graphql-react

boilerplate for lerna monorepo, nestjs and react apps using graphql and typescript

Primary LanguageTypeScript

Boilerplate for graphql lerna monorepo using apollo, nestjs and react

Requirements

You need Docker, nodejs and yarn to run this locally.

Whats inside ?

A lerna monorepo with 3 packages:

  • common
    • configs, enums, helpers ...
  • server
    • nestjs
    • graphql
    • jwt authentication module (filters, guards, user management, roles management)
    • unit and e2e tests
    • docs generated by compodoc
  • web
    • react
    • react-router
    • apollo
    • theme-ui
    • emotion
    • framer-motion (animation)
    • parcel
    • unit tests

This repository use conventionnal changelog commit style, if you dont like it you should remove the linter in husky and the release task.

Installation

First time you run the installation command, a bootstrap script will run and prepare your project.

  • rename your base package according to the directory
  • setup an empty git repository

If you change the repository url of the main package.json it will also add it as origin remote.

If you want to skip this bootstrap phase, just set bootstraped to true in base package.json

yarn

Development

this command start a postgres docker container and run the dev command of each packages

yarn dev

pgadmin

You can start pgadmin by running

yarn pgadmin

and then access it via http://localhost:5050 you can find credentials in ./packages/server/.database.local.env

build

yarn build

test

yarn test
yarn test:e2e
yarn test:watch