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.
| Service | Host port |
|---|---|
| Platform Postgres | 25434 |
| VectraLabel Postgres | 25433 |
| TenaBill Postgres | 25435 |
| Redis | 26379 |
| MinIO | 9000 / 9001 |
| Mailpit | 18025 / 11025 |
| SaaSRuntime API | 15096 |
| VectraLabel API | 15153 |
| TenaBill API | 15160 |
| TenaBill Web (merchant console) | 15165 |
| TenancyEngine Console | 15200 |
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 devbash
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 devSign-in (OIDC)
| User | Password | OIDC client |
|---|---|---|
[email protected] | ChangeMe!Dev123 | tenancyengine-console |
[email protected] | ChangeMe!Dev123 | app-scoped (e.g. vectralabel) |
[email protected] | ChangeMe!Dev123 | tenabill-merchant-console |
Dev URLs (*-dev.* via Cloudflare tunnel)
| What | URL |
|---|---|
| SaaSRuntime / OIDC | https://auth-dev.saasruntime.com |
| Platform API | https://api-dev.saasruntime.com |
| TE Console login | https://console-dev.tenancyengine.com/login |
| TE Console app | https://console-dev.tenancyengine.com/console |
| Account hub | https://account-dev.tenancyengine.com |
| MFA enrollment | https://auth-dev.saasruntime.com/account/security/mfa/enroll |
| Mailpit | http://127.0.0.1:18025 |
| VectraLabel app | https://app-dev.vectralabel.com |
| VectraLabel API | https://api-dev.vectralabel.com |
| TenaBill console | https://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
- Open https://console-dev.tenancyengine.com/login
- Redirects to SaaSRuntime login (PKCE authorize)
- 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)
| API | Swagger |
|---|---|
| SaaSRuntime | https://auth-dev.saasruntime.com/swagger |
| VectraLabel | https://api-dev.vectralabel.com/swagger |
| TenaBill | https://api-dev.tenabill.com/swagger |
- Admin APIs: Authorize → Bearer token from
POST /connect/token(grant_type=console_password) - VectraLabel: sign in at
/loginin 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.