Docs/ARCHITECTURE.md
48 lines · 2148 bytes
DomainDig v3.0.0 Architecture
Overview
DomainDig is a local-first inspection platform built around one canonical output model: DomainReport.
Inspection flow:
DomainInspectionService.inspect(domain:)gathers live and cached section data intoLookupSnapshot.DomainReportBuilderconverts the snapshot into a canonicalDomainReport.- UI, exports, and CLI rendering derive from
DomainReport.
LookupSnapshot remains an internal collection and persistence shape. DomainReport is the stable presentation and export contract.
Canonical Report Lifecycle
LookupRuntimecoordinates section services.DomainInspectionServicenormalizes failures, provenance, cache state, and section metadata.DomainReportBuilderadds summaries, insights, risk scoring, change analysis, workflow context, and report metadata.DomainReportExporterrenders TXT, CSV, and JSON from the same report payload.DomainDigCLIprints exporter output directly so CLI output matches the app.
Feature Tiers
The app now uses FeatureAccessService as the single feature gating surface.
Free: single lookup, basic history, limited trackingPro: workflows, batch operations, advanced exportsData+: future historical datasets and extended enrichment
Current release behavior is static scaffolding only. There are no purchases, backend checks, or remote entitlements.
Data Boundaries
- Inspection services: network collection only
DomainReportBuilder: canonical model assemblyFeatureAccessService: tier and capability checksDomainViewModel: UI orchestration, persistence, batch coordination- Views: rendering and interaction only
Adding a New Data Source
- Add the raw collection call to
LookupRuntime. - Integrate it in
DomainInspectionServicewith provenance, cache source, and normalized failures. - Extend
LookupSnapshotonly if the raw result must persist. - Add the summarized representation to
DomainReportBuilder. - Expose it through
DomainReportExporterif it should appear in TXT, CSV, JSON, or CLI. - Render the new summary in SwiftUI using
DomainReportfields.