summaryrefslogtreecommitdiff
path: root/Docs
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-22 11:46:52 -0500
committerChristian Cleberg <[email protected]>2026-04-22 11:46:52 -0500
commit37b02e5ee360d61751951b77b7b556165a3af1fc (patch)
treec2e30f32c4e8d2fcdf7035f97e9e353f09859114 /Docs
parentceac99c05f180d9008b75c9329822466ff60255b (diff)
downloaddomain-dig-37b02e5ee360d61751951b77b7b556165a3af1fc.tar.gz
domain-dig-37b02e5ee360d61751951b77b7b556165a3af1fc.tar.bz2
domain-dig-37b02e5ee360d61751951b77b7b556165a3af1fc.zip
feat(v3.0.0): unify platform architecture and introduce feature tiers
* consolidate DomainReport as canonical data model * add feature tier system (free/pro/data+ scaffolding) * apply clean feature gating across workflows and tracking * refactor app structure for maintainability * standardize navigation and settings * add data lifecycle controls * ensure consistency across UI, export, and CLI * stabilize internal inspection API
Diffstat (limited to 'Docs')
-rw-r--r--Docs/ARCHITECTURE.md48
1 files changed, 48 insertions, 0 deletions
diff --git a/Docs/ARCHITECTURE.md b/Docs/ARCHITECTURE.md
new file mode 100644
index 0000000..0d364d6
--- /dev/null
+++ b/Docs/ARCHITECTURE.md
@@ -0,0 +1,48 @@
+# DomainDig v3.0.0 Architecture
+
+## Overview
+
+DomainDig is a local-first inspection platform built around one canonical output model: `DomainReport`.
+
+Inspection flow:
+
+1. `DomainInspectionService.inspect(domain:)` gathers live and cached section data into `LookupSnapshot`.
+2. `DomainReportBuilder` converts the snapshot into a canonical `DomainReport`.
+3. 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
+
+- `LookupRuntime` coordinates section services.
+- `DomainInspectionService` normalizes failures, provenance, cache state, and section metadata.
+- `DomainReportBuilder` adds summaries, insights, risk scoring, change analysis, workflow context, and report metadata.
+- `DomainReportExporter` renders TXT, CSV, and JSON from the same report payload.
+- `DomainDigCLI` prints 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 tracking
+- `Pro`: workflows, batch operations, advanced exports
+- `Data+`: 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 assembly
+- `FeatureAccessService`: tier and capability checks
+- `DomainViewModel`: UI orchestration, persistence, batch coordination
+- Views: rendering and interaction only
+
+## Adding a New Data Source
+
+1. Add the raw collection call to `LookupRuntime`.
+2. Integrate it in `DomainInspectionService` with provenance, cache source, and normalized failures.
+3. Extend `LookupSnapshot` only if the raw result must persist.
+4. Add the summarized representation to `DomainReportBuilder`.
+5. Expose it through `DomainReportExporter` if it should appear in TXT, CSV, JSON, or CLI.
+6. Render the new summary in SwiftUI using `DomainReport` fields.