To see live example you can visit github pages.
For a detailed explanation of why certain decisions were made and what guidelines should be followed review the development philosophies documentation
-
Install yarn package manager if you do not already have it on your system.
-
From project root run the yarn cli to install all dependencies
yarn install
- Run the docker build command
yarn docker-compose-build:dev
- Run the docker run command
yarn docker-compose-run:dev
NOTE: If you have not setup the database make sure to run the setup database commands.
- Run the database migration command
docker-compose-prisma-migrate:dev
- Run the database reset command
docker-compose-prisma-migrate-reset:dev
- Run the database initial migration command
docker-compose-prisma-migrate-initial:dev
Error: ENOSPC: System limit for number of file watchers reached
Stack Overflow solution for updating max file watchers
You should not run into this issue unless you are trying to run all (or many) workspaces dev modes at once. Having this many file watchers will crash some systems, and slow down most. Instead of watching all workspaces it is recommended that the root yarn dev
script is used and any other packages that are needed are run in a separate terminal window with yarn workspace @mqs/<WORKSPACE_NAME> dev
.
-
Create an
.env.prod
file be either copying the.env.dev
or.env.prod.example
files and making the necessary changes.Note: This only needs to be done once, so you can skip to step 2 if this is not the first time starting up a production instance.
- copy the development env file and use it as the production env file
cp .env.dev .env.prod
- copy the production example env file and use it as the production env file
cp .env.prod.example .env.prod
After copying the file, make sure to update
.env.prod
with the proper values - copy the development env file and use it as the production env file
-
Run the docker build command
yarn docker-compose-build:prod
-
Run the docker run command
yarn docker-compose-run:prod
Open http://localhost:3000.
To shutdown all running containers:
yarn docker-kill
This turborepo uses Yarn as a package manager. It includes the following packages/apps:
Each workspace is built with TypeScript.
errors
: utilities to handle errorseslint-config
: sharedeslint
configurationsgraphql-client
: react client and api utilities for graphqlgraphql-schema
: graphql schema and typesgraphql-server
: graphql server and resolversjest-preset
: Jest configurationsjobs
: server workers and utilitieslogger
: Isomorphic logger (a small wrapper around console.log)prisma
: Database ORMreact-client-components
: a React client component libraryreact-server-components
: a React server component libraryreact-testing-lib
: a React testing libraryreact-utils
: a React utilities librarystorybook
: a package to build and deploy Storybook documentationstorybook-utils
: utilities for implementing Storybookstyle
: shared css and style utilities for components and appstailwind-config
: a generalized Tailwind CSS configurationtokens
: utility to handle access and refresh tokenstsconfig
: tsconfig.json;s used throughout the monorepozod
: utilities for handling validation with Zod
tsc
: a script to turn typescript source code into javascript
This Turborepo has some additional tools already setup for you:
- CSpell for spell checking
- ESLint for code linting
- GraphQL for fetching data
- GraphQL CodeGen for automated code generation
- Jest test runner for all things JavaScript
- PostgreSQL Open Source Relational Database
- Prisma Database ORM for Node and TypeScript
- Storybook for documentation
- Tailwind CSS for style
- TypeScript for static type checking
- Zod for schema validation with static type inference