Skip to content

feat(detector): Hidden Camera Detector — full multi-sensor app - #15

Draft
cloudygetty-ai wants to merge 4 commits into
mainfrom
claude/hidden-camera-detector-oemwq7
Draft

cloudygetty-ai wants to merge 4 commits into
mainfrom
claude/hidden-camera-detector-oemwq7

Conversation

@cloudygetty-ai

@cloudygetty-ai cloudygetty-ai commented Jun 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Complete hidden camera detector app built in React Native / TypeScript, replacing the game entry point. All sensors run in parallel — designed to surface a threat reading in under 2 seconds.

Detection Methods

Sensor What it finds Weight
Network Scanner IP cameras, DVRs, NVRs on local WiFi subnet — probes 9 ports, fingerprints 20+ camera vendor signatures (Hikvision, Dahua, Axis, ONVIF, RTSP…) 45%
Bluetooth Scanner BLE cameras, IoT recording devices — matches name patterns + manufacturer IDs 30%
Magnetometer Electronic anomalies from camera hardware — 10 Hz rolling baseline with spike detection 25%

Threat Engine

ThreatScore (0–100) aggregates all three signals with configurable weights. Levels: SAFE → LOW RISK → SUSPICIOUS → THREAT DETECTED → CAMERA FOUND. Haptic vibration triggers on HIGH and CRITICAL.

Screens (5-tab navigation)

  • SWEEP — all sensors running simultaneously, live radar pulse, threat meter, magnetic graph, device list prioritised by camera confidence
  • NETWORK — subnet probe with live progress bar, HTTP response fingerprinting, port inventory per device
  • MAGNETIC — real-time XYZ field components, animated anomaly gauge, rolling graph with threshold line, scan tips for where to sweep
  • BLUETOOTH — BLE scan with device confidence scoring, anonymous device flagging, RSSI signal bars
  • LOG — persistent history of up to 100 scans with camera summaries and threat scores

Architecture

src/detector/
├── types.ts                     # Shared interfaces
├── services/
│   ├── threat.service.ts        # Scoring engine + color/label maps
│   ├── magnetometer.service.ts  # 10 Hz sensor abstraction (mock → react-native-sensors)
│   ├── network.service.ts       # fetch-based subnet probe with fingerprinting
│   └── bluetooth.service.ts     # BLE scan abstraction (mock → react-native-ble-plx)
├── store/detector.store.ts      # Zustand — recomputes threat on every sensor update
├── hooks/                       # useMagnetometer · useNetworkScan · useBluetooth · useThreatScore
├── components/                  # ThreatMeter · RadarPulse · MagneticGraph · DeviceCard · SignalBars
├── screens/                     # SweepScreen · NetworkScreen · MagnetometerScreen · BluetoothScreen · HistoryScreen
└── DetectorApp.tsx              # Root with SafeAreaView + 5-tab bar

Native Package Swap-in (zero logic changes)

All sensor services use useMock = true with clearly marked NOTE[P1] comments. To enable real sensors:

  • Magnetometer → npm i react-native-sensors and flip flag
  • BLE → npm i react-native-ble-plx and flip flag
  • WiFi local IP → npm i react-native-wifi-reborn for real subnet inference

Aesthetic

Dark luxury: obsidian #0D0A14 · gold #C9A84C · violet #8B5CF6 · DM Mono throughout.

Test plan

  • Launch app — SWEEP tab renders, radar shows idle state
  • Tap START SCAN — radar pulses, magnetometer anomaly graph populates, network progress bar advances, BLE devices appear
  • Magnetic anomaly spike triggers correct threshold label and color change
  • Network device found → DeviceCard appears, cameras sorted to top
  • STOP & SAVE → threat score persists, scan appears in LOG tab
  • Navigate all 5 tabs while scan is active — no state loss
  • High threat → haptic vibration fires
  • History tab shows summary stats and per-scan camera lists

claude added 4 commits June 17, 2026 10:41
Full-sensor hidden camera detection system replacing the game entry point.
Detects cameras via magnetic field anomalies, network scanning, BLE, and threat scoring.

Features:
- ALL-SENSOR SWEEP: magnetometer + network + BLE running in parallel
- MAGNETIC DETECTOR: 10 Hz rolling baseline anomaly tracking with live graph
- NETWORK SCANNER: HTTP probe of 254 subnet hosts across 9 camera ports with signature fingerprinting (Hikvision, Dahua, Axis, ONVIF, RTSP etc.)
- BLUETOOTH SCANNER: BLE device scan with name-pattern and manufacturer-ID camera detection
- THREAT ENGINE: weighted multi-signal scoring (NET 45%, BLE 30%, MAG 25%) producing 0-100 score + level
- SCAN HISTORY: persisted log of up to 100 scans with camera summaries
- Haptic alerts on high/critical threat detection
- Dark luxury aesthetic: obsidian #0D0A14, gold #C9A84C, violet #8B5CF6
- Full abstraction layer — swap mock sensors for react-native-sensors + ble-plx with zero logic changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls9aDv92vFN3PHSusCAVnE
- Fix TS7006: add explicit `(v: string, k: string)` types on Headers.forEach
  in network.service.ts (was causing type-check to fail)
- Run prettier across all 21 detector files to resolve prettier/prettier
  lint errors introduced by our formatting style

type-check: 0 errors · lint: 0 errors in detector/ · tests: 107/107

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls9aDv92vFN3PHSusCAVnE
- Remove unused imports: GameState (HUD), GravityZone/TimeEchoZone/HelixRelay (GameEngine), BuildingMaterial (gameStore)
- Remove dead code: abilityCooldownPct (HUD), makeMaterials() (gameStore)
- Auto-fix prettier formatting across characters.ts, portraits.ts, GameEngine.ts, MeteorManager.ts, gameStore.ts, game.ts, LobbyScreen.tsx
- Re-run prettier on detector files touched by eslint --fix

Result: 0 errors (23 inline-style warnings, warnings-only)
type-check: clean · lint: 0 errors · test: 107/107

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls9aDv92vFN3PHSusCAVnE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants