refactor(architecture): nine modular-monolith modules + NetArchTest guardrails (task 1.13, SDK-01) #71
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!71
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/1.13-modular-monolith"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #41 — ADR-010 §16.2 made enforceable (guardrails-as-code extended to structure).
Physical organization — src/FailSulit.Api/Modules/<M>/{Features,Services} for the nine modules (Identity, Org, Keys, Files, Sharing, Activity, Notifications, Integration, Admin). 189 files moved, namespaces updated, zero behavior change (837/0/39 identical before/after). EF entities keep their migration-pinned Data.Entities namespaces; ownership lives in the machine-readable ModuleMap.
Cross-cutting services reclassified as rank-0 infrastructure (FailSulit.Api.Services): AuditService, EmailService/IEmailService, NotificationService, PushService, FileActivityService(+Cleanup) — referenced by every module, so they anchor nothing. The Activity module keeps its entity, query endpoints and the SDK audit sink.
One inversion fixed properly — device revocation now flows downward:
IDeviceRevocationListener(Identity) is implemented by Keys'DeviceWrapCleanupand composed in Program, replacing Identity's direct DeviceKeyWrap delete. Org-domain handlers (SwitchTenant, ListTenantUsers) moved out of Identity with routes unchanged (self-mapped on the Org side).ArchitectureTests (NetArchTest.Rules, in api-ci):
Exit criterion verified: a deliberately violating fixture (Identity class referencing Share) failed the suite naming the type — output captured, then removed per the task.
Suite 841/0/39 Release ×3 (4 new arch tests); coverage gate 84.50% ≥ 80.