- Install node.js
- Clone the repository
- Open Terminal and navigate to the project folder -
cd path/to/project
- Install Yarn if you don't have it already -
npm i -g yarn
- Run the
yarn
command to install project dependencies - If you don't have docker, install docker and docker-compose
https://docs.docker.com/compose/install/
IMPORTANT! Make sure to:
- Use Prettier and have the
Editor: Format On Save
setting in VSCode turned on to keep the code consistent. - Always run pre-commit checks before commiting your code. If it won't pass, it won't be able to be built. More info about the checks can be found below.
- Check the other
README.md
files located in subfolders (if provided) for further info.
You can run the project via Terminal using one of the following commands:
-
yarn start:client
: Runs only the client onlocalhost:8080
-
yarn start:server
: Runs only the server onlocalhost:4000
-
yarn start:db
: Runs only the db onlocalhost:5432
-
yarn start
: Runs the whole project, the client and the server parts will run on the addresses mentioned above -
yarn stop:db
: Stops db and resets docker interfaces if it doesn't stop automatically
Besides the start
script, there are other ones which can be used to work with the project. They are supposed to be run in Terminal, while being navigated to the root directory of the project. The available scripts are:
-
yarn
: Installs all the dependencies, needs to be run before using the project -
yarn install:client
: Installs only the client dependencies -
yarn install:server
: Installs only the server dependencies -
yarn build
: Builds the whole project for production -
yarn build:client
: Builds only the client for production -
yarn build:server
: Builds only the server for production -
yarn add:client [optional: --dev] [packageName]
: Adds a new dependency (or devDependency, based on the inclusion of the--dev
flag) to the client and installs it -
yarn add:server [optional: --dev] [packageName]
: Adds a new dependency (or devDependency, based on the inclusion of the--dev
flag) to the server and installs it -
yarn remove:client [packageName]
: Removes and uninstalls a dependency from the client -
yarn remove:server [packageName]
: Removes and uninstalls a dependency from the server -
yarn storybook
: Runs Storybook (visual documentation of the client) -
yarn precommit
: Runs pre-commit checks on the whole project -
yarn precommit:client
: Runs pre-commit checks only on the client