Enforce strict three-layer architecture: thin HTTP routes, pure service logic with domain errors, isolated data access with dependency injection.
94
93%
Does it follow best practices?
Impact
97%
1.08xAverage score across 5 eval scenarios
Passed
No known issues
A fintech startup is launching a consumer app that requires users to register with their name, email address, date of birth, and an initial deposit amount. The registration flow has several requirements: the company is regulated and must send a welcome email to every new user, emit an analytics event for their growth team, and notify a compliance webhook when a user's initial deposit exceeds $10,000.
The backend engineer needs to implement the registration endpoint. Past implementations at the company have had bugs where welcome emails were accidentally sent twice (once in the route, once in the service), or where the analytics event was skipped if an error occurred mid-route. The tech lead wants a clean separation so that these post-registration side effects are reliable and testable.
The business rules are:
Produce TypeScript files:
src/routes/users.ts — HTTP route handler for POST /api/userssrc/services/userService.ts — Business logic for registrationsrc/repositories/userRepo.ts — Data access (in-memory stub is fine)src/errors/domain.ts — Domain error typesAlso produce side-effects-notes.md that documents which side effects are triggered, where in the code they are triggered, and why they are placed there.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
separation-of-concerns
verifiers