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
How to Restore a Deleted GitHub Repository
Accidentally deleted a GitHub repository? Donot panic. In many cases, you can restore it directly from GitHub.
Read Article āAchievements100 Days of Consistency: How One Line from Clean Code Changed My Learning Journey
A single sentence from Clean Code "Leave the code cleaner than you found it." inspired me to apply the same philosophy to my life. I committed to a 730-day journey of targeted learning, documenting every day's progress in a private GitHub repository. Today marks Day 100, and looking back, I can truly see how small, consistent improvements have transformed me into a better developer and a better version of myself.
Read Article āGitHow to Rename a Git Commit (Even After Pushing)
Learn how to rename the latest or an older Git commit using git commit --amend and interactive rebase. This guide also explains when and why to use git push --force-with-lease.
Read Article ā