Skip to Content
IntroductionGeneralGetting Started

Getting Started

Step-by-step guide to set up and start working with the project.

Welcome to the initial setup guide for our project. This guide will walk you through setting up your environment and beginning development. Before you start, make sure you have the required global dependencies installed.

Node.js and .nvmrc

We use nvm  to manage Node.js versions. First, install nvm by following the installation instructions .

In the project’s directory, run nvm use to switch to the Node.js version specified in the .nvmrc file. For automatic version switching when navigating directories, consider enabling deeper shell integrations here .

Our .nvmrc specifies Node.js version lts/hydrogen (v18), which is supported long-term.

If nvm isn’t for you, any method that installs and uses Node.js version 18 is fine.

Package Manager: pnpm

We use pnpm  as our package manager. Install pnpm by following this guide . pnpm has several benefits:

  • Speed: It is much faster than some alternatives.
  • Disk Space Efficiency: It stores packages globally and links them to projects as needed.
  • Security: It checks the integrity of packages before they are used.

Installing Dependencies

To install project dependencies, run:

pnpm install

This will install all dependencies listed in package.json according to the pnpm-lock.yaml file.

Starting the Project

To start the project in development mode, use:

pnpm dev

This starts all projects in the monorepo. To start a specific project, use the --filter option with the project name:

pnpm dev --filter "@akinon/docs" # <- name from package.json

You can use the --filter option with almost any pnpm command to target specific projects.

Installing a New Package

To add a new package to a specific project, use:

pnpm add <package-name> --filter "<project-name>"

If you don’t specify the project with --filter, the installation will attempt and fail in the root directory. Unless you have a very good reason to do so, you should not install packages in the root directory.

To install a package in the root directory:

pnpm add <package-name> -W

Running Tasks

You can execute tasks using pnpm <task-name>. You should always run commands from the project root since it’s integrated with turbo caching mechanism. Running commands from the package directories might result in unexpected behaviour. Here’s a list of available tasks and what they do:

Task NameDescription
buildBuilds all projects and packages for production.
devStarts all projects in development mode.
serveServes the built dist/ folder.
testRuns the test suite.
test:coverageRuns the test suite, generating a coverage report in the coverage directory.
lintRuns the linter.
cleanCleans the node_modules directory for all packages and root, preparing for a fresh install.
typecheckChecks for missing TypeScript type definitions.
check:allRuns install, lint, test, typecheck and build.