Skip to content

baoduy/DKNet

Repository files navigation

DKNet Framework Documentation

Welcome to the comprehensive documentation for the DKNet Framework - a powerful collection of .NET libraries designed to enhance and simplify enterprise application development using Domain-Driven Design (DDD) principles and Onion Architecture patterns.

πŸ“š Quick Navigation

πŸš€ Getting Started

πŸ“– Core Documentation

πŸ“‹ Project Information

πŸ—οΈ Component Documentation

This documentation is organized by functional areas to help you understand how each component contributes to the overall architecture:

Foundation utilities and extensions that support all other components.

Comprehensive EF Core enhancements that implement repository patterns, domain events, and data access abstractions.

SlimMessageBus integration for implementing CQRS patterns and event-driven architecture.

πŸ”§ Service Layer

Application services including blob storage abstractions and data transformation utilities.

☁️ Aspire Integrations

Infrastructure orchestration helpers for .NET Aspire AppHost projects.

Startup orchestration utilities for web/API workloads.

πŸ—οΈ Architecture Overview

The DKNet Framework is built around Domain-Driven Design (DDD) principles and implements the Onion Architecture pattern. Each component is designed to support specific layers of this architecture:

Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      🌐 Presentation Layer                       β”‚
β”‚                     (API Controllers, UI)                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 🎯 Application Layer                            β”‚
β”‚              (Application Services, CQRS Handlers)              β”‚
β”‚                                                                 β”‚
β”‚  πŸ“¨ DKNet.SlimBus.Extensions                                    β”‚
β”‚  πŸ”§ DKNet.Svc.* (Services)                                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    πŸ’Ό Domain Layer                              β”‚
β”‚                (Entities, Aggregates, Domain Events)            β”‚
β”‚                                                                 β”‚
β”‚  πŸ—οΈ Core business logic and rules                               β”‚
β”‚  πŸ“‹ Domain Events via DKNet.EfCore.Events                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   πŸ—„οΈ Infrastructure Layer                       β”‚
β”‚           (Data Access, External Services, Persistence)         β”‚
β”‚                                                                 β”‚
β”‚  πŸ—ƒοΈ DKNet.EfCore.* (Repository patterns, Data access)           β”‚
β”‚  πŸ”’ DKNet.EfCore.DataAuthorization                               β”‚
β”‚  βš™οΈ DKNet.Fw.Extensions (Cross-cutting concerns)                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Architectural Principles

  1. Dependency Inversion: Inner layers don't depend on outer layers
  2. Separation of Concerns: Each component has a single, well-defined responsibility
  3. Domain-Centricity: Business logic is isolated in the domain layer
  4. Event-Driven Architecture: Domain events enable loose coupling between bounded contexts
  5. Repository Pattern: Abstracts data access and enables testability

πŸš€ Getting Started

To get started with the DKNet Framework:

  1. Choose Your Components: Review the documentation for each component to understand which ones fit your needs
  2. Review Architecture Patterns: Understand how each component fits into the DDD/Onion architecture
  3. Follow Implementation Guides: Each component includes detailed usage examples and best practices
  4. Explore Templates: Check out the SlimBus.ApiEndpoints template for a complete reference implementation

🀝 Contributing to Documentation

We welcome contributions to improve this documentation! If you find areas that need clarification or have suggestions for additional content, please:

  1. Open an issue describing the documentation improvement needed
  2. Submit a pull request with your proposed changes
  3. Follow the existing documentation structure and style

πŸ’‘ Tip: This documentation is designed to be published as GitHub Pages were generated by the 'copilot' 100%. If any feedback please raise an issue in the DKNet repository. Each section provides comprehensive guidance on implementing DDD and Onion Architecture patterns using the DKNet Framework components.

About

The DrunkCoding open source framework for .NET

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 5