Skip to content

Latest commit

 

History

History

README.md

Aether Framework Documentation

Production-ready .NET SDK for building enterprise applications with Domain-Driven Design and distributed architecture patterns.

Quick Start

// Program.cs
var builder = WebApplication.CreateBuilder(args);

// Core services
builder.Services.AddAetherCore(options => options.ApplicationName = "MyApp");
builder.Services.AddAetherNpgsql<MyDbContext>(builder.Configuration.GetConnectionString("Default"));

// Event bus
builder.Services.AddAetherEventBus(options =>
{
    options.PubSubName = "pubsub";
    options.DefaultSource = "myapp";
});

// Aspects
builder.Services.AddAetherAspects();

var app = builder.Build();

app.UseAmbientServiceProvider();
app.UseUnitOfWorkMiddleware();
app.MapControllers();

app.Run();

Features

Core Infrastructure

Feature Description
Result Pattern Type-safe error handling, railway-oriented programming
Repository Pattern Clean data access abstraction with EF Core
Multi-Schema Dynamic schema resolution for multi-tenant apps
Unit of Work Transaction management with [UnitOfWork] attribute

Domain-Driven Design

Feature Description
DDD Building Blocks Entities, Value Objects, Aggregate Roots
Domain Events Event patterns with automatic dispatching

Event Architecture

Feature Description
Distributed Events CloudEvents-based event bus with Dapr
Inbox & Outbox Reliable messaging patterns

Application Layer

Feature Description
Application Services CRUD service patterns with auto-mapping
Aspects [Trace], [Log], [Metric], [UnitOfWork] attributes

Infrastructure

Feature Description
Distributed Cache Redis, Dapr state store abstraction
Distributed Lock Coordinated locking across instances
Background Jobs Scheduled jobs with Dapr integration

Cross-Cutting

Feature Description
Current User Ambient caller identity, roles, position, header forwarding
Object Mapping AutoMapper integration
GUID Generation Sequential and simple GUID strategies
Telemetry OpenTelemetry integration
Response Compression Gzip and Brotli compression
HTTP Client Typed HTTP client abstractions

Package Dependencies

BBT.Aether.Core (Base)
  ├── BBT.Aether.Domain
  │     └── BBT.Aether.Infrastructure
  │           ├── BBT.Aether.Application
  │           └── BBT.Aether.AspNetCore
  ├── BBT.Aether.Aspects
  └── BBT.Aether.HttpClient

Feature Matrix

Feature Core Domain Infrastructure AspNetCore Aspects
Result Pattern - - -
Repository - -
Multi-Schema - -
Unit of Work -
DDD Entities - - - -
Domain Events - -
Distributed Events - -
Inbox/Outbox - -
Cache/Lock - - -
Background Jobs -
Current User - - -
Telemetry - - -
Tracing/Logging/Metrics - - - -

Usage Example

public class Order : AuditedAggregateRoot<Guid>
{
    public void PlaceOrder()
    {
        Status = OrderStatus.Placed;
        AddDistributedEvent(new OrderPlacedEvent(Id));
    }
}

public class OrderAppService : CrudAppService<Order, OrderDto, Guid>
{
    [Trace]
    [Log]
    [UnitOfWork]
    public async Task<OrderDto> PlaceOrderAsync(Guid id)
    {
        var order = await Repository.GetAsync(id);
        order.PlaceOrder();
        await Repository.UpdateAsync(order);
        return await MapToGetOutputDtoAsync(order);
    }
}

Version Compatibility

Aether .NET EF Core Dapr
1.x 8.0, 9.0 8.x, 9.x 1.13+