Scripts
Documentation for all scripts in each respective package.json
file.
Project Root
All scripts at the root directory are prefixed with g:
for global.
g:commit
: Add a commit using thecommitlint
prompt.g:start-db
: Start the database usingdocker
anddocker-compose
. Seedb/start-db.sh
.g:start-test-db
: Starts a test specific database usingdocker
anddocker-compose
. Seedb/start-test-db.sh
.g:stop-db
: Stops the currently running database. Seedb/stop-db.sh
.g:husky
: Installs huskyg:dev
: Starts the project in development mode.g:dev-test
: Starts a minimal development instance intended for testing in CI/CD.
Client
Prefix scripts with
yarn workspace @app/client
start
: Start the client with NODE_ENV=productiondev
: Start the client with NODE_ENV=developmentinfo
: Seenext info
build
: Build the client.relay
: Start the relay compiler in watch mode.typecheck
: Check that all types are correct.lint
: Lint the client.
E2E
Prefix scripts with
yarn workspace @app/e2e
pretest
: Starts up the project and seeds the DB in preperation to run the playwright tests.test
: Runs playwright tests.test:ci
: Runs playwright tests with the environment variable set toCI=1
so the configuration can be set to run on the CI/CD pipeline.debug
: Runs playwright tests in headed mode, allowing for playwright to open browsers locally to monitor tests as they execute.allure:generate-report
: Takes the test results under the folderapp/e2e/allure-results
and generates a report atapp/e2e/allure-report
.allure:open-report
: Generates and opens an allure report in the browser.
Server
Prefix scripts with
yarn workspace @app/server
start
: Start the client with NODE_ENV=productiondev
: Start the client with NODE_ENV=developmentbuild
: Build the server.add-feat
: Helper script that uses thetemplates/
folder to generate boilerplate for a new feature folder.
yarn workspace @app/server add-feat somNewFeature # will add feature/some-new-feature with the appropriate files
typecheck
: Check that all types are correct.prod
: Only used in prod for running the applicationgenerate
: Generate prisma types. Only necessary to run when the database has been or is being modified and when running the project for the first time.lint
: Lint the server.prisma-db-push
: Pushes the current prisma schema to the DB.prisma-db-seed
: Seeds the DB using the fileapp/server/prisma/seed.ts
.test:prisma-db-push
: Pushes the current schema with theNODE_ENV=test
.test:unit
: Runs unit tests using jest with theNODE_ENV=test
.test:integration
: Runs integration tests using jest with theNODE_ENV=test
test:ci
: Runs all server tests after ensuring the test DB is running. Used for CI/CD pipeline.