Capstone — SaaS architecture and platform engineering
Design a multi-tenant B2B SaaS product with authentication, workspaces, permissions, analytics, large tables, editable workflows, notifications, billing/settings, live updates, SSR/RSC-capable infrastructure, and several frontend teams shipping independently.
The deliverable is an architecture proposal plus a thin vertical slice that proves the design.
Start with domains, not folders
Each domain owns its components, local state, types, data adapters, mutation logic, tests, and intentional public exports. Consumers should use feature entry points rather than deep imports into internals.
State architecture matrix
| Category | Example | Owner |
|---|---|---|
| Local UI | dropdown open state | component |
| Feature state | selected operation | feature boundary |
| URL state | filters/page/sort | router/URL |
| Server state | records/permissions | server/data layer |
| External state | live connection | external store |
| App-shell state | theme/workspace facade | narrow provider/store |
| Derived state | visible totals | render calculation |
Multi-tenant trust boundary
UI hiding improves UX; it never replaces server authorization.
Permission model
Prefer a domain policy such as:
can(currentUser, 'operation:update', operation)
over scattered role-string checks. The client model can keep UI consistent, while the server remains authoritative.
Server/Client architecture
Justify boundaries using execution, data access, serialization, interactivity, bundle cost, and framework/runtime constraints.
Data access direction
This lets transport evolve without rewriting every component.
Mutation architecture
Document retries, duplicate submissions, stale/conflicting edits, optimistic rollback, and live-event convergence.
Failure and reveal maps
Expected mutation errors remain normal UI state. Unexpected rendering failures use Error Boundaries.
Suspense boundaries should preserve the stable shell and reveal content in groups aligned with user tasks.
Design system as platform infrastructure
Shared primitives require tests, versioning, deprecation policy, migration guidance, and ownership.
Performance budgets
For high-cost features ask whether work can stay server-side, update scope can shrink, lists can be paginated/windowed, code can split, waterfalls can disappear, or non-urgent work can defer. Add manual memoization only after measurement.
Observability standard
Track outcomes, not sensitive payloads.
Team ownership and dependency direction
Use CODEOWNERS/package ownership/ADRs so shared changes have visible responsibility and migration paths.
CI and rollout quality gates
Capstone evidence
A strong submission includes a domain/ownership map, state matrix, server/client/trust boundaries, mutation contract, error/Suspense map, design-system contract, performance budget, testing strategy, observability model, ADRs, and a rollback/migration plan.
The staff-level skill is not drawing the most boxes. It is designing boundaries that let multiple teams change a production system safely.