Skip to content

Latest commit

 

History

History
89 lines (53 loc) · 2.48 KB

CONTRIBUTING.md

File metadata and controls

89 lines (53 loc) · 2.48 KB

Contributor Manual

Tip for new contributors: Take a look at https://github.com/firstcontributions/first-contributions for helpful information on contributing

Quick Guide

Prerequisites

node: ">=18"
pnpm: ">=7"

Setting up your local repository

This repository uses pnpm workspaces, so you should always run pnpm install from the top-level project directory. Running pnpm install in the top-level project root will install dependencies for every package in the repo. We also recommend running other package.json scripts using the pnpm --filter flag instead of changing directories for better ergonomics.

Clone the repository:

git clone https://github.com/Carloitaben/artists-together.git

Install workspace dependencies in the root directory:

pnpm install

Development

This repository is a TypeScript monorepo. A monorepo allows us to share code across applications without friction. To do that, we build packages to share code between apps.

Packages

A package is a piece of shared code. Installed packages live in the node_modules folder, and local packages live in the /packages folder.

Apps

An app is a launchable project and live in the /apps folder.

Interacting with packages and apps

Both packages and apps are directories that host a package.json file. As a rule of thumb, the package.json name field corresponds with the directory name. You can interact with any package.json using the --filter flag of pnpm. Usually you will use it followed by the name of that package.json. Here are some examples:

Install a dependency in /apps/web:

pnpm --filter web add zod

Run the dev script of /apps/web:

pnpm --filter web dev

Install a development-only dependency in /packages/db:

pnpm --filter db add -D typescript

Run the push script of /packages/db:

pnpm --filter db push

Developing a package or app

Some packages or apps need specific configuration in order to be able to run locally. Refer to their respective README.md file to read more.

Running tests

TODO

Branches

TODO improve this section

main

The stable release of apps and packages happens on this branch. Pull requests landed here will redeploy production environments.

Other branches

Other branches are usually linked to a pull request.