diff options
| -rw-r--r-- | Docs/ARCHITECTURE.md | 19 | ||||
| -rw-r--r-- | README.md | 14 | ||||
| -rw-r--r-- | SECURITY.md | 4 |
3 files changed, 28 insertions, 9 deletions
diff --git a/Docs/ARCHITECTURE.md b/Docs/ARCHITECTURE.md index c006b40..d0d2108 100644 --- a/Docs/ARCHITECTURE.md +++ b/Docs/ARCHITECTURE.md @@ -1,4 +1,4 @@ -# DomainDig v4.4.1 Architecture +# DomainDig Architecture ## Overview @@ -19,9 +19,9 @@ Inspection flow: - `LookupRuntime`: orchestrates section services for a single inspection. - `DomainInspectionService`: builds inspection snapshots with provenance, cache state, and failure metadata. - `DomainReportBuilder`: assembles summaries, insights, risk scoring, workflow context, and report metadata. -- `DomainReportExporter`: renders TXT, CSV, and JSON output for app and local API use. -- `DomainViewModel`: coordinates SwiftUI state, persistence, audit sessions, monitoring, workflows, batch operations, imports, and exports. -- SwiftUI views: render screens and invoke view-model actions. +- `DomainReportExporter`: renders TXT, CSV, JSON, Markdown, and PDF output for app and local API use. +- `DomainViewModel`: coordinates SwiftUI state, persistence, audit sessions, monitoring, workflows, batch operations, imports, and exports. Its surface is split by concern across `DomainViewModel+Audit`, `+Monitoring`, `+Export`, `+Workflows`, `+History`, and `+Widget` extensions; the core type keeps the stored state and the inspection pipeline. +- SwiftUI views: render screens and invoke view-model actions. The largest view file was decomposed too — Settings screens live in `SettingsViews.swift` and the result detail sections in `ResultSectionViews.swift`. ## Audit Mode @@ -76,7 +76,16 @@ The app remains local-first. Purchase and entitlement code is local app infrastr - `DomainReportExporter` - `LocalAPIModels` -The major-version roadmap calls for a stronger compatibility promise around this local API contract in `v5.0.0`. +`v5.0.0` stabilized this contract: `LocalAPIContract` is the single source of truth for the `v1` wire version and JSON encoder, the response envelope and payloads are documented, and the shape is regression-locked by `LocalAPIContractTests`. See [local-api.md](local-api.md) for the endpoint and compatibility reference, and [data-migration.md](data-migration.md) for how the persisted store is versioned across app updates. + +## Testing + +Two test targets run from the `DomainDig` scheme's test action: + +- `DomainDigTests` — unit coverage of the deterministic core: `DomainReportBuilder`, `DomainReportExporter`, `DiffService`, `DomainDataPortabilityService` (merge/replace dedup), the store-migration runner, and the Local API contract. `SnapshotFixture` builds the deep `LookupSnapshot`/`DomainReport` models through the real builder so tests construct inputs without wiring every field. +- `DomainDigUITests` — Apple's `performAccessibilityAudit()` over every primary screen at default and largest Dynamic Type, plus metadata and screenshot assertions. See [ACCESSIBILITY.md](ACCESSIBILITY.md). + +A plain `xcodebuild test` (and CI) runs both. The unit net went in first in `v5.0.0` and is what made the god-file decomposition safe to attempt. ## Xcode Project Structure @@ -53,6 +53,16 @@ xcodebuild -project DomainDig.xcodeproj -scheme DomainDig -destination 'platform The app and local API share the canonical report pipeline through `DomainInspectionService`, `DomainReportBuilder`, and `DomainReportExporter`. The Local API's endpoints, response envelope, and `v1` compatibility policy are documented in [Docs/local-api.md](Docs/local-api.md). How the on-device store evolves across app versions is documented in [Docs/data-migration.md](Docs/data-migration.md). +### Tests + +Unit coverage of the deterministic core — `DomainReportBuilder`, `DomainReportExporter`, `DiffService`, `DomainDataPortabilityService` (merge/replace dedup), the migration runner, and the Local API contract — lives in the `DomainDigTests` target: + +```sh +xcodebuild test -project DomainDig.xcodeproj -scheme DomainDig -destination 'platform=iOS Simulator,name=iPhone 16' -only-testing:DomainDigTests +``` + +The `DomainDig` scheme's test action runs both `DomainDigTests` and the `DomainDigUITests` accessibility audit, so a plain `xcodebuild test` (and CI) exercises both. + ### Accessibility Audit `DomainDigUITests` runs `performAccessibilityAudit()` over every primary screen, @@ -79,7 +89,7 @@ between this script and CI. ## Release Planning -See `RELEASE_ROADMAP.md` for the semver release plan from `v4.4.1` through the planned `v5.0.0` stabilization milestone. +See `RELEASE_ROADMAP.md` for the semver release history from `v4.4.1` through the `v5.0.0` contract-stabilization milestone. ## Contributing @@ -95,4 +105,4 @@ This project is licensed under the MIT License. See `LICENSE`. ## Contact -Questions or feedback: [email protected] +Questions or feedback: [email protected] diff --git a/SECURITY.md b/SECURITY.md index 8ce229c..8908cc2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,8 +4,8 @@ |Version|Supported| |-------|---------| -| 4.x | ✅ Yes | -| < 4.0 | ❌ No | +| 5.x | ✅ Yes | +| < 5.0 | ❌ No | --- |
