Back to Articles
.NET Aug 14, 2026 3 min read

Project Template: ASP.NET Core Web Api Modular Monolith

Tired of doing the starting configuration again and again for new projects? Here is the solution. Use this Modular Monolith ASP.NET Core Web Api starting template and directly jump into main code.

Project Template: ASP.NET Core Web Api Modular Monolith

I was tired of doing the same things of "setup work" before writing a single line of real business logic. So I fixed it and I'm open-sourcing it.

The Problem: Every time I start a new ASP.NET Core Web Api project, it's the same story. Create the solution. Wire up a Result pattern. Add a global exception middleware. Set up validation pipelines. Configure Serilog. Add Swagger + JWT auth support. Structure it so it doesn't turn into a spaghetti "fat controller" mess six months in.

None of that is hard. But all of it is repetitive and repetitive setup is where good intentions go to die. You tell yourself "I'll clean this up later," and later never comes.

The Idea: After doing this setup for the Nth time on a personal project, it clicked I wasn't building a project, I was rebuilding the same foundation every time. So instead of copy-pasting old folders into new solutions (and dragging along whatever mess was in them), I stripped it down to a clean, generic base and turned it into a GitHub template repository.

What it solves:

  • A modular, plug-in architecture (register self-contained modules instead of one giant tangled project)
  • CQRS-lite request/response pipeline with an ISender, request handlers, and pipeline behaviors
  • FluentValidation wired into the pipeline automatically
  • A consistent Result<T> pattern for success/failure responses across every endpoint
  • Centralized exception handling middleware — no more try/catch scattered everywhere
  • Serilog logging configured for console + rolling file sinks, config-driven
  • Swagger UI with JWT Bearer auth support baked in

How to use it:

  1. Hit Use this template on the repo
  2. Rename it to your project
  3. Add your first module implementing IModule
  4. Start writing actual business logic

The boring 80% is already done. No more "let me just set up the boilerplate real quick" turning into a lost afternoon.

How to contribute: This is early and opinionated which means it'll only get better with more eyes on it. Open an issue if something feels off, submit a PR if you've got an improvement, or start a discussion if you'd approach a piece of it differently. Every serious backend dev has their own opinions on "the right way" to structure a project I'd genuinely like to hear yours.

If you're a .NET developer who's ever felt that "ugh, this again" moment before starting a new backend project, this is for you.

⭐ Star it if it's useful šŸ“ Fork it if you want to make it your own šŸ” Share it with a dev friend who reinvents this wheel every single time

Click here for GitHub Repository

#dotnet #aspnetcore #csharp #softwareengineering #opensource #backenddevelopment #webdevelopment

Share this article

Dabananda Mitra

Dabananda Mitra

Software Engineer specializing in scalable backend systems and minimal, effective API design.

Comments

Loading comments...