Changelog
All notable changes to JD.Domain Suite will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.0.0] - 2025-01-03
Added
Core Packages
JD.Domain.Abstractions - Core contracts and primitives
Result<T>monad for functional error handlingDomainErrorwith severity levels and metadataDomainManifestas the central domain description model- Core interfaces (
IDomainEngine,IDomainFactory) - Rule evaluation types and options
JD.Domain.Modeling - Fluent DSL for model description
Domain.Create()entry pointDomainBuilderwithEntity<T>,ValueObject<T>,Enum<T>- Reflection-based model discovery
- Type metadata extraction
JD.Domain.Configuration - EF-compatible configuration DSL
- Keys (primary, alternate)
- Properties (required, length, precision)
- Indexes (unique, filtered, included properties)
- Table mapping (name, schema)
JD.Domain.Rules - Rules and invariants DSL
- Invariants, Validators, Policies, Derivations
- RuleSetBuilder with fluent chaining
- Rule composition (Include, When)
- Severity levels and custom messages
JD.Domain.Runtime - Rule evaluation engine
DomainRuntime.CreateEngine()factory- Synchronous and asynchronous rule evaluation
- Rule set filtering by name
- Error/warning/info collection
Integration Packages
JD.Domain.EFCore - Entity Framework Core integration
ModelBuilder.ApplyDomainManifest()extension- Entity configurations from manifests
- Property, index, key, and table configuration
JD.Domain.Validation - Shared validation contracts
DomainValidationErrorrecordValidationProblemDetailsextending ProblemDetailsProblemDetailsBuilderfluent builderValidationProblemDetailsFactory
JD.Domain.AspNetCore - ASP.NET Core middleware
UseDomainValidation()middlewareDomainExceptionHandler(IExceptionHandler)AddDomainValidation()service registration- Minimal API extensions (
.WithDomainValidation<T>()) - MVC action filter (
[DomainValidation]attribute)
Generator Packages
JD.Domain.Generators.Core - Base generator infrastructure
BaseCodeGeneratorabstract classGeneratorPipelinefor chaining generatorsCodeBuilderfluent API with auto-generated headers- Deterministic generation infrastructure
JD.Domain.DomainModel.Generator - Rich domain type generator
- Domain proxy types (e.g.,
DomainBlog) - Construction-safe API with
Result<T> FromEntity()for wrapping tracked entities- Property-level rule enforcement
With*()mutation methods
- Domain proxy types (e.g.,
JD.Domain.FluentValidation.Generator - FluentValidation generator
- Map JD rules to FluentValidation
- Generate
AbstractValidator<T>classes - Custom error messages with escaping
- Severity mapping
Tooling Packages
JD.Domain.Snapshot - Domain snapshot serialization
DomainSnapshotmodel with metadata and hash- Canonical JSON serialization (xxHash64)
SnapshotStoragefor file operations
JD.Domain.Diff - Domain diff and migration planning
DiffEnginefor snapshot comparison- Breaking vs non-breaking change classification
DiffFormatterwith Markdown and JSON outputMigrationPlanGenerator
JD.Domain.Cli - Command-line tools
jd-domain snapshotcommandjd-domain diffcommandjd-domain migrate-plancommand- Global tool installation support
JD.Domain.T4.Shims - T4 template integration
T4ManifestLoaderfor loading manifestsT4TypeMapperfor type mappingT4CodeBuilderfor T4-friendly code generationT4EntityGeneratorfor entity code generation
Samples
- JD.Domain.Samples.CodeFirst - Code-first workflow demonstration
- JD.Domain.Samples.DbFirst - Database-first workflow demonstration
- JD.Domain.Samples.Hybrid - Mixed sources with snapshot/diff
Infrastructure
- Directory.Build.props with centralized NuGet metadata
- Source Link integration for debugging
- Deterministic builds
- Symbol packages (snupkg)
- 187 unit tests passing
v1 Acceptance Criteria Met
- Database-first workflow: Generate JD partials from existing EF models/configs
- Code-first workflow: Author JD DSL and generate EF configs
- Round-trip equivalence: EF to JD to EF produces equivalent model
- Domain types enforce invariants without external validation calls
- Snapshot/diff/migration is deterministic and CI-friendly
- Everything is opt-in; no forced dependencies