/ASP.NETCoreAPI_Starter-Kit-Free-Edition-.NET-9

Production-ready .NET 9 Web API Starter Kit with Clean Architecture, JWT Auth, EF Core, PostgreSQL, Serilog, Swagger, Docker, and full testing support — perfect for real-world SaaS & backend APIs.

Primary LanguageC#

ASP.NET Core API Starter Kit (Free Edition) – .NET 9 🚀

A clean, production-ready, and extensible Web API starter template built on .NET 9.
Designed with Clean Architecture, PostgreSQL + EF Core, JWT Authentication, Serilog, Swagger, Rate Limiting, Health Checks, Docker support, Migrations & Data Seeding, Unit & Integration Testing, and optional dotnet templating.

Ideal for real-world SaaS projects, APIs, or internal tools 🚀


✨ Features

  • ✅ .NET 9 + Clean Architecture (Domain ➜ Application ➜ Infrastructure ➜ API)
  • ✅ JWT Authentication + Role-based Authorization
  • ✅ PostgreSQL via EF Core with Migrations
  • InitialCreate Migration included
  • ✅ Data Seeder via DataSeeder.cs
  • ✅ CRUD Sample: User ↔ Products (1:N relation)
  • ✅ Centralized Logging via Serilog
  • ✅ API Versioning (v1)
  • ✅ Swagger UI + OpenAPI
  • ✅ Health Checks (/health)
  • ✅ Rate Limiting via AspNetCoreRateLimit
  • ✅ Docker & Docker Compose ready
  • ✅ Unit Tests (xUnit + Moq)
  • ✅ Integration Tests (TestServer + WebApplicationFactory)
  • ✅ dotnet new template support (optional)
  • ✅ Postman Collection included

📁 Project Structure

ApiStarterKit.Free/
├── src/
│   ├── Api/                     # ASP.NET Core Web API (.NET 9)
│   │   ├── Controllers/
│   │   ├── Middleware/
│   │   ├── Extensions/
│   │   └── Program.cs
│   ├── Application/             # Business logic, DTOs, Interfaces
│   ├── Domain/                  # Entities, Enums, Validation logic
│   ├── Infrastructure/
│   │   ├── Persistence/
│   │   │   ├── AppDbContext.cs
│   │   │   └── DataSeeder.cs   # Data seeding logic
│   │   └── Services/
│   └── Shared/                  # Wrappers, Constants, Utils
├── tests/
│   ├── UnitTests/               # Unit tests (xUnit, Moq)
│   └── IntegrationTests/        # API tests (TestServer)
│       └── Setup/
│           └── CustomWebApplicationFactory.cs
├── postman/
│   └── ApiStarterKit.postman_collection.json
├── templates/                   # dotnet new template files (optional)
├── docker-compose.yml
├── README.md
└── .gitignore



Made by 💙 Basheer Mohammed 
(Basheer Abdo Farea Mohammed)
(basheer2013.55@gmail.com)