Development Environment
This page covers the tooling around the build: environment management, frontend workspaces, and running a complete local network.
direnv
Section titled “direnv”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>"]Frontend tooling (pnpm)
Section titled “Frontend tooling (pnpm)”VirtEngine uses pnpm for frontend workspaces:
corepack enablecorepack prepare pnpm@10.28.2 --activatepnpm --versionInstall workspace dependencies when touching frontend code:
pnpm -C portal install # Portal apppnpm -C sdk/ts install # TypeScript SDKLocalnet
Section titled “Localnet”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).
# First time onlychmod +x scripts/localnet.sh scripts/init-chain.sh
# Start everything./scripts/localnet.shThe localnet gives you a running chain to develop against without touching a public network — the fastest loop for module, daemon, and client work.
Repository layout orientation
Section titled “Repository layout orientation”| Path | Contents |
|---|---|
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 |
Testing
Section titled “Testing”Go tests run per package as usual; the Makefile wires broader gates. Two useful entry points:
# Economics simulation & audit frameworkgo test -v ./pkg/economics/...
# A single modulego test ./x/settlement/...