Open source · ASP.NET Core starter

Backend Template

BackEnd_templete
  1. The solution

    Six projects land on the plate: Domain, Application, Infrastructure, Api, Contracts and a Client — one .NET 10 solution.

    Taxi_Server.slnx
  2. Clean Architecture

    They stack the way they depend: the Domain at the bottom, the use cases on it, Infrastructure and the Api on top — every dependency points inward.

    src/
  3. Results, not exceptions

    A broken business rule returns a Result with an Error and its kind, and one translator turns it into a localized problem response.

    Result<T>
  4. The MediatR pipeline

    Every request runs logging → validation → performance → caching before its handler.

    Common/Behaviours/
  5. One feature, five use cases

    Cars: create, update and remove commands, two queries, their validators, a DTO and a mapper — the 17-step feature recipe, done once as an example.

    Features/Cars/
  6. The data

    EF Core on PostgreSQL 16, with migrations and interceptors that fill audit fields and dispatch domain events.

    AppDbContext.cs
  7. Sign-in

    Identity with JWT access tokens and rotating refresh tokens, issued and refreshed by the API.

    TokenProvider.cs
  8. The endpoints

    Sign in, refresh, who am I — and the Cars CRUD, cached per language.

    requests/requests.http
  9. One command to run it

    The API with PostgreSQL 16, Seq for logs, and Prometheus and Grafana for metrics — five services in Docker Compose.

    docker-compose.yml
  10. Tested

    Unit tests for the domain (Result, Car, RefreshToken) and the application (the pipeline registration, result serialization).

    dotnet test
  11. Written down for AI

    Prompts to add a feature, fix a bug, change one layer or update the docs, plus AGENTS.md — the rules an assistant follows.

    prompts/add-feature.md
  12. A backend to start from

    Everything above, ready the day you start a new API.

    git clone … BackEnd_templete

Backend Template

Inside the repository

  1. The solution, from the outside

    210 files: six projects in src/, two test projects, Docker containers for logs and metrics, the docs, sample requests and prompts for AI assistants.

    Taxi_Server.slnx
  2. src/ — six projects

    Api, Application, Domain, Infrastructure, Contracts and a Client: Clean Architecture, every dependency pointing inward.

    src/
  3. Domain — the rules

    Entities and their errors (Car, RefreshToken), AuditableEntity, DomainEvent, LocalizedText and a Result type — and no framework at all.

    src/Taxi.Domain/
  4. Results, not exceptions

    Result, Error and ErrorKind: a business rule that fails returns an error the API can translate, instead of throwing.

    Result<T>
  5. Application — the use cases

    Commands and queries per feature with MediatR, their validators, DTOs and mappers, and the shared pipeline behaviours.

    src/Taxi.Application/
  6. The MediatR pipeline

    Every request passes logging, validation, performance and caching before its handler; unhandled exceptions are caught on the way.

    ValidationBehavior.cs
  7. One feature: Cars

    Create, update and remove commands, the list and by-id queries, a DTO and a mapper — the 17-step feature recipe, done once as an example.

    Features/Cars/
  8. Infrastructure — the outside world

    EF Core on PostgreSQL with configurations, migrations and interceptors for audit fields and domain events; Identity with JWT and refresh tokens; settings.

    src/Taxi.Infrastructure/
  9. Api — the edge

    Controllers, a global exception handler, OpenAPI transformers (bearer, Accept-Language, version) and Arabic and English resources.

    src/Taxi.Api/Program.cs
  10. tests/ — 7 files

    Unit tests for the domain (Result, Car, RefreshToken) and the application (pipeline registration, result serialization).

    dotnet test
  11. prompts/ — for AI assistants

    Ready instructions to add a feature, modify one, fix a bug, change a single layer or update the docs — the rules written down.

    prompts/add-feature.md
  12. All of it

    210 files: a backend you can start a new API from on day one.

    docker compose up

A reusable .NET 10 backend template with Clean Architecture and CQRS, ready for new APIs with authentication, caching, logging and testing.

6 projects, dependencies pointing inward
5 MediatR pipeline stages
17 step feature recipe
5 Docker services
My role
Author
Period
2026
Company
Open source
Runs on
.NET 10 · Docker
  • .NET 10
  • EF Core 10
  • PostgreSQL 16
  • MediatR
  • FluentValidation
  • JWT
  • HybridCache
  • Serilog
  • OpenTelemetry
  • Docker
Read the whole case study · 1 min

A reusable .NET 10 backend template with Clean Architecture and CQRS, ready for new APIs with authentication, caching, logging and testing.

Which résumé?

Two versions, one for each kind of role.

Flutter & mobile Flutter Developer | Mobile Developer PDF · 2 pages · 159 KB
Backend & full-stack Backend & Full-Stack Developer | ASP.NET Core PDF · 2 pages · 118 KB