Skip to content

Commit e30c1db

Browse files
feat(docs,examples): deep content (Architecture/Testing/Performance/Security + AdvancedExamples) (#6)
1 parent a2791f8 commit e30c1db

File tree

6 files changed

+60
-0
lines changed

6 files changed

+60
-0
lines changed

Documentation/Architecture.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Architecture — SwiftUI-Data-Visualization
2+
3+
This document describes the architecture of SwiftUI-Data-Visualization following Clean Architecture and MVVM + Coordinator principles.
4+
5+
6+
7+
- Clear boundaries between layers
8+
- Dependency inversion via protocols
9+
- Testability by design (DI, protocol-first)

Documentation/Performance.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Performance Targets — SwiftUI-Data-Visualization
2+
3+
- Launch time: < 0.8s (cold), < 0.3s (warm)
4+
- Frame rate: 60fps sustained under load
5+
- Memory: < 250MB steady state
6+
- Networking: retries with exponential backoff, caching strategy applied
7+
- Monitoring: lightweight metrics hooks for frame time and memory

Documentation/Security.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Security & Privacy — SwiftUI-Data-Visualization
2+
3+
- Transport: TLS 1.2+ with modern ciphers
4+
- Storage: Keychain for secrets, encrypted persistence where applicable
5+
- Input validation and robust error handling
6+
- Least-privilege defaults; no sensitive logs
7+
- Compliance-friendly: privacy-first, opt-in analytics only

Documentation/Testing.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Testing Strategy — SwiftUI-Data-Visualization
2+
3+
- Unit tests for UseCases, Repositories, and Utilities
4+
- Integration tests for critical data paths
5+
- UI tests for primary flows (where applicable)
6+
- Coverage goal: 90%+ (quality over quantity)
7+
- Fast, deterministic, isolated tests
8+
9+
Commands:
10+
- Xcode: Product > Test (⌘U)
11+
- SwiftPM: swift test (module-dependent)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import SwiftUI
2+
3+
@available(iOS 15.0, *)
4+
struct AdvancedDemo: View {
5+
@State private var isActive: Bool = false
6+
7+
var body: some View {
8+
VStack(spacing: 16) {
9+
Text("Advanced Example")
10+
.font(.title)
11+
Toggle("Enable Feature", isOn: $isActive)
12+
RoundedRectangle(cornerRadius: 16)
13+
.fill(isActive ? .green : .gray)
14+
.frame(width: 240, height: 140)
15+
.overlay(Text(isActive ? "ENABLED" : "DISABLED").foregroundColor(.white))
16+
.animation(.easeInOut, value: isActive)
17+
}
18+
.padding(24)
19+
}
20+
}

Examples/AdvancedExamples/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Advanced Examples — SwiftUI-Data-Visualization
2+
3+
- Feature toggling demo with SwiftUI animations
4+
- Replace with repository-specific examples when integrating with package modules
5+
6+
Run in a host app target or SwiftUI preview.

0 commit comments

Comments
 (0)