A monorepo setup for winning.
😴 We're big fans of siestas so we let our app take nap too. ⏳ Please be patient while it spins up.
Insomnia v7.0.6+
- Easily call
GraphQLqueries/mutations - Make
RESTcalls too! - Take a tour of our schema with built-in
Docs - Load up the config and go!
- Easily call
# 1. ⬇️ Clone this repo
git clone git@github.com:n8io/boilerplate-monorepo.git
# 2. 🛠️ Generate local environment variable files
(
cd packages \
cp -n service/.env.example service/.env \
cp -n ui/.env ui/.env.local \
;
)
# 3. 🌱 Install dependencies
yarn
# 4. ↩️ Add hosts file entry (if needed)
yarn hosts# Start all the things!
yarn start # 👏🤜🤛🍾🥳
# When you're done dev'ing, spin down the Docker containers
yarn down# Run all the tests
yarn test
# Watch all the tests
yarn test:watchThis project is setup to run functional tests using Cypress.
# Opens up Cypress test dashboard
yarn e2e:devNOTE Database migrations are ran adhoc. You must manually run them before using the app.
yarn db:migrateyarn db:migrate:downyarn db:migrate:gen create-table-foo # the name is up to youExisting migration files can be found in packages/service/src/migrations.
There is a handy dandy generator for creating React hooks for our GraphQL queries/mutations. Give it a try!
cd packages/tool-hook-generator
# Refresh your schema file
# Make sure your GraphQL server is running before you run this command
yarn codegen # Rerun as needed
# Creates a `useUserRegister` mutation hook
yarn hook:mutation UserRegister
# Creates a `useUserSelf` query hook
yarn hook:query UserSelfWARNING: Running the command below will:
- Bump versions in all
package.json's using conventional commits - Update
READMEs using conventional commits - Tag and push a new release to GitHub
- Assuming you have a CircleCI workflow setup...
- It will kick off a release build
- Don't worry, it won't deploy until you manually approve the deployment in CircleCI
While it is possible to unravel, please make sure you mean to release a new version of the repo when running it.
Pending you have permissions to push to master, run the following:
GH_TOKEN=<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN> yarn release
# Follow the prompts
