Clean Architecture and MediatR
سؤال انترفيو في موني فيلوز (مصر) · المرحلة: انترفيو تقني · المجال: تصميم الأنظمة والتصميم الكائني · الوظيفة: مهندس باك إند · الصعوبة: متوسط · اتسأل مرتين، آخرها أكتوبر 2025
What they ask
The on-site technical round is long, one to two hours, and most of it is a design conversation rather than live coding. The backend is .NET, and the recurring theme is Clean Architecture and the Mediator pattern: how you have used them, where they helped, and where they got in the way.
Expect a prompt along these lines:
Design the backend module for a savings circle (gam3eya): members join a circle, pay monthly, and one member receives the payout each cycle. Show me the layers, the use cases, and how a
PayInstallmentrequest flows through the system.
They then go deep on specifics:
- Which layer owns the rule "a member cannot receive the payout before completing their payments", and why.
- How a MediatR request handler, a pipeline behavior for validation, and the domain entities relate.
- What happens when two handlers must touch the same aggregate in one transaction.
- What you would not put behind the mediator.
They also ask about the technical work at your current company in real detail: what you built, what you would change, and how you made architectural decisions.
What they look for
- The dependency rule stated correctly: domain at the centre, application use cases around it, infrastructure and web on the outside.
- Pragmatism. Saying "for a small CRUD module this is overkill" is a good sign, not a bad one.
- Concrete experience with CQRS-style handlers, validation behaviors, and unit-testing a handler in isolation.
- Money handling instincts: idempotent payment commands, decimal types, an audit trail.
The interviewers are described as friendly and the round conversational, so ask questions back.