A comprehensive, modular .NET web framework implementing Clean Architecture principles
Features • Architecture • Quick Start • Documentation • Contributing
Aero is a production-ready .NET framework designed for building scalable, maintainable web applications. Built on .NET 9.0, it implements Clean Architecture with a strong emphasis on Command Query Separation (CQS), decorator patterns, and generic repository abstractions. Aero provides a complete toolkit for modern web development while maintaining flexibility and extensibility.
- Thin Controllers: MVC Controllers should be small and focused, delegating business logic to commands and queries
- Cross-Cutting Concerns: Logging, caching, validation, and timing handled transparently via decorators
- Database Agnostic: Support for multiple database technologies simultaneously
- Modular Design: Use only what you need, extend what you require
-
Command Query Separation (CQS): Clear separation between read and write operations
- Commands:
ICommand<T>,IAsyncCommand<T>for operations - Queries:
IQueryHandler<TResult>,IAsyncQueryHandler<TParam, TResult> - Base implementations:
AbstractAsyncCommandHandler<T>
- Commands:
-
Generic Repository Pattern: Unified data access across all database implementations
- Interface:
IRepository<T, TKey>with generic key constraints - Entities implement
IEntity<TKey>with built-in audit fields (CreatedOn, ModifiedOn, CreatedBy, ModifiedBy)
- Interface:
-
Decorator Pattern: Cross-cutting concerns without polluting business logic
LoggingCommandDecorator<T>- Automatic operation loggingCachingRepository<T, TKey>- Transparent data cachingTimingCommandDecorator<T>- Performance monitoringValidationCommandHandlerDecorator<T>- Input validationExceptionCommandHandlerDecorator<T>- Error handlingRetryCommandHandlerDecorator<T>- Resilience patterns
Aero supports multiple databases simultaneously, allowing you to use the best tool for each job:
- PostgreSQL (primary) - Entity Framework Core integration
- RavenDB - Document store with event sourcing support
- Marten - PostgreSQL-based document store
- Elasticsearch - Search and analytics
- LiteDB - Embedded database for local scenarios
- DynamoDB - AWS NoSQL operations
Built-in support for Large Language Model (LLM) operations via Aero.Core.Ai:
- Microsoft SemanticKernel integration
- AI usage logging and tracking
- Extensible provider architecture
Comprehensive Solana blockchain integration:
- Solnet Libraries: Full suite for Solana operations
Solnet.Wallet- Wallet and key managementSolnet.Rpc- RPC clientSolnet.Programs- Program interactionsSolnet.Metaplex- NFT and metadataSolnet.Pyth- Price oracleSolnet.Raydium- DEX operations
- Abstracted crypto interfaces for extensibility
- JWT Authentication - Token-based security
- OpenIddict - Full OAuth2/OIDC implementation
- Passkey Support - WebAuthn/FIDO2 integration
- Social Providers - Google, Facebook, Microsoft, Twitter, Apple, Coinbase OAuth
- FusionCache with Redis backplane
- Distributed caching across multiple servers
- Local in-memory caching with Redis synchronization
- SignalR integration for real-time web functionality
- Scalable hub architecture
- Integration with TickerQ for job processing
- PostgreSQL-backed operational store
- Dashboard for job monitoring
Aero/
├── Core/ # Domain and application core
│ ├── Aero.Core # Entities, algorithms, encryption
│ ├── Aero.Core.Ai # AI/SemanticKernel integration
│ ├── Aero.Common # Commands, queries, decorators, utilities
│ └── Aero.Models # DTOs and view models
│
├── Persistence/ # Data access implementations
│ ├── Aero.Persistence.Core # Core abstractions
│ ├── Aero.Persistence # Base implementations
│ ├── Aero.EfCore # Entity Framework (PostgreSQL)
│ ├── Aero.RavenDB # RavenDB document store
│ ├── Aero.Marten # Marten PostgreSQL document store
│ ├── Aero.Elastic # Elasticsearch integration
│ └── Aero.RavenDB.ES # Event sourcing with RavenDB
│
├── Web/ # Web infrastructure
│ ├── Aero.Web.Core # Core web abstractions
│ ├── Aero.Web # MVC, middleware, JWT auth
│ └── Aero.Components # Blazor components
│
├── Services/ # Business logic
│ ├── Aero.Services # Core services, feature toggles
│ └── Aero.Cms # Content management system
│
├── Infrastructure/ # Cross-cutting infrastructure
│ ├── Aero.Caching # FusionCache + Redis
│ ├── Aero.Auth # Authentication & authorization
│ ├── Aero.Validators # FluentValidation implementations
│ ├── Aero.Events # Event sourcing and domain events
│ ├── Aero.Actors # Actor model implementation
│ ├── Aero.SignalR # Real-time communication
│ └── Aero.Cloudflare # Cloudflare integration
│
├── Crypto/ # Blockchain & cryptography
│ ├── Electra.Crypto.Core # Core cryptographic abstractions
│ ├── Electra.Crypto.Base # Base implementations
│ └── Electra.Crypto.Solana # Solana blockchain integration
│
└── Tests/ # Comprehensive test suite
- Generic Type Safety: Entities use
IEntity<TKey>withIEquatable<TKey>constraints - Async/Await Throughout: All repository and service operations are asynchronous
- Modular Registration: Services register via extension methods for clean composition
- Environment Configuration: Support for multiple environments with appropriate service registration
- Clean Abstractions: Heavy use of interfaces and dependency inversion
- Cross-Cutting Concerns: Decorators handle logging, caching, validation, timing automatically
// Core services
builder.Services.AddAeroDefaults(builder.Configuration);
// API-specific setup
builder.Services.AddDefaultApi(builder.Configuration);
// Database-specific
builder.Services.AddEntityFrameworkStores<AeroDbContext>();
builder.Services.AddRavenDbStores();
builder.Services.AddMartenStores();- .NET 9.0 SDK
- Docker Desktop (for infrastructure services)
- PgAdmin (optional, for PostgreSQL management)
-
Clone the repository (with submodules for Solnet):
git clone --recursive <repo-url> cd Aero
-
Start development services:
docker-compose -f src/docker-compose.yml up -d
This starts PostgreSQL, Redis, Elasticsearch, and other infrastructure services.
-
Build the solution:
dotnet build src/Aero.sln
-
Run database migrations (if applicable):
./src/run-migrations.ps1
// Program.cs
using Aero.Web.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Add Aero services
builder.Services.AddAeroDefaults(builder.Configuration);
builder.Services.AddDefaultApi(builder.Configuration);
// Add your specific services
builder.Services.AddControllers();
builder.Services.AddRazorPages();
var app = builder.Build();
// Configure middleware
app.UseAeroDefaults();
app.MapControllers();
app.MapRazorPages();
app.Run();using Aero.Core.Entities;
public class Product : Entity
{
public string Name { get; set; }
public decimal Price { get; set; }
public string Description { get; set; }
}// Using Entity Framework
public class ProductRepository : GenericEntityFrameworkRepository<Product>
{
public ProductRepository(AeroDbContext context, ILogger<ProductRepository> log)
: base(context, log) { }
}
// Or using RavenDB
public class ProductRepository : RavenDbRepositoryBase<Product>
{
public ProductRepository(IAsyncDocumentSession session)
: base(session) { }
}public class CreateProductCommand : IAsyncCommand<CreateProductRequest, Product>
{
private readonly IGenericRepository<Product> _repository;
public CreateProductCommand(IGenericRepository<Product> repository)
{
_repository = repository;
}
public async Task<Product> ExecuteAsync(CreateProductRequest request)
{
var product = new Product
{
Name = request.Name,
Price = request.Price,
Description = request.Description
};
return await _repository.InsertAsync(product);
}
}Each project contains its own detailed README.md with specific documentation:
| Project | Description |
|---|---|
| Aero.Core | Core domain entities, algorithms, and utilities |
| Aero.Common | Command/Query patterns, decorators, shared utilities |
| Aero.Persistence.Core | Core persistence abstractions and interfaces |
| Aero.Persistence | Base repository implementations |
| Aero.EfCore | Entity Framework Core integration |
| Aero.RavenDB | RavenDB document store integration |
| Aero.Marten | Marten PostgreSQL document store |
| Aero.Caching | FusionCache with Redis backplane |
| Aero.Web | Web framework extensions and middleware |
| Aero.Web.Core | Core web abstractions |
| Aero.Auth | Authentication and authorization |
| Aero.Validators | FluentValidation implementations |
| Aero.SignalR | Real-time communication |
| Aero.Core.Ai | AI integration with SemanticKernel |
| Electra.Crypto.Solana | Solana blockchain integration |
# Build entire solution
dotnet build src/Aero.sln
# Clean solution and restore packages
./src/clean.ps1
# Build release and create NuGet packages
./src/pack.sh# Run all tests
dotnet test src/Aero.sln
# Run specific test project
dotnet test src/Aero.Core.Tests/
dotnet test src/Aero.Validators.Tests/
dotnet test src/Electra.Crypto.Solana.Tests/The included docker-compose.yml provides a comprehensive development environment:
- PostgreSQL (primary database)
- Redis (caching and sessions)
- Elasticsearch cluster (search and logging)
- RethinkDB, Cassandra, Riak (additional options)
- Kafka
- RabbitMQ
- Zookeeper
- Seq (structured logging)
- Jaeger (distributed tracing)
- Kibana (Elasticsearch visualization)
- Elastic APM (application performance monitoring)
- ELK Stack (Logstash, various Beats)
- Vault (secrets management)
- Git Flow: Use feature branches, create PRs to
developbranch - Thin Controllers: Keep MVC controllers small, delegate to commands/queries
- Sub-module Awareness: This repo has sub-modules (Aero). Push changes from both main repo and sub-modules
- Follow Best Practices:
- SOLID Principles
- DRY - Don't Repeat Yourself
- Clean Code principles
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is proprietary software. All rights reserved.
© 2024 made with ❤️ Microbian Systems
For support, questions, or feature requests:
- Visit Microbian Systems
- Create an issue in the repository
- Contact the development team
Built for scale. Designed for maintainability. Powered by .NET.
