Skip to content

Local development

Summarized from LOCAL-DEV.md. Requires Docker Desktop running.

Ports

Windows Hyper-V may block 5433–5532 — the stack uses 25xxx host ports.

ServiceHost port
Platform Postgres25434
VectraLabel Postgres25433
TenaBill Postgres25435
Redis26379
MinIO9000 / 9001
Mailpit18025 / 11025
SaaSRuntime API15096
VectraLabel API15153
TenaBill API15160
TenaBill Web (merchant console)15165
TenancyEngine Console15200

Start all

powershell
cd D:\repos\tenancy-platform; docker compose up -d
cd D:\repos\vectralabel; docker compose up -d
cd D:\repos\tenabill; docker compose up -d

# APIs (3 terminals)
dotnet run --project D:\repos\tenancy-platform\src\SaaSRuntime.Api --launch-profile http
dotnet run --project D:\repos\vectralabel\src\VectraLabel.Api --launch-profile http
dotnet run --project D:\repos\tenabill\src\TenaBill.Api --launch-profile http

# Console UI
cd D:\repos\tenancy-platform\src\TenancyEngine.Console
npm install
npm run dev
bash
cd tenancy-platform && docker compose up -d
cd vectralabel && docker compose up -d
cd tenabill && docker compose up -d

# APIs (3 terminals)
dotnet run --project tenancy-platform/src/SaaSRuntime.Api --launch-profile http
dotnet run --project vectralabel/src/VectraLabel.Api --launch-profile http
dotnet run --project tenabill/src/TenaBill.Api --launch-profile http

# Console UI
cd tenancy-platform/src/TenancyEngine.Console
npm install
npm run dev

Sign-in (OIDC)

UserPasswordOIDC client
[email protected]ChangeMe!Dev123tenancyengine-console
[email protected]ChangeMe!Dev123app-scoped (e.g. vectralabel)
[email protected]ChangeMe!Dev123tenabill-merchant-console

Dev URLs (*-dev.* via Cloudflare tunnel)

WhatURL
SaaSRuntime / OIDChttps://auth-dev.saasruntime.com
Platform APIhttps://api-dev.saasruntime.com
TE Console loginhttps://console-dev.tenancyengine.com/login
TE Console apphttps://console-dev.tenancyengine.com/console
Account hubhttps://account-dev.tenancyengine.com
MFA enrollmenthttps://auth-dev.saasruntime.com/account/security/mfa/enroll
Mailpithttp://127.0.0.1:18025
VectraLabel apphttps://app-dev.vectralabel.com
VectraLabel APIhttps://api-dev.vectralabel.com
TenaBill consolehttps://console-dev.tenabill.com

Platform login UI (/account/login) only works with a valid OIDC returnUrl — use the console login link above.

OIDC login flow

  1. Open https://console-dev.tenancyengine.com/login
  2. Redirects to SaaSRuntime login (PKCE authorize)
  3. Sign in → MFA challenge if enrolled → back to console

Org signup + email verify

powershell
curl -X POST https://auth-dev.saasruntime.com/api/v1/signup/organization `
  -H "Content-Type: application/json" `
  -d '{"organizationName":"Test Co","organizationSlug":"test-co","email":"[email protected]","password":"ChangeMe!Dev12345","displayName":"Owner"}'

Check verification email in Mailpit → click link on https://auth-dev.saasruntime.com/account/verify-email?...

MFA challenge methods

After TOTP enrollment, set preferred method at /account/security, then sign out and sign in via https://console-dev.tenancyengine.com/login:

  • Email OTP → Mailpit
  • SMS OTP → API log line Dev SMS code for +1... (dev only)
  • Authenticator → TOTP app

Swagger UI (Development only)

APISwagger
SaaSRuntimehttps://auth-dev.saasruntime.com/swagger
VectraLabelhttps://api-dev.vectralabel.com/swagger
TenaBillhttps://api-dev.tenabill.com/swagger
  • Admin APIs: Authorize → Bearer token from POST /connect/token (grant_type=console_password)
  • VectraLabel: sign in at /login in the same browser (cookie), or use Bearer JWT from SaaSRuntime

After pulling backend changes (PATCH/DELETE for environments, tenants, etc.), restart SaaSRuntime so edits are not 404.

TenancyEngine platform documentation