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.

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:
- Hit Use this template on the repo
- Rename it to your project
- Add your first module implementing IModule
- 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
Software Engineer specializing in scalable backend systems and minimal, effective API design.
Comments
Loading comments...
More Writings
Top 500 .NET Interview Questions | Complete Preparation Guide
Preparing for a .NET developer interview? I collected 500 unique interview questions covering the most important areas of the .NET ecosystem. This is a useful revision resource for freshers and experienced .NET developers preparing for technical interviews. Save it, practice the questions category by category, and use it as a structured roadmap for your .NET interview preparation.
Read Article ā.NETList vs IEnumerable vs IQueryable in ASP.NET Core
Learn the differences between List, IEnumerable, and IQueryable in ASP.NET Core. Understand when to use each, common misconceptions, performance considerations, and how to answer this popular .NET interview question.
Read Article ā.NETSerilog: Setup Serilog in ASP.NET Core Web API Project
A step-by-step guide to configuring Serilog in an ASP.NET Core Web API project with console logging, file logging, structured logging, and request logging.
Read Article ā