Interactive labs
Reading about architecture is one thing. These small simulators let you push the buttons and watch what the patterns do under stress. They run on made-up data to explain the ideas, and are not measurements from a real system.
Follow one request all the way down
Send an order through the system and see which layer owns each millisecond.
Interactive waterfall: see which architectural layer owns each millisecond.
- Client · Next.js 1616 ms
Form validated client-side with Zod matching the backend DTO schema.
Client · Next.js 1616 msForm validated client-side with Zod matching the backend DTO schema.
- Gateway · TLS / Reverse Proxy8 ms
SSL termination, CORS policy validation, and IP rate limiting applied.
Gateway · TLS / Reverse Proxy8 msSSL termination, CORS policy validation, and IP rate limiting applied.
- Tenant Scope · AsyncLocalStorage12 ms
AsyncLocalStorage context scoped; tenant context and organization branding injected.
Tenant Scope · AsyncLocalStorage12 msAsyncLocalStorage context scoped; tenant context and organization branding injected.
- Auth & RBAC · NestJS18 ms
JWT verified and 5-level hierarchical RBAC permission guards verified.
Auth & RBAC · NestJS18 msJWT verified and 5-level hierarchical RBAC permission guards verified.
- Cache · Redis10 ms
Fast-path lookup for tenant entitlement and active session state.
Cache · Redis10 msFast-path lookup for tenant entitlement and active session state.
- Database · PostgreSQL / MongoDB22 ms
Tenant-segregated query execution with indexed multi-tenant constraint.
Database · PostgreSQL / MongoDB22 msTenant-segregated query execution with indexed multi-tenant constraint.
- Vault · Azure Blob / AWS S335 ms
Time-limited SAS token generated for secure document vault upload.
Vault · Azure Blob / AWS S335 msTime-limited SAS token generated for secure document vault upload.
- Audit Trail · Immutable Log14 ms
Append-only activity audit log recorded with actor and timestamp.
Audit Trail · Immutable Log14 msAppend-only activity audit log recorded with actor and timestamp.
- Event Dispatch · Webhook60 ms async
Webhook event dispatched asynchronously for email notifications and downstream sync.
Event Dispatch · Webhook60 ms asyncWebhook event dispatched asynchronously for email notifications and downstream sync.
How do you keep customers' data apart?
Three tenancy strategies, what each costs, and when I pick it.
database A
database B
database C
- Isolation
- Ops simplicity
- Easy migrations
- Noisy-neighbour safety
I pick this when: Multi-tier SaaS platforms bridging Platform Admins, Reseller Consultancies (white-label workspaces), and Client Portals.
In practice: Implemented on Complete HR with HRMS Services, supporting custom domains, white-label themes, and support impersonation.
Role-based access, and the response that never leaks
Choose a role. See its permissions, and what the same endpoint returns for each.
Read: 5-level hierarchical RBAC
- View cost ratesAllowed
- Manage billingDenied
- Approve timesheetsAllowed
- View reportsAllowed
- Manage staffDenied
- Use the client portalDenied
- Cross-tenant accessDenied
What Manager receives from GET /staff/s_42
{
"success": true,
"data": {
"id": "s_42",
"name": "A. Example",
"team": "Delivery",
"costRate": "38.50",
"margin": "0.31"
}
}Admins and managers use a separate response class that includes the cost rate.
Rotating refresh tokens, and what a stolen one gets you
Log in, let the access token expire, refresh, then replay an old refresh token the way an attacker would.
Read: Authentication that survives review
Cookies in the browser (HttpOnly, never readable by scripts)
- None yet. Log in.
- Waiting for a request…
An incremental event and data sync that survives failure
Fail a page halfway, rerun, and watch the checkpoint and idempotent upserts keep the data correct.
Read: Webhook event delivery pipelines
Checkpoint
0
Rows in the app
0 / 8
- ITEM-100v1
- ITEM-101v2
- ITEM-102v3
- ITEM-103v4
- ITEM-104v5
- ITEM-105v6
- ITEM-106v7
- ITEM-107v8
- Press Run sync. Then try failing page 2 and running again.