finds.dev← search

// the find

Elfocrash/clean-minimal-api

★ 659 · C# · MIT · updated May 2023

A project showcasing how you can build a clean Minimal API using FastEndpoints

A reference implementation showing how to structure a Minimal API around FastEndpoints instead of MVC controllers, using a single Customers CRUD example with a DDD-flavored domain layer. It's aimed at .NET developers evaluating FastEndpoints as a controller replacement and wanting a concrete folder structure to copy from, not a template you'd actually fork and build on.

The endpoint-per-file structure (CreateCustomerEndpoint, GetCustomerEndpoint, etc.) with paired Summary classes for Swagger metadata is a clean demonstration of FastEndpoints' single-responsibility model versus a bloated controller. The domain layer uses real value objects (CustomerId, EmailAddress, DateOfBirth, Username) instead of primitives, and there's a dedicated ApiContract-to-Domain mapping layer so the API shape never leaks into the domain. ValidationExceptionMiddleware centralizes FluentValidation failures into one response shape rather than handling them per-endpoint.

The README is a literal TODO stub, so there's no explanation of why the architecture is structured this way, no setup instructions, and no mention of the companion video/article this almost certainly accompanies. No commits since May 2023, so it predates several FastEndpoints and .NET releases and nobody's maintaining it. There's no tests directory anywhere in the tree, which is a real gap for a repo whose whole pitch is 'clean' architecture — there's nothing proving the layering actually makes the code more testable. It's also a single CRUD example, so patterns like cross-aggregate operations or querying beyond get-by-id aren't shown at all.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →