← Back to Overview

🏗️ Technical Architecture

Project Structure

PrivacyInsights/
├── Services/           # Business logic
│   ├── URLScannerService.swift
│   ├── DomainSecurityCheckerService.swift
│   ├── DeviceSecurityCheckerService.swift
│   ├── NetworkScannerService.swift
│   ├── IPDeviceAnalyzerService.swift
│   ├── GeoIPService.swift
│   ├── TracerouteEngine.swift
│   ├── BluetoothDiscoveryService.swift
│   ├── TrackerMonitoringService.swift
│   ├── QRCodeScannerService.swift
│   ├── CookieInspectorService.swift
│   ├── ContentBlockerService.swift
│   ├── PrivacyLeakDetectorService.swift
│   ├── ThreatIntelligenceService.swift
│   ├── LongRunningTaskManager.swift    # Screen lock & state restoration
│   ├── SpeechTranscriptionService.swift
│   ├── AdaptiveLMSFilter.swift         # Audio noise cancellation
│   ├── ExtendedProfiling/              # Photo analysis services
│   │   ├── ExtendedProfilingService.swift
│   │   ├── PhotoFilterService.swift
│   │   ├── SmartSamplingService.swift
│   │   ├── ActivityDetectionService.swift
│   │   ├── SocialPatternService.swift
│   │   ├── LifeEventService.swift
│   │   ├── VehicleDetectionService.swift
│   │   ├── FoodDetectionService.swift
│   │   ├── SensitiveDocumentService.swift
│   │   ├── HomeAnalysisService.swift
│   │   ├── WorkAnalysisService.swift
│   │   └── ExtendedCacheService.swift
│   └── ...
├── Views/              # SwiftUI views
│   ├── ContentView.swift
│   ├── OverviewView.swift
│   ├── ToolsView.swift
│   ├── LearnView.swift
│   ├── ProtectView.swift
│   ├── DeviceSecurityCheckerView.swift
│   ├── BluetoothDiscoveryView.swift
│   ├── TrackerMonitoringView.swift
│   ├── BluetoothLocationHistoryMapView.swift
│   ├── InterruptedTasksView.swift
│   ├── SpeechTranscriptionView.swift
│   ├── MeetingTranscriptionView.swift
│   ├── ExtendedProfiling/              # Photo analysis views
│   │   ├── ExtendedProfilingView.swift
│   │   ├── ScopeSelectionView.swift
│   │   ├── ExtendedDashboardView.swift
│   │   └── ExtendedAnalysisProgressView.swift
│   └── ...
├── Models/             # Data models
│   ├── ExtendedProfilingModels.swift
│   ├── BluetoothHistoryModels.swift
│   ├── TranscriptionModels.swift
├── Utilities/          # Helper functions
│   ├── AsyncContentView.swift
│   ├── DeferredView.swift
│   └── ...
├── Resources/          # Databases and configuration
│   ├── bluetooth_database.json    # 170+ Bluetooth SIG Company IDs
│   ├── oui_database.json          # MAC address to manufacturer
│   ├── country_coordinates.json   # Country coordinates for map
│   └── geoip_city.bin             # GeoIP binary database
├── PrivacyInsightsContentBlocker/ # Safari Content Blocker
│   └── blockerList.json           # Standard blocking rules
└── PrivacyInsightsSafariExtension/ # Safari Web Extension
    ├── SafariWebExtensionHandler.swift  # Native messaging
    └── Resources/
        ├── background.js          # Service worker with caching
        ├── popup.js               # Extension popup logic
        └── popup.html             # Extension UI

Architecture Pattern

MVVM with Services Layer

Services Layer

Views Layer

Models Layer

Technology Stack

Language & Platform

Key Frameworks

Safari Extensions

Data Storage

App Group

group.com.privacyinsights.shared

JSON-Based Databases

Binary Databases

UserDefaults

SwiftUI Best Practices

Modern APIs

Concurrency

State Management

Performance Optimizations

Memory Management

Network Optimization

UI Performance

Long-Running Task Management

Service: LongRunningTaskManager

Centralised management for tasks that require extended execution time.

Features

Integrated Services

Security & Privacy

Data Protection

Network Security

iOS Sandbox