This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build and Clean:
# Build entire solution
dotnet build src/Aero.sln
# Clean solution and restore packages
./src/clean.ps1
# Clean bin/obj folders only
./src/rm-bin-obj.sh
# Build release and create NuGet packages
./src/pack.shTesting:
# 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/Aero.Crypto.Solana.Tests/
dotnet test src/Aero.Crypto.Base.Tests/
dotnet test src/Aero.SendGrid.Tests/Development Environment:
# Start development services (PostgreSQL, Redis, Elasticsearch, etc.)
docker-compose up -d
# Run database migrations (paths may need updates)
./src/run-migrations.ps1
./src/update-database.ps1This is a .NET 9.0 modular web framework implementing Clean Architecture with the following key patterns:
Command Query Separation (CQS):
- Commands:
ICommand<T>,IAsyncCommand<T>for operations - Queries:
IQueryHandler<TResult>,IAsyncQueryHandler<TParam, TResult> - Base implementations:
AbstractAsyncCommandHandler<T>
Generic Repository Pattern:
- Multiple implementations: Entity Framework, DynamoDB, Elasticsearch, LiteDB
- Interface:
IRepository<T, TKey>with generic key constraints - Entities implement
IEntity<TKey>with built-in audit fields
Decorator Pattern for Cross-Cutting Concerns:
- Logging:
LoggingCommandDecorator<T> - Caching:
CachingRepository<T, TKey> - Timing:
TimingCommandDecorator<T> - Validation:
ValidationCommandHandlerDecorator<T> - Exception handling:
ExceptionCommandHandlerDecorator<T> - Retry logic:
RetryCommandHandlerDecorator<T>
Core Projects:
Aero.Core- Core domain entities, algorithms (including Shamir's Secret Sharing), encryptionAero.Core.Ai- AI integration using Microsoft.SemanticKernel for LLM operationsAero.Common- Command/Query patterns, decorators, shared utilitiesAero.Models- DTOs, view models, API request/response modelsAero.Persistence- Repository implementations for multiple databasesAero.Persistence.Core- Core persistence abstractions and interfacesAero.Persistence.Marten- Marten (PostgreSQL) document store implementationAero.Services- Business logic, feature toggles, user management
Infrastructure:
Aero.Web- Web framework extensions, middleware, JWT authenticationAero.Web.Core- Core web abstractions and utilitiesAero.Web.BlogEngine- Blog engine implementationAero.Caching- FusionCache-based caching with Redis backplaneAero.Auth- OpenIddict authentication with passkey supportAero.Validators- FluentValidation implementationsAero.Events- Event sourcing and domain events
Specialized:
Aero.Crypto.Core- Core cryptographic abstractions and interfacesAero.Crypto.Base- Base cryptographic implementations and utilitiesAero.Crypto.Solana- Solana blockchain integration using Solnet librariesAero.SignalR- Real-time communication hubAero.Components- Blazor componentsAero.Actors- Actor model implementationAero.Workflows- Workflow orchestration
Testing:
- Test projects use XUnit with mocking libraries (FakeItEasy, NSubstitute)
- Code coverage via coverlet.collector
Use extension methods for clean service registration:
// Core services
builder.Services.AddAeroDefaults(builder.Configuration);
// API-specific setup
builder.Services.AddDefaultApi(builder.Configuration);The framework supports multiple databases simultaneously:
- PostgreSQL (primary) - Entity Framework
- Redis - Caching and sessions
- Elasticsearch - Search and logging
- DynamoDB - NoSQL operations
- LiteDB - Embedded database option
The project includes comprehensive Solana blockchain support through multiple Solnet submodules:
Solnet.Wallet- Wallet and key managementSolnet.Rpc- RPC client for SolanaSolnet.Programs- Program interactionsSolnet.Metaplex- NFT and metadata operationsSolnet.Pyth- Price oracle integrationSolnet.Raydium- DEX operations
The src/docker-compose.yml provides a comprehensive development environment including:
- Databases: PostgreSQL, Redis, Elasticsearch cluster, RethinkDB, Cassandra, Riak
- Message queues: Kafka, RabbitMQ, Zookeeper
- Monitoring & Logging: Seq, Jaeger, Kibana, ELK Stack (Logstash, various Beats)
- Security: Vault for secrets management
- APM: Application Performance Monitoring with Elastic APM
- 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
AI Integration:
- New
Aero.Core.Aiproject implements Microsoft.SemanticKernel integration - Supports LLM operations and AI-powered features
- Includes usage logging through
AiUsageLogentity
Caching Evolution:
- Migrated from Foundatio to FusionCache with Redis backplane
- Improved performance and reliability with distributed caching
- Maintains decorator pattern for transparent caching
Cryptography Modularization:
- Split crypto functionality into
Aero.Crypto.CoreandAero.Crypto.Base - Enhanced separation of concerns for cryptographic operations
- Maintains Solana-specific implementations in dedicated project
- Some PowerShell scripts may reference outdated paths (Microbians vs Aero)
- The solution includes git submodules for Solnet libraries
- Authentication supports both JWT and OpenIddict with passkey integration
- Repository decorators are automatically applied through DI configuration
- The docker-compose.yml is located in
src/directory, not root