Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ TrustMeter

Analyze a product page before you buy and turn messy store pages into a simple trust score.

License: CC BY-NC 4.0 iOS 16.0+ Swift 5.7+ SwiftUI


📱 About TrustMeter

TrustMeter is an iOS application built with SwiftUI that helps online shoppers verify the authenticity and reliability of e-commerce store product pages. By inputting any product page URL, TrustMeter automatically fetches web content, extracts structured data, and evaluates trust signals such as price consistency, metadata quality, and security indicators to compute a comprehensive Trust Score.


🛠️ Tech Stack & Architecture

  • UI Framework: SwiftUI (Declarative UI components & dynamic themes)
  • Language: Swift 5.7+ (Async/Await concurrency)
  • Architecture Pattern: MVVM (Model-View-ViewModel)
  • Networking: URLSession asynchronous data fetching
  • Parsing Engine: Custom HTML DOM parser & JSON-LD schema extractor (ProductPageParser)
  • Scoring Engine: Algorithmic multi-factor heuristic analyzer (TrustScorer)
  • Persistence: Codable JSON storage backed by UserDefaults (HistoryStore)

✨ Key Features

  • 🔍 Live URL Analysis: Paste any online product page link to instantly fetch and analyze its underlying metadata.
  • 📊 Dynamic Trust Scoring: Comprehensive scoring algorithm evaluating:
    • Price Consistency: Detects visible price clarity, currency indicators, and unexpected discounts.
    • Metadata Quality: Evaluates Open Graph tags, product descriptions, images, and structured JSON-LD schemas.
    • Trust & Security Signals: Verifies HTTPS protocol, domain safety parameters, and vendor signals.
  • 📜 Historical Logs: Automatically saves recent scans for fast offline retrieval and comparison.
  • ⚙️ Customizable Settings: Manage history retention, theme preferences, and scanner behavior.

📸 Screenshots

Analyze Product Step Progress Result Score
Home Screen Analyzing Progress Analysis Result
Score Breakdown Scan History Settings
Score Breakdown Scan History Settings Screen

📂 Project Structure

TrustMeter/
├── TrustMeterApp.swift          # Main entry point for the iOS application
├── App/                         # Global state & App navigation
│   ├── AppSettings.swift        # User preference configurations
│   └── RootTabView.swift        # Main tab interface
├── Models/                      # Data models
│   ├── AnalysisResult.swift     # Represents complete scoring output
│   ├── ProductData.swift        # Parsed product elements
│   └── ScoreBreakdown.swift     # Categorized score component breakdown
├── Services/                    # Core business logic & parsers
│   ├── AnalyzerService.swift    # High-level analysis workflow controller
│   ├── ProductPageParser.swift  # HTML and schema extraction logic
│   ├── TrustScorer.swift        # Multi-factor trust scoring engine
│   ├── HistoryStore.swift       # Local persistence manager
│   ├── URLInputNormalizer.swift # URL formatting & validation helper
│   └── WebPageFetcher.swift     # Asynchronous web content fetcher
├── Views/                       # SwiftUI user interfaces
│   ├── Home/                    # Input and primary analysis screen
│   ├── History/                 # Previous scan history list & details
│   └── Settings/                # User options & app configuration
└── screenshots/                 # App preview images

🚀 Getting Started

Prerequisites

  • macOS: 13.0 (Ventura) or later
  • Xcode: 14.0 or later
  • Target OS: iOS 16.0+
  • Language: Swift 5.7+

Building & Running

  1. Clone this repository:
    git clone https://github.com/xyryc/TrustMeter.git
    cd TrustMeter
  2. Open the Xcode project:
    open TrustMeter.xcodeproj
  3. Select your target simulator (e.g. iPhone 15 Pro) or a connected physical iOS device.
  4. Press Cmd + R to build and run the app.

📝 License

4. 🚫 Creative Commons Non-Commercial (CC BY-NC 4.0)

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International Public License.

For full terms and details, please read the LICENSE.md file.

About

Analyze a product page before you buy and turn messy store pages into a simple trust score.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages