English | Português
- About the Project
- ASP.NET Boilerplate
- Technical Overview
- Installation and Configuration
- Running and Testing
- Code Coverage
- NuGet Packages
- Contributing
The EAF (Enterprise Application Foundation) is an open-source middleware platform that provides a solid foundation for developing modern applications. Based on ASP.NET Boilerplate (ABP), EAF has been optimized to work with the latest versions of ASP.NET Core and Entity Framework Core.
- Integrated Security: Authentication and authorization with support for Azure Active Directory and LDAP
- Complete Auditing: Automatic tracking of all system operations
- Multi-tenancy: Native support for multi-tenant applications
- Observability: Integration with OpenTelemetry for monitoring and telemetry
- Distributed Cache: Support for Redis, SQL Server, and SQLite
- Secret Management: Integration with Azure Key Vault and Oracle Cloud Infrastructure
- Advanced Logging: Replacement of log4net with Serilog for better performance
- Web Applications: Management systems, CRMs, ERPs, and other applications
- RESTful APIs: Development of scalable APIs
- Microservices: Foundation for microservice architectures
- Multi-tenant Applications: SaaS and shared applications
ASP.NET Boilerplate (ABP) is an open-source web application framework that provides a robust infrastructure for developing modern applications. Complete documentation available at: https://aspnetboilerplate.com/Pages/Documents
The EAF (Enterprise Application Foundation) is an open-source implementation based on ASP.NET Boilerplate, designed to offer a more user-friendly interface for API and UI development. EAF complements the base framework with various improvements and additional modules:
- External Login: Support for social login (Google, Facebook, Twitter, Microsoft)
- Azure Active Directory: Complete integration
- LDAP/Active Directory: Authentication via directories
- Two-Factor Authentication: Two-factor authentication
- Permission Management: Granular permission and role system
- Automatic Auditing: Tracking of all CRUD operations
- Structured Logging: Integration with Serilog for detailed logs
- Entity Change Tracking: Monitoring of entity changes
- Error Logging: Capture and analysis of exceptions
- Chat System: Chat system between users
- SignalR Integration: WebSockets for bidirectional communication
- Push Notifications: Real-time notification system
- Tenant-to-Host Chat: Chat between tenants and host
- Group Chat: Group chat for collaboration
- Data Isolation: Complete data separation by tenant
- Tenant Management: Tenant management
- Tenant Resolution: Automatic tenant resolution
- Feature Management: Enable/disable features by tenant
- Distributed Cache: Support for Redis, SQL Server, SQLite
- Cache Abstraction: Unified interface for different backends
- Cache Manager: Intelligent cache management
- Performance Optimization: Integrated performance optimizations
- Hangfire Integration: Background task processing
- Job Management: Job scheduling and monitoring
- Recurring Jobs: Automated recurring tasks
- Worker Services: Scalable background services
- Angular Integration: Complete Angular template
- UI Components: Reusable and styled components
- Client-Side Validation: Automatic frontend validation
- Internationalization: Support for multiple languages
- Setting Management: Configuration management
- Feature Flags: Feature flags
- Environment Configuration: Configuration by environment
- Key Vault Integration: Secret security
- Event Bus: Domain event system
- Data Filters: Automatic data filters (SoftDelete, TenantId)
- Repository Pattern: Data access abstraction
- Unit of Work: Transaction management
- Dependency Injection: Configured dependency injection
- Object Mapping: Integrated AutoMapper
- API Documentation: Automatic Swagger/OpenAPI
- More User-Friendly Interface: Simplified and intuitive APIs
- Ready-to-Use Modules: Pre-configured components for immediate use
- Best Practices: Applied modern development patterns
- Optimized Performance: Integrated performance optimizations
- Portuguese Documentation: Native support for Portuguese language
- BDD Tests: Tests with Given/When/Then pattern
- Observability: OpenTelemetry for advanced monitoring
- Enhanced Security: Multiple authentication and authorization options
EAF follows Domain-Driven Design (DDD) principles and implements patterns such as:
- Repository Pattern: Data layer abstraction
- Unit of Work: Transaction management
- Dependency Injection: Inversion of control
- CQRS: Separation of commands and queries
- Event Sourcing: Domain event tracking
| Technology | Version | Status |
|---|---|---|
| ASP.NET Core | 10.0 | Supported |
| Entity Framework Core | 10.0 | Supported |
| Angular | 20 | Supported |
| .NET | 10.0 | Supported |
- Eaf.Middleware.Core: Central domain layer with entities, services, configurations, authorization, auditing, and base framework features.
- Eaf.Middleware.Application: Application layer with DTOs, application services, validations, and intermediate business logic.
- Eaf.Middleware.Web.Core: Web components for ASP.NET Core including startup configuration, middleware, filters, and HTTP integration.
- Eaf.Middleware.AzureActiveDirectory: Complete integration with Azure Active Directory for external authentication and user synchronization.
- Eaf.Middleware.Ldap: LDAP/Active Directory authentication for integration with existing directories.
- Eaf.SqlServerCache: Distributed cache implementation using SQL Server as backend for high availability scenarios.
- Eaf.SqliteCache: Local cache implementation using SQLite for development and low-scale scenarios.
- Eaf.KeyVault: Secret management supporting Azure Key Vault and Oracle Cloud Infrastructure (OCI) for secure credential storage.
- Eaf.KeyVault.AspNetCore: ASP.NET Core integration for automatic loading of configurations and secrets from Key Vault.
- Eaf.OpenTelemetry: Complete OpenTelemetry implementation for distributed telemetry, tracing, and metrics with support for multiple exporters.
- Eaf.Castle.Serilog: Logging adapter integrating Castle Windsor with Serilog for structured and configurable logging.
- Eaf.Middleware.Worker: Background services (Worker Services) for asynchronous processing, scheduled jobs, and long-running tasks.
- Eaf.Log4NetServiceBus: Integration with Azure Service Bus using log4net for message logging and messaging events.
- .NET 10.0: Main framework
- ASP.NET Core 10.0: Web API and MVC
- Entity Framework Core 10.0: ORM for data access
- AutoMapper: Object mapping
- Castle Windsor: Dependency injection
- Hangfire: Background task processing
- SignalR: Real-time communication
- Swagger/OpenAPI: API documentation
- xUnit: Testing framework
- Shouldly: Fluent assertions
- NSubstitute: Mocking framework
- Angular 20: SPA framework
- Node.js 20.20.2: JavaScript runtime
- TypeScript 5.8.3: Main language
- ngx-bootstrap 12.0.0 / Bootstrap 5: CSS framework
- PrimeNG 17: UI components
- Chart.js 4.4.7: Charts and visualizations
- RxJS 7.8.0: Reactive programming
- SQLite: Local database
- SQL Server: Main database
- Redis: Distributed cache
- Azure Key Vault: Secret management
- OpenTelemetry: Observability
- Serilog: Structured logging
The detailed technical documentation of the EAF system, covering architecture, modules, development guides, and more, can be found in our documentation portal.
Access Complete Documentation | DeepWiki - AI-Powered Docs
Required:
- .NET 10.0 SDK or higher
- Node.js 20.20.2 (for frontend development)
- Git
For Frontend Development:
npm install -g @angular/[email protected]For Coverage Reports:
dotnet tool install -g dotnet-reportgenerator-globaltool| Platform | Status | Notes |
|---|---|---|
| Windows | Full Support | Use PowerShell or Command Prompt |
| Linux | Full Support | Bash scripts provided |
| macOS | Full Support | Use Terminal with bash |
git clone https://github.com/afonsoft/EAF.git
cd EAF- Restore dependencies:
dotnet restore Eaf.sln- Build the project:
dotnet build Eaf.slnLinux/macOS:
# Make the script executable
chmod +x build-and-test.sh
# Run build and tests with coverage
./build-and-test.shWindows (PowerShell):
# Run build and tests
dotnet build Eaf.sln
dotnet test Eaf.sln --collect:"XPlat Code Coverage" --settings coverlet.runsettings
# Generate coverage report (if reportgenerator is installed)
reportgenerator -reports:"TestResults/*/coverage.cobertura.xml" -targetdir:"TestResults/CoverageReport" -reporttypes:"Html;TextSummary"Linux/macOS:
# Make the script executable
chmod +x run-tests-with-coverage.sh
# Run all tests with coverage
./run-tests-with-coverage.shWindows (PowerShell):
# Run all tests with coverage
dotnet test Eaf.sln --collect:"XPlat Code Coverage" --settings coverlet.runsettings
# Generate coverage report
reportgenerator -reports:"TestResults/*/coverage.cobertura.xml" -targetdir:"TestResults/CoverageReport" -reporttypes:"Html;TextSummary"# Run a specific test project with coverage
dotnet test test/Eaf.KeyVault.Tests/Eaf.KeyVault.Tests.csproj --collect:"XPlat Code Coverage" --settings coverlet.runsettings
# Run all tests in the solution
dotnet test Eaf.sln --collect:"XPlat Code Coverage" --settings coverlet.runsettings
# Generate coverage report
reportgenerator -reports:"TestResults/*/coverage.cobertura.xml" -targetdir:"TestResults/CoverageReport" -reporttypes:"Html;Badges;TextSummary"cd /path/to/EAF
# Copy and edit the environment file
cp .env.example .env
# Start everything
docker compose -f docker-compose.all.yml up --build -d
# Validate
curl http://localhost:5000/swagger/v1/swagger.json
curl http://localhost:4200/Use this when the infrastructure (SQL Server, Redis, etc.) is managed outside Docker Compose.
cd /path/to/EAF
# Configure .env with your external connection string
cp .env.example .env
# Start API and Angular
docker compose -f docker-compose.yml up --build -d
# Or use an external SQL Server container in the same network
docker compose -f docker-compose.all.yml up -d eaf-sqlserver eaf-migrator
docker compose -f docker-compose.yml up --build -d# Full stack validation (default)
bash scripts/validate-docker-compose.sh
# Validate a specific compose file
COMPOSE_FILE=docker-compose.all.yml bash scripts/validate-docker-compose.shPull requests that change docker-compose*.yml, Dockerfile* or scripts/validate-docker-compose.sh trigger the .github/workflows/docker-compose-validation.yml workflow, which builds Eaf.sln and runs the full Docker Compose stack end-to-end.
See Templates/Api/README.md and Templates/Angular/Eaf.ProjectName.UI/README.md for details.
Let's examine a simple class to see the benefits of EAF:
public class TaskAppService : ApplicationService, ITaskAppService
{
private readonly IRepository<Task> _taskRepository;
public TaskAppService(IRepository<Task> taskRepository)
{
_taskRepository = taskRepository;
}
[AbpAuthorize(MyPermissions.UpdateTasks)]
public async Task UpdateTask(UpdateTaskInput input)
{
Logger.Info("Updating a task for input: " + input);
var task = await _taskRepository.FirstOrDefaultAsync(input.TaskId);
if (task == null)
{
throw new UserFriendlyException(L("CouldNotFindTheTaskMessage"));
}
ObjectMapper.MapTo(input, task);
}
}This example demonstrates several EAF features:
- Dependency Injection: EAF uses and provides a conventional DI infrastructure
- Repository: EAF can create a default repository for each entity
- Authorization: EAF can check permissions declaratively
- Validation: EAF automatically checks if input is null
- Audit Logging: Information is automatically saved for each request
- Unit of Work: Each application service method is a unit of work by default
| Metric | Value |
|---|---|
| Line coverage | 97.9% |
| Branch coverage | 90.5% |
| Method coverage | 99.8% |
| Total tests | 4605 |
| Passed | 4604 |
| Skipped | 1 |
| Failed | 0 |
| Build warnings | 0 |
| Template build warnings | 0 (Api, Worker, Angular) |
P66 update: Eaf.ApiWithSrc.sln starts and Swagger UI loads at http://localhost:5000/swagger; runtime config precedence fixed so environment variables override appsettings.json. P65 template build warnings remain suppressed and documented.
| Module | Tests | Line Coverage | Status |
|---|---|---|---|
| Eaf.Castle.Serilog | 73 | 100% | ✅ Excellent |
| Eaf.SqlServerCache | 100 | 100% | ✅ Excellent |
| Eaf.KeyVault.AspNetCore | 10 | 100% | ✅ Excellent |
| Eaf.Middleware.Application | 1507 | 99.9% | ✅ Excellent |
| Eaf.Middleware.Core | 1266 | 99.9% | ✅ Excellent |
| Eaf.Middleware.Web.Core | 769 | 96.9% | ✅ Excellent |
| Eaf.Middleware.Worker | 191 | 100% | ✅ Excellent |
| Eaf.SqliteCache | 162 | 98% | ✅ Excellent |
| Eaf.OpenTelemetry | 67 | 100% | ✅ Excellent |
| Eaf.KeyVault | 243 | 100% | ✅ Excellent |
| Eaf.Log4NetServiceBus | 52 | 96.0% | ✅ Good |
| Eaf.Middleware.AzureActiveDirectory | 66 | 95.3% | ✅ Excellent |
| Eaf.Middleware.Ldap | 99 | 66.3% |
| Package | NuGet | Description |
|---|---|---|
| Eaf.Middleware.Application | Application layer | |
| Eaf.Middleware.AzureActiveDirectory | Azure AD integration | |
| Eaf.Middleware.Core | Core features | |
| Eaf.Middleware.Ldap | LDAP authentication | |
| Eaf.Middleware.Web.Core | Web components | |
| Eaf.Castle.Serilog | Structured logging | |
| Eaf.KeyVault | Secret management | |
| Eaf.KeyVault.AspNetCore | ASP.NET Core integration | |
| Eaf.OpenTelemetry | Telemetry and observability | |
| Eaf.Log4NetServiceBus | Service bus logging | |
| Eaf.SqlServerCache | SQL Server cache | |
| Eaf.SqliteCache | SQLite cache | |
| Eaf.Middleware.Worker | Background services |
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Tests: All new features must have unit tests
- Coverage: Maintain minimum 90% coverage
- Documentation: Add XML documentation to public methods
- BDD: Follow Given/When/Then pattern in Portuguese
| Code Smell | Bugs | Tests | Lang | Quality |
|---|---|---|---|---|
| Lines of Code | Duplicated Lines | Coverage | Maintainability |
|---|---|---|---|
| Reliability | Security | Technical Debt | Vulnerabilities |
|---|---|---|---|
Developed with ❤️ by the opensource community
Beyond this simple example, EAF provides a robust infrastructure and development model for modularity, multi-tenancy, cache, background jobs, data filters, setting management, domain events, unit and integration tests, and much more! You focus on your business code and don't repeat yourself!
StarMapper also requires a GitHub token to fetch star geolocation data. The live map image is not available until the repository is scanned.