How scythe0425/bridgeui works
bridgeUI helps older adults understand icons and controls in other phone apps. The user freezes a screen, selects a crop, chooses a detected element, and receives a short, plain-language explanation in an overlay. The backend detects the selected UI, then checks perceptual-hash and CLIP caches before requesting Gemini Vision on a miss; new explanations are cached. Documented supporting capabilities include background screen detection, category-based cross-app matching, database seeding, and capture reanalysis. Flutter internals and some API details are unsampled, so those links rely on README statements.
Main entry points: main.py Capture API · chroma_store.py ChromaDB store · MainActivity.kt Screen capture · trigger_button.dart Capture trigger
Components 21
Mobile capture
- Capture trigger
frontend/bridge_ui/lib/overlay/trigger_button.dart - Screen capture
frontend/bridge_ui/android/app/src/main/kotlin/com/bridgeui/bridge_ui/MainActivity.kt - Projection service
frontend/bridge_ui/android/app/src/main/kotlin/com/bridgeui/bridge_ui/MediaProjectionForegroundService.kt - Capture service
frontend/bridge_ui/lib/capture/capture_service.dart
Selection and guidance
- UI scanner
frontend/bridge_ui/lib/capture/ui_scanner.dart - Element extractor
frontend/bridge_ui/lib/capture/element_extractor.dart - Freeze overlay
frontend/bridge_ui/lib/overlay/freeze_overlay.dart - Capture sender
frontend/bridge_ui/lib/capture/capture_sender.dart - Result bubble
frontend/bridge_ui/lib/overlay/result_bubble.dart
Backend API
- Capture API
backend/main.py - Detection API
backend/main.py - Reanalysis API
backend/main.py
UI analysis
- OmniParser detector
backend/pipeline/ui_detector.py - Gemini explanation
backend/pipeline/deep_track.py
Matching and storage
- pHash stage
backend/pipeline/hash_track.py - CLIP embedder
backend/pipeline/embedder.py - CLIP search
backend/pipeline/fast_track.py - ChromaDB store
backend/db/chroma_store.py - Seed catalog
backend/db/seed_db.py
Other components
- Phone user
- Target app
Connections 26
- Phone user → Target app: opens app
README.md - Phone user → Capture trigger: starts capture
README.md - Capture trigger → Screen capture: requests screen
- Screen capture → Projection service: starts and binds
frontend/bridge_ui/android/app/src/main/kotlin/com/bridgeui/bridge_ui/MainActivity.kt - Screen capture → Capture service: provides screenshot
- Phone user → Freeze overlay: selects crop
README.md - Freeze overlay → UI scanner: requests detections
README.md - UI scanner → Detection API: posts screenshot
README.md - Phone user → Element extractor: chooses element
README.md - Element extractor → Capture sender: provides selection
- Capture sender → Capture API: posts capture
README.md - Detection API → OmniParser detector: runs detection
backend/main.py - Capture API → OmniParser detector: selects UI element
backend/main.py - Capture API → pHash stage: checks pHash
backend/main.py - Capture API → CLIP embedder: embeds cache miss
backend/main.py - Capture API → CLIP search: searches vector
backend/main.py - CLIP search → ChromaDB store: queries vectors
backend/pipeline/fast_track.py - Capture API → Gemini explanation: explains cache miss
backend/main.py - Capture API → ChromaDB store: writes explanation
backend/main.py - Capture API → pHash stage: registers new hash
backend/main.py - Seed catalog → ChromaDB store: seeds entries
backend/db/seed_db.py - Capture API → Result bubble: returns explanation
README.md - Phone user → Result bubble: reads guidance
README.md - Phone user → Reanalysis API: requests reanalysis
README.md - Reanalysis API → Gemini explanation: forces explanation
backend/main.py - Reanalysis API → ChromaDB store: updates entry
backend/main.py