This post is mostly about CRUD-heavy backend applications in TypeScript, Go, and Rust, especially ones using modern typed query builders or lightweight ORMs. I’m not arguing that repositories are useless. I’m arguing that unless a repository protects a real aggregate boundary or hides genuinely meaningful persistence complexity, it usually becomes a worse interface over your database.
The repository pattern originates from Patterns of Enterprise Application Architecture, with Domain-Driven Design and 'layered' (i.e. hexagonal/clean/onion etc) architecture expanding on it from there.
There are legitimate reasons it gained in popularity:
It provides a clean way to separate IO from business logic.
Testing business logic becomes a lot easier/faster, since there's a clean seam to swap in a test-double and keep everything in-memory.









