In this case, we pull the original repository, following a case in which you have permissions over this repository. If it's not the case, create a fork and use the same command from the example below, and replace the repository URL with your fork URL.
git clone https://github.com/Huilensolis/memoir --depth=1
- Create a
.env.local
file insideapps/client
, and write the variables. The list of necessary variables are listed inapps/client/env.example
cd apps/client # move to the client folder
touch .env.local # create a .env.local file
cp .env.example .env.local # copy the content of env.example file to .env.local file
-
Fill in the env variables
-
Create a
.env
file insideapps/api
, and write the variables. The list of necessary variables are listed inapps/api/env.example
cd apps/api # move to the api folder
touch .env # create a .env file
cp env.example .env # copy the content of env.example file to .env file
- Fill in the env variables
In this repository, we use bun as the package manager, but for installing turborepo, we are going to need npm
, yarn
or pnpm
.
pnpm:
pnpm add turbo --global
npm:
npm install turbo --global
yarn:
yarn global add turbo
For this step, we are going to have bun installed
curl -fsSL https://bun.sh/install | bash
Now, placed in the project's root folder, install all dependencies
bun i
The command turbo
works as a npm script executer. It executes the scripts declared on both the api and client package.json.
For more information, see https://turbo.build/repo/docs
turbo dev
turbo lint
turbo build
turbo test
Once you have started the development server of the API, you can see the docs on this endpoint. Adapt the endpoint to your case
localhost:3001/docs
We use eslint
and prettier
on the client package, while we use biome
on the api package.
To include linting within your IDE, you can add the following extensions:
Tip
if your IDE does not support some of the linters/formatters, don't worry about it, we have a CD/CI GitHub workflow to format the code on each PR!