Getting Started

Installation

Set up perfscale locally for development

Prerequisites

ToolMinimum version
Node.js22
pnpm10
Docker24
Rust / cargo1.86

Clone and initialize

git clone https://github.com/your-org/perfscale.git
cd perfscale

# One-time setup: installs deps, starts Docker services, pushes DB schema
pnpm dx:init

dx:init will:

  1. Copy .env.example.env
  2. Install all JS dependencies
  3. Install cargo-watch (Rust hot-reload)
  4. Pull and start Docker images (PostgreSQL + Keycloak)
  5. Wait for both services to be healthy
  6. Push the database schema

Start development servers

After initialization, start everything with a single command:

pnpm dev

This concurrently starts:

  • Next.jshttp://localhost:3000
  • Rust BFFhttp://localhost:8090
  • Swagger UIhttp://localhost:8090/swagger-ui/

PostgreSQL and Keycloak are managed by Docker Compose and start automatically.

Load demo data

pnpm --filter @perfscale/site db:seed

Creates the demo@perfscale.ru user with three machines and a sample test.

Environment variables

All variables live in .env at the monorepo root. Apps read from it automatically via dotenv-cli.

VariableDescription
DATABASE_URLPostgreSQL connection string
KEYCLOAK_ISSUERKeycloak realm URL
KEYCLOAK_CLIENT_IDOIDC client ID
KEYCLOAK_CLIENT_SECRETOIDC client secret
NEXTAUTH_URLPublic URL of the Next.js app
NEXTAUTH_SECRETRandom secret for JWT signing