Abp framework

From burakdmir/abp-skills · View interactive version

Abp framework is an AI agent skill from the GitHub repository burakdmir/abp-skills. ABP Framework v10.x (10.4–10.6) core quick reference: solution templates, layered architecture, module system, base classes, Clock/GuidGenerator/CurrentUser/LazyServiceProvider, .NET 10. Use when creating an ABP project, or when architecture or core conventions are needed.

How to use this skill

Skill file

ABP Framework — Core Skill

ABP Framework v10.x (10.4–10.6) (.NET 10) core reference. Opinionated, DDD-based, modular ASP.NET Core.

Trigger

"create ABP project", "ABP solution/template", "ABP module", "ABP architecture", "abp new", ABP best practices.

Solution Templates

| Template | Description |

|---|---|

| app | Layered (default) |

| app-nolayers | Single-layer |

| microservice | Microservice (Business+ license) |

| empty | Empty |

Modern Monolith / Modular Monolith can also be selected as a separate path in the ABP Studio wizard.

UI: mvc, angular, blazor-webapp, blazor (WASM), blazor-server, react (--modern), no-ui

DB: ef (default), mongodb

CLI (summary)

dotnet tool install -g Volo.Abp.Studio.Cli
abp new Acme.BookStore --template app                 # classic
abp new Acme.BookStore --template app --modern        # React-first modern
abp new Acme.BookStore --template app --modern --modular  # modular monolith
abp add-package Volo.Abp.EntityFrameworkCore
abp generate-proxy -t ng        # ng | csharp | js
abp update

For details see CLI skill.

Layer Structure (Layered)

Domain.Shared → Domain → Application.Contracts → Application → HttpApi → Web/Host
                  ↑ EntityFrameworkCore/MongoDB (only Host references it)

For dependency rules see Dependency Rules skill.

Module Class

[DependsOn(typeof(AbpAspNetCoreMvcModule), typeof(AbpEntityFrameworkCoreModule), typeof(AbpAutofacModule))]
public class BookStoreModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context) { }   // DI + config
    public override void OnApplicationInitialization(ApplicationInitializationContext context) { } // middleware (host only)
}

Lifecycle: PreConfigureServices → ConfigureServices → PostConfigureServices → OnApplicationInitialization (+ *Async versions).

DI (summary)

public class TaxCalculator : ITransientDependency { }   // ISingletonDependency | IScopedDependency
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] public class X { }
[ExposeServices(typeof(ITaxCalculator))] public class TaxCalculator : ITaxCalculator, ITransientDependency { }

Base Class Pre-injected Services

ApplicationService / DomainService / AbpController provide these as properties — don't inject them:

| Property | Note |

|---|---|

| GuidGenerator | instead of Guid.NewGuid() |

| Clock | instead of DateTime.Now (test/timezone) |

| CurrentUser | user info |

| CurrentTenant | tenant context |

| L | localization (ApplicationService/AbpController) |

| AuthorizationService / FeatureChecker | permission/feature check |

| LazyServiceProvider | lazy resolution via LazyGetRequiredService<T>() |

| UnitOfWorkManager | UOW |

Async all-the-way — don't use .Result/.Wait(); methods should end with Async.

Pre-built Modules

Volo.Abp.Account, .Identity, .TenantManagement, .SettingManagement, .PermissionManagement, .FeatureManagement, .AuditLogging, .BackgroundJobs, .CmsKit, .OpenIddict (auth server, replacing IdentityServer from v6.0+).

Best Practices

  1. Define module dependencies with [DependsOn]
  2. IGuidGenerator.Create() (sequential GUID), Clock (time)
  3. Don't expose entities — use DTOs
  4. Mapperly (default since v10.4) object mapping
  5. Inject IRepository<TEntity, TKey>, rely on UOW conventions

Version Detection & v10.5

Covers ABP 10.x (10.4–10.6, .NET 10). Detect the solution's version from the Volo.Abp.* package version in Directory.Packages.props / *.csproj; no solution → assume latest stable (v10.6). v10.5 has no breaking changes over 10.4. New in v10.5 (only suggest when version ≥ 10.5): S3-compatible blob storage (ServiceURL), background worker capability markers (ISupportsRuntimeRegistration/ISupportsCronScheduling), single-active identity token providers (AbpDefaultTokenProvider), opt-in OpenIddict default-scope fallback, MySQL ResourcePermissionGrant index fix, Blazorise 2.2.1 / MongoDB.Driver 3.9.0. Migration guide: https://abp.io/docs/latest/release-info/migration-guides/abp-10-5

New in v10.6 (only suggest when version ≥ 10.6; opt-in, no breaking changes for typical apps): background job dedicated workers / parallel execution / successful-job retention (AbpBackgroundJobWorkerOptions, EF CompletionTime column), API definition response ContentTypes + IsRemoteStream with multipart FormData upload proxies, Angular 22.0.x, antiforgery user-id claim issuer normalization (AbpAntiForgeryOptions.NormalizeUserIdClaimIssuer, default on), access-token forwarding for authenticated client requests, ThreadCurrentPrincipalAccessor returns an anonymous principal. Deps: MongoDB.Driver 3.10.0, Swashbuckle 10.2.3. Migration guide: https://abp.io/docs/latest/release-info/migration-guides/abp-10-6

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.