The problem
A certification business needs three products in one: a portal for members, a portal for training partners around the world, and an admin portal for operations. It also needs an exam provider, a credential provider, and the learning platforms that schools already use.
Two risks grow with every feature. The three portals drift apart into three codebases. And every price change waits for a developer and a deploy.
Architecture
Key decisions
One rendering contract for every portal
Server components prefetch data and hand it to React Query before the first paint. Domain hooks call server actions directly, with no separate API layer. Each hook owns its optimistic update, rollback, and cache invalidation through central query-key factories. All three portals follow the same contract, so a pattern built once works everywhere.
Billing as configuration
The schema mirrors Stripe, with a draft, preview, and live state for every product. Admins create products, set prices, run coupons, retire packages, and grant access to single users. None of it needs code or a deploy.
Integrations at the edges
Exam booking through Certiverse, credentials through Accredible, and an LTI 1.3 plugin for Moodle and Canvas connect at the edge of the platform. The LTI plugin turns every partner school's learning platform into a channel for the courses.
Results
- The business team ships pricing and catalog changes with no deploy.
- Partners deliver courses inside the learning platform their school already runs.
- New features in any portal reuse the same hooks and cache rules.
Tradeoffs
Server actions with no API layer keep the code small, but other clients cannot call them. A mobile app or a public API would need its own layer later. For three web portals, the smaller surface was the right call.