Osirion.Blazor.Cms.Domain
4.1.0
Prefix Reserved
See the version list below for details.
dotnet add package Osirion.Blazor.Cms.Domain --version 4.1.0
NuGet\Install-Package Osirion.Blazor.Cms.Domain -Version 4.1.0
<PackageReference Include="Osirion.Blazor.Cms.Domain" Version="4.1.0" />
<PackageVersion Include="Osirion.Blazor.Cms.Domain" Version="4.1.0" />
<PackageReference Include="Osirion.Blazor.Cms.Domain" />
paket add Osirion.Blazor.Cms.Domain --version 4.1.0
#r "nuget: Osirion.Blazor.Cms.Domain, 4.1.0"
#:package Osirion.Blazor.Cms.Domain@4.1.0
#addin nuget:?package=Osirion.Blazor.Cms.Domain&version=4.1.0
#tool nuget:?package=Osirion.Blazor.Cms.Domain&version=4.1.0
Osirion.Blazor.Cms.Domain
Domain layer for the Osirion.Blazor CMS ecosystem, containing core entity definitions, value objects, enums, and domain services.
Overview
The Domain project implements the Domain layer in the Clean Architecture pattern, providing the core business entities and logic for the CMS system. This project has minimal dependencies and serves as the foundation for the entire CMS ecosystem.
Key Components
Entities
Core business objects defined by their identity. ContentItem (namespace Osirion.Blazor.Cms.Domain.Entities) derives from DomainEntity<string>, which derives from Entity<TId>:
public class ContentItem : DomainEntity<string>
{
public string Title { get; set; } = string.Empty;
public string Author { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public string Path { get; set; } = string.Empty;
public string Slug { get; set; } = string.Empty;
public ContentStatus Status { get; set; } = ContentStatus.Published;
public IReadOnlyList<string> Tags { get; }
public IReadOnlyList<string> Categories { get; }
public FrontMatter? Metadata { get; set; }
// Additional properties
}
ContentItem.Create(id, title, content, path, providerId) builds a validated item. DirectoryItem models a content folder.
Value Objects
Objects that derive from ValueObject and are compared by value. FrontMatter (namespace Osirion.Blazor.Cms.Domain.ValueObjects) holds the parsed front matter of a content file, and SeoMetadata holds search engine metadata. FrontMatter is changed through copies:
var frontMatter = FrontMatter.Create("My first post")
.WithAuthor("Jane Doe")
.WithTags(new[] { "blazor", "cms" })
.WithFeatured(true);
Enumerations
Strong typing for domain concepts (namespace Osirion.Blazor.Cms.Domain.Enums):
public enum ContentStatus
{
Draft,
Published,
Scheduled,
Archived,
InReview
}
public enum SortField
{
Date,
Title,
Author,
LastModified,
Order,
Created,
PublishDate,
Slug,
ReadTime
}
public enum SortDirection
{
Ascending,
Descending
}
Domain Services and Repositories
Contracts that infrastructure implements. IContentProvider (namespace Osirion.Blazor.Cms.Domain.Services) is the abstraction over a content source such as GitHub or the file system:
public interface IContentProvider
{
string ProviderId { get; }
string DisplayName { get; }
bool IsReadOnly { get; }
Task<IReadOnlyList<ContentItem>> GetAllItemsAsync(CancellationToken cancellationToken = default);
Task<ContentItem?> GetItemByPathAsync(string path, CancellationToken cancellationToken = default);
Task<IReadOnlyList<ContentItem>?> GetItemsByQueryAsync(ContentQuery query, CancellationToken cancellationToken = default);
// Additional members for ids, urls, categories, tags and directories
}
IContentRepository (namespace Osirion.Blazor.Cms.Domain.Repositories) adds GetByPathAsync, FindByQueryAsync and related persistence operations.
Design Principles
This project follows these design principles:
- Persistence Ignorance: Domain entities know nothing about how they are stored
- Rich Domain Model: Domain entities contain both data and behavior
- Value semantics: Value objects are compared by value and changed through copies
- Encapsulation: Internal state is protected
- Domain-Driven Design: Modeling based on the ubiquitous language of the domain
Dependencies
The domain layer has minimal dependencies:
- .NET 9 and .NET 10: Target frameworks
- Markdig: For Markdown processing
- YamlDotNet: For front matter parsing
- Microsoft.AspNetCore.App: Shared framework reference
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Markdig (>= 1.4.0)
- YamlDotNet (>= 18.1.0)
-
net9.0
- Markdig (>= 1.4.0)
- YamlDotNet (>= 18.1.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Osirion.Blazor.Cms.Domain:
| Package | Downloads |
|---|---|
|
Osirion.Blazor.Cms.Application
Application layer for the Osirion.Blazor CMS ecosystem, implementing core business logic, use cases, and application services for content management. |
|
|
Osirion.Blazor.Cms.Infrastructure
Infrastructure layer for the Osirion.Blazor CMS ecosystem, implementing repositories, external service integrations, and infrastructure concerns. |
|
|
Osirion.Blazor.Cms.Core
Core CMS module for Osirion.Blazor - Provides cms management with provider pattern. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.2.0 | 250 | 10/18/2026 |
| 4.1.0 | 263 | 10/17/2026 |
| 4.0.0 | 171 | 10/12/2026 |
| 3.0.1 | 289 | 9/24/2026 |
| 3.0.0 | 243 | 8/5/2026 |
| 2.1.18 | 368 | 12/14/2025 |
| 2.1.17 | 325 | 12/14/2025 |
| 2.1.16 | 329 | 12/14/2025 |
| 2.1.15 | 303 | 12/12/2025 |
| 2.1.14 | 593 | 12/11/2025 |
| 2.1.13 | 579 | 12/11/2025 |
| 2.1.12 | 386 | 9/4/2025 |
| 2.1.11 | 351 | 8/31/2025 |
| 2.1.10 | 374 | 8/29/2025 |
| 2.1.9 | 391 | 8/29/2025 |
| 2.1.8 | 391 | 8/27/2025 |
| 2.1.7 | 497 | 8/25/2025 |
| 2.1.6 | 293 | 8/23/2025 |
| 2.1.5 | 368 | 6/24/2025 |
| 2.1.4 | 358 | 6/18/2025 |