Skip to content

Development Environment

This page covers the tooling around the build: environment management, frontend workspaces, and running a complete local network.

Both the virtengine and provider repositories use direnv extensively to set up and update the environment as you move through the source tree. Minimum required version is 2.32.x — some distributions ship older builds; use the binary releases if needed.

Whitelist your checkouts to avoid constant direnv allow prompts, in ${XDG_CONFIG_HOME:-$HOME/.config}/direnv/direnv.toml:

[whitelist]
prefix = [
"<path to virtengine sources>",
"<path to provider-services sources>"
]

VirtEngine uses pnpm for frontend workspaces:

Terminal window
corepack enable
corepack prepare pnpm@10.28.2 --activate
pnpm --version

Install workspace dependencies when touching frontend code:

Terminal window
pnpm -C portal install # Portal app
pnpm -C sdk/ts install # TypeScript SDK

The localnet provides a complete local development environment with all VirtEngine services running in Docker containers.

Prerequisites: Docker and Docker Compose, Go 1.25.5+ (matching go.mod), and a Bash shell (WSL2 on Windows; native on Linux/macOS).

Terminal window
# First time only
chmod +x scripts/localnet.sh scripts/init-chain.sh
# Start everything
./scripts/localnet.sh

The localnet gives you a running chain to develop against without touching a public network — the fastest loop for module, daemon, and client work.

PathContents
x/The 27 on-chain modules — see the module map
pkg/Shared Go packages (economics simulation, HPC workload library, provider daemon internals)
cmd/Binaries, including hpc-node-agent
sdk/ts/TypeScript SDK workspace
portal/Portal frontend workspace
mobile/veid-capture-app/VEID capture reference app
docs/, _docs/In-repo technical and operational documentation
make/Build system internals (init.mk, setup-cache.mk)
config/mainnet/Mainnet launch configuration and genesis bundle

Go tests run per package as usual; the Makefile wires broader gates. Two useful entry points:

Terminal window
# Economics simulation & audit framework
go test -v ./pkg/economics/...
# A single module
go test ./x/settlement/...