ASTRA<CODEX>

AI-driven software engineering studio

←All Case Studies
5.1
SaaS Platforms

Enterprise B2B portal

A multi-tenant customer portal that replaced email, spreadsheets and a legacy admin panel for a supplier with hundreds of business clients.

Multi-tenancySSO & rolesSelf-service onboardingAudit trail
1Context

One supplier, hundreds of business customers

Orders, documents and account changes arrived by email. Each new client meant a custom setup in a legacy admin panel, and support couldn't see what the customer saw.

2Challenge

Every client was a snowflake

  • Onboarding took weeks of manual configuration.
  • No shared view between customer, sales and support.
  • Data from different clients lived in one database with no isolation guarantees.
  • Compliance asked for a full history of who changed what.
3What we build

A multi-tenant portal on one codebase

  • Per-tenant branding, roles and SSO (SAML/OIDC) with row-level data isolation.
  • Self-service onboarding: a new tenant is live in minutes, not weeks.
  • Shared "customer view" for support, with impersonation under audit.
  • Event-sourced audit trail and export for compliance.
  1. # stack · models · guardrails
  2. tenant_isolation: Postgres row-level security + tenant-scoped connection context
  3. identity: OIDC / SAML via Keycloak, role model per tenant
  4. audit_trail: event-sourced domain events, append-only, exportable
  5. onboarding: declarative tenant config, no per-client deploys
  6. support_view: audited impersonation with scoped read tokens
  7. caching: tenant-aware cache keys, per-tenant rate limits
4Outcome

Onboarding became a click, not a project

Setup time collapsed from weeks to minutes, support tickets about "what do you see" disappeared, and the same platform now serves new customer segments without code changes.

15min
to onboard a new tenant
weeks → self-service, no ticket
1codebase
for every tenant
row-level isolation
0deploys
per new client
1 per client → config, not code
100%
of changes in the audit trail
who · what · when
−60%
onboarding cost per client
no engineering hours per setup
<9mo
payback on the platform
vs. legacy admin + manual ops