Skip to content

Latest commit

 

History

History
109 lines (77 loc) · 2.73 KB

CONTRIBUTING.md

File metadata and controls

109 lines (77 loc) · 2.73 KB

Contributing

Getting started

Clone the repo

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

set up environment variables

  1. Create a .env.local file inside apps/client, and write the variables. The list of necessary variables are listed in apps/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
  1. Fill in the env variables

  2. Create a .env file inside apps/api, and write the variables. The list of necessary variables are listed in apps/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
  1. Fill in the env variables

Install turborepo globally

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

Install packages

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

Using turborepo for running npm scripts

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

run development server

turbo dev

run linting

turbo lint

run build

turbo build

run tests

turbo test

Api docs

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

About linting and formatting

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!