Erik Mostert
← All projects

API Architecture Demo: Bad Design vs. Good Design

C#ASP.NET CoreEF CoreDapperSQL Serverk6Next.js

A live architecture write-up, not just a slide deck claim: erik-mostert-profile-bad-api deliberately implements common anti-patterns (Singleton DbContext, N+1 queries, no pagination, no caching, no rate limiting) against a seeded e-commerce database, while erik-mostert-profile-good-api solves the same problem with a layered, test-first architecture (Dapper read repositories, output caching, a transactional outbox feeding a denormalized read model, per-IP rate limiting). Both repos are fully self-contained and independently clonable — no shared code between them — and both run the identical k6 load profile so the comparison numbers are apples to apples, not two separate stories.