Skip to content
bitzorcas
EN

Reference

Overview

Shared framework libraries — Domain, Application, Infrastructure, ORM adapters, Modularity, CodeGeneration, Persistence Models.

Last updated

The shared libraries every module composes against. Stable, opinionated, and designed for AI-assisted development with strict quality gates.

What ships today

Building BlockPurposeKey Types
DomainDDD primitives, Result pattern, entity interfaces, tenancy, domain eventsResult<T>, EntityBase, TenantId, IAuditableEntity, ISoftDelete
ApplicationMediator pipelines, authorization, tenancy resolution, audit sinks, cachingIAuthorizationDecisionService, ITenantResolver, IUnitOfWork, 7 pipeline behaviors
InfrastructureORM-agnostic implementations: auditing, clocking, caching, seeding, storageAuditLoggerDispatcher, FusionCacheAppCache, LocalFileStorage, SeedRunner
Infrastructure.SqlSugarPrimary ORM adapter — trim-clean, CodeFirst, CSV seedingSqlSugarUnitOfWork, SqlSugarAuditLogStore, CsvSeedStepBase<T>
Infrastructure.EfCoreOptional ORM adapter — IsTrimmable=false, same contract testsBitzOrcasDbContext, EfCorePersistenceSchemaInitializer
Infrastructure.DapperQuery-only adapter — lightweight read pathDapperAuditQueryPort
Infrastructure.Persistence.ModelsShared entity models consumed by all ORM adaptersEntityBase, BizEntityBase, TenantEntityBase, PersistenceModelRegistry
ModularityModule governance — declaration, dependency graph, boundary verificationIAppModule, AppModuleRegistry, AppModuleDependencyGraph, AppModuleBoundaryVerifier
CodeGeneration.AbstractionsCode generation metadata modelIModuleDefinition, IAggregateDefinition, ICodeGenerator
CodeGeneration.ScribanScriban-based code generator with 13+ templatesAggregate, domain event, command, handler, repository, endpoints templates

Adapter pattern

All BuildingBlocks use a four-tier adapter strategy:

TierPrefixDI RegistrationPurpose
DefaultInMemory*, Null*TryAddSingletonAPI Shell, unit tests
ProductionSqlSugar*, Local*AddScoped (non-TryAdd)Primary runtime, overrides Default
OptionalEfCore*, Dapper*AddScopedSwitchable adapter, same contract tests
UnavailableUnavailable*TryAddSingletonFail-loud defaults