The projects that currently make up Ozone use the same architecture, using the best parts of DDD, CQRS and various Clean Architecture patterns.
Module currently consist of the following projects:
Project | Description | Examples |
---|---|---|
Ozone.Project.Application | The Application project is the main entry point or the application that is being run as an executable. It takes care of setting up all other modules and linking up interfaces to their implementation. |
|
Ozone.Project.Api | The Api project is the entrypoint for third party users of the application. This usually contains the API controllers that can handle interact with the outside world. |
|
Ozone.Project.Core | When implementing CQRS, this is the project that contains all the logic for creating and handling commands and queries. |
|
Ozone.Project.Infrastructure | In the Infrastructure project, we can find the implementation of the interfaces defined in the Core and Domain project. The Infrastructure project is the only project that references external concerns and contains an implementation for their abstraction that is used throughout the application. |
|
Ozone.Project.Persistence | Similar to the Infrastructure project, but contains the implementation for the persistence layer. Here the database access and other persistence related logic is implemented. |
|
Ozone.Project.Domain | The Domain project contains the domain model and the business logic of the application. |
|
flowchart TD
Project.Application-->Project.Persistence
Project.Persistence-->Database
Project.Persistence-->Project.Domain
Project.Application-->Project.Infrastructure
Project.Infrastructure-->Project.Domain
Project.Infrastructure-->Project.Persistence
Project.Infrastructure-->T[Third Party Service]
Project.Application-->Project.Api
Project.Api-->Project.Core
Client-->Project.Api
Project.Core-->Project.Domain
Additionally, there are some base projects that contain common functionality that can be used by all projects of their respective kind. The projects can be identified by the Ozone.Common
namespace e.g. Ozone.Common.Domain
. Every project of a specific type should import the corresponding base project. Moreover, the "Ozone.Common" module provides abstractions that can be used by all other modules and is by default included by all project base modules.