Skip to content

Installation

Get started with the Petfolio monorepo in just a few steps.

Prerequisites

Ensure you have the following installed:

  • Node.js 22.x or higher
  • npm 10.x or higher
  • Git 2.40 or higher
  • Python 3.9+ (for MkDocs documentation)
  • Docker 24.x (for containerized development)
  • Visual Studio Code (recommended IDE)
  • Playwright browsers (for e2e testing)

Clone the Repository

git clone https://github.com/YOUR_USERNAME/petfolio-fe.git
cd petfolio-fe

Install Dependencies

Node.js Dependencies

npm install

This will install all dependencies for the monorepo, including:

  • Next.js and React
  • Material UI components
  • Nx CLI and plugins
  • Testing frameworks (Jest, Playwright)
  • Development tools

Python Dependencies (for Documentation)

# Navigate to docs directory
cd apps/petfolio-docs

# Install MkDocs and plugins
pip install -r requirements.txt

# Or using a virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

Verify Installation

Check that everything is installed correctly:

# Verify Nx CLI
npx nx --version

# Verify Node.js
node --version

# Verify MkDocs
mkdocs --version

Expected output:

Nx: 22.2.3
Node: v22.x.x
mkdocs: 1.6.x

First Build

Build the entire monorepo to ensure everything works:

# Build all projects
npx nx run-many --target=build --all

# Or just build the main app
npx nx build petfolio-business

!!! success "Installation Complete!" You're ready to start developing! Check out the Quick Start guide next.

Troubleshooting

Node version mismatch?

Use nvm to manage Node.js versions:

nvm install 22
nvm use 22
Python not found?

Download Python from python.org or use a package manager:

# macOS
brew install python

# Windows
winget install Python.Python.3.12
Nx cache issues?

Clear the Nx cache and reinstall:

npx nx reset
npm ci

Next Steps