Skip to content

Repository files navigation

TrustWatch

Android app that submits suspicious content for risk analysis and keeps an auditable scan history.

Point TrustWatch at something you don't trust, get a risk verdict back, and keep a record of every scan you've run.


Features

  • Scan & analyse — submit content to the backend analysis endpoint and receive a structured risk verdict
  • Persistent scan history — every scan is stored and browsable, so verdicts can be revisited
  • Result breakdown — dedicated result screen rather than a toast, so findings are readable
  • Configurable backend — endpoint set in ApiClient, so you can point the app at your own instance

Architecture

Clean MVVM with a Retrofit data layer talking to a PHP/MySQL backend:

HomeActivity ──> ScanViewModel ──> ScanRepository ──> ApiService (Retrofit)
                                                          │
                                          backend/api/analyze.php
                                          backend/api/history.php
                                                          │
                                                    MySQL (schema.sql)
Layer Files
UI ui/splash, ui/home, ui/result, ui/history, ui/settings
ViewModel ScanViewModel.kt
Repository ScanRepository.kt
Network ApiClient.kt, ApiService.kt
Models AnalyzeRequest, AnalyzeResponse, ScanHistoryItem

Tech Stack

App: Kotlin · Android SDK · MVVM · Retrofit Backend: PHP · MySQL

Getting Started

Backend

cd backend
mysql -u root -p < sql/schema.sql   # create the schema
# set your DB credentials in config/db.php
php -S localhost:8000               # serve the API

App

  1. Open the project root in Android Studio
  2. Point BASE_URL in api/ApiClient.kt at your backend
    • Use http://10.0.2.2:8000/ for the Android emulator, not localhost
  3. Build and run

If you're testing against a plaintext HTTP backend, Android 9+ blocks cleartext traffic by default — add a network_security_config.xml exception for your dev host.

Roadmap

  • Offline queue so scans submitted without connectivity replay on reconnect
  • Shareable scan reports
  • Migrate backend to prepared statements throughout and add auth on the API

License

MIT

About

TrustWatch — Android app for verifying and monitoring trust signals, backed by a PHP service layer.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages