Design a multi-tenant online course purchasing and delivery system with the following requirements.
Domain model / requirements
-
There are multiple
Companies
(tenants).
-
Each company has multiple
Organizations
.
-
Each organization has multiple
Members
.
-
The platform hosts multiple
Courses
.
-
Each course can have
prerequisites
(other courses) that must be completed/owned before access.
-
Pricing differs by company
depending on the company’s purchased plan/contract (same course may have different prices for different companies).
-
A company can buy courses
on behalf of members inside an organization
(e.g., assign seats/licenses).
-
New companies, organizations, and members may be created at any time.
-
Every member must have a
system-wide unique Member ID
.
-
You are given (or can assume existence of) a
class definition
object for a course and a function to query a course’s prerequisites.
What to design
-
Core APIs (creating companies/orgs/members, browsing courses, purchasing, assigning entitlements, checking access).
-
Data model (multi-tenancy, membership, purchases/entitlements, prerequisite representation).
-
High-level architecture and key services.
-
How course access is enforced (including prerequisite checks).
-
Scalability, consistency, and operational concerns (auditing, retries, idempotency).
Assume typical enterprise needs: high read volume for catalog/access checks, strict correctness for purchases, and reasonable latency for prerequisite queries.