Design a medical crowdfunding platform
PremiumLow-level designMedium
- State machine
- Campaign status
- Observer pattern
Quick answer
This low-level design interview question asks you to design a medical crowdfunding platform. Aim for a design that is modelled as clear classes, interfaces and relationships that can handle new requirements without a rewrite. Interviewers want to see how you name responsibilities, keep classes small and reason about change.
The problem
Design a medical crowdfunding platform as working classes, like the sites where patients raise money for treatment. Patients run several fundraising campaigns, donors give to many campaigns, and each campaign moves through clear statuses. The hard part is keeping statuses, raised totals and hospital payouts correct when donations and payment results arrive at the same time.
Write the classes, relationships and core methods in any object-oriented language, keeping data in memory. Payments go through a given gateway interface that reports success or failure later, possibly more than once.
What must a medical crowdfunding platform do?
- Campaigns per patient: A patient, or a family member for them, creates several campaigns, each with a goal, end date, hospital and documents; at most 3 open at once.
- Donations across campaigns: A donor gives to any number of ACTIVE campaigns, optionally anonymously, and sees all their donations in one list.
How well must it do it?
- Correct totals: Raised totals and statuses stay correct when many donations succeed on one campaign at the same moment.
- Valid transitions only: No method can move a campaign into a status the rules do not allow.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- State machine
- Campaign status
- Observer pattern
- Strategy pattern
- Idempotent callbacks
- Per object locking
How you’ll practise
- Requirements
- Core objects
- Class relationships
- Key flows
- Extensibility
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any low-level design round.
- Lists the use cases before writing classes
- Gives each class one clear responsibility
- Uses interfaces where behaviour is likely to change
- Applies a design pattern only when it solves a real problem
- Handles edge cases and invalid states explicitly
- Walks through one use case end to end with the model
Questions people ask about this interview question
- Which design type is this question?
- It is a low-level design question. You design a medical crowdfunding platform and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Medium. Entry-level engineers can practise it, but it expects you to reason about requirements and trade-offs, not only list components.
- What should I cover first?
- Start with the use cases and the core entities, then the responsibilities of each one. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team