How daxnet/apworks-core works
Apworks Core is a .NET application framework for layered and event-driven CQRS applications. A representative user-facing workflow is an HTTP client calling the ASP.NET Core data service: query and sort text is parsed, the controller accesses aggregates through a repository, and changes are committed through its context. The tree also documents building blocks for event sourcing, messaging, snapshots, persistence adapters, and HAL responses. Repository-context behavior and parts of the HTTP/query workflow are sampled; other connections are included only where their role is explicit in the named components.
Main entry points: DataServiceController.cs Data service · EventSourcingDomainRepository.cs Event-sourcing repository · RepositoryContext.cs Repository context · MessageBus.cs Message bus
Components 22
ASP.NET Core
- Data service
src/Apworks.Integration.AspNetCore/DataServices/DataServiceController.cs - Fluent configuration
src/Apworks.Integration.AspNetCore/Configuration/ApworksConfigurator.cs - HAL responses
src/Apworks.Integration.AspNetCore/Hal/HalBuildConfiguration.cs - DI handler execution
src/Apworks.Integration.AspNetCore/Messaging/ServiceProviderMessageHandlerExecutionContext.cs
Domain and CQRS
- Domain repository
src/Apworks/Repositories/DomainRepository.cs - Event-sourced aggregate
src/Apworks/AggregateRootWithEventSourcing.cs - Command contracts
src/Apworks/Commands/ICommandBus.cs - Event-sourcing repository
src/Apworks/Repositories/EventSourcingDomainRepository.cs - Snapshots
src/Apworks/Snapshots/ISnapshotProvider.cs
Persistence
- Repository contracts
src/Apworks/Repositories/IRepository.cs - Repository context
src/Apworks/Repositories/RepositoryContext.cs - Storage adapters
src/Apworks.Repositories.EntityFramework/EntityFrameworkRepositoryContext.cs - Event-store adapters
src/Apworks.EventStore.AdoNet/AdoNetEventStore.cs
Events and Messaging
- Command bus
src/Apworks.Messaging.Simple/SimpleCommandBus.cs - Event publishing
src/Apworks/Events/IEventPublisher.cs - Event store
src/Apworks/Events/IEventStore.cs - Message bus
src/Apworks/Messaging/MessageBus.cs - RabbitMQ buses
src/Apworks.Messaging.RabbitMQ/RabbitMessageBus.cs - Handler execution
src/Apworks/Messaging/MessageHandlerExecutionContext.cs
Querying and HAL
- Condition parser
src/Apworks.Querying.Parsers.Irony/IronyQueryConditionParser.cs - Sort parser
src/Apworks.Querying.Parsers.Irony/IronySortSpecificationParser.cs
Other components
- HTTP client
Connections 19
- HTTP client → Data service: sends HTTP
- Data service → Condition parser: parses query
- Data service → Sort parser: parses sort
- Data service → Repository contracts: queries and mutates
- Data service → Repository context: commits changes
- Repository context → Repository contracts: creates and caches
- Repository context → Storage adapters: implemented by
- Event-sourced aggregate → Event-sourcing repository: uses event sourcing
- Event-sourcing repository → Event store: stores events
- Event-sourcing repository → Snapshots: supports snapshots
- Event-sourcing repository → Domain repository: specializes repository
- Command contracts → Command bus: dispatched through
- Event publishing → Message bus: publishes events
- Message bus → Handler execution: dispatches handling
- DI handler execution → Handler execution: extends execution
- RabbitMQ buses → Message bus: provides transport
- Event store → Event-store adapters: implemented by
- Fluent configuration → Data service: configures services
- HAL responses → Data service: formats responses