Skip to content

abdebek/MinimalCleanArch

Repository files navigation

MinimalCleanArch

A comprehensive library for implementing Clean Architecture with Minimal APIs on .NET 9 and .NET 10. It provides domain foundations, repositories, unit of work, specifications, security/encryption, and minimal-API extensions.

Core Features

  • Clean Architecture foundations (entities, repositories, unit of work, specifications, result pattern)
  • Minimal API extensions (validation wiring, standardized error handling, OpenAPI helpers)
  • Security & encryption (Data Protection/AES column encryption)
  • Soft delete & auditing (IsDeleted + auditing timestamps/users)
  • EF Core integration (repositories, unit of work, auditing/soft-delete filters)

Version & Templates

  • Packages: stable 0.1.7. Preview 0.1.11-preview targets .NET 9 and .NET 10.
  • Templates: dotnet new install MinimalCleanArch.Templates (or local nupkg), then dotnet new mca -n MyApp (multi-project) or --single-project. Use --mcaVersion to pin preview packages.
  • Launch defaults: Swagger, randomized ports 5000–8000; adjust Properties/launchSettings.json if needed.
  • Using local nupkgs? Add a nuget.config with your local feed (e.g., artifacts/packages) before restoring.

Packages

Package Description
MinimalCleanArch Core interfaces and base classes (Entities, Repositories, Specifications, Result pattern).
MinimalCleanArch.DataAccess EF Core implementation (DbContextBase, Repository, UnitOfWork, SpecificationEvaluator).
MinimalCleanArch.Extensions Minimal API enhancements (validation filters, error handling, standard responses).
MinimalCleanArch.Validation FluentValidation integration components (often used via Extensions).
MinimalCleanArch.Security Data encryption services (AES, Data Protection) and EF Core integration.
MinimalCleanArch.Messaging Domain events/messaging helpers and Wolverine integration.
MinimalCleanArch.Audit Audit logging components.
MinimalCleanArch.Templates dotnet new mca templates (single- or multi-project, clean architecture).

Quick Start (short)

  • Scaffold with the template:
    dotnet new install MinimalCleanArch.Templates
    dotnet new mca -n MyApp              # multi-project
    dotnet new mca -n MyApp --single-project
  • Or install packages directly:
    dotnet add package MinimalCleanArch
    dotnet add package MinimalCleanArch.DataAccess
    dotnet add package MinimalCleanArch.Extensions
    dotnet add package MinimalCleanArch.Security
    dotnet add package MinimalCleanArch.Validation
    dotnet add package MinimalCleanArch.Messaging
    dotnet add package MinimalCleanArch.Audit
  • Then follow the per-package guides (links above) for setup specifics.

Documentation map

Sample Application

Contributing

Contributions are welcome! Please read CONTRIBUTING.md.

License

MIT License. See LICENSE.

About

A comprehensive library for implementing Clean Architecture with Minimal API in .NET.

Topics

Resources

License

Contributing

Stars

Watchers

Forks