Skip to content

Commit 8123472

Browse files
committed
feat: Introduce Roslyn analyzers to enforce architectural patterns and update documentation.
1 parent 7f8a5d4 commit 8123472

19 files changed

Lines changed: 1342 additions & 1 deletion

BookStore.slnx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<Solution>
2+
<Folder Name="/src/">
3+
<Project Path="src/BookStore.ApiService.Analyzers.Tests/BookStore.ApiService.Analyzers.Tests.csproj" />
4+
<Project Path="src/BookStore.ApiService.Analyzers/BookStore.ApiService.Analyzers.csproj" />
5+
</Folder>
26
<Project Path="src\BookStore.ApiService\BookStore.ApiService.csproj" />
37
<Project Path="src\BookStore.AppHost\BookStore.AppHost.csproj" />
48
<Project Path="src\BookStore.ServiceDefaults\BookStore.ServiceDefaults.csproj" />

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,20 @@ The Aspire dashboard opens automatically, providing access to:
5252
- **Optimistic Concurrency** with ETags
5353
- **Distributed Tracing** with correlation/causation IDs
5454
- **API Versioning** (header-based, v1.0)
55-
- **Soft Deletion** with restore capability
55+
- **Soft Deletion** - Logical deletes with restore capability
56+
57+
## Architecture Enforcement
58+
59+
The project includes a custom **Roslyn Analyzer** (`BookStore.ApiService.Analyzers`) that enforces Event Sourcing, CQRS, and DDD patterns:
60+
61+
- ✅ Events must be immutable record types
62+
- ✅ Commands follow CQRS conventions
63+
- ✅ Aggregates use proper Marten Apply methods
64+
- ✅ Handlers follow Wolverine conventions
65+
- ✅ Consistent namespace organization
66+
67+
See [Analyzer Rules Documentation](docs/analyzer-rules.md) for details.
68+
5669
- **Native OpenAPI** with Scalar UI
5770
- **Structured Logging** with correlation IDs
5871

0 commit comments

Comments
 (0)