useVerificationEngine
The useVerificationEngine hook (hooks/commits/useVerificationEngine.ts) drives the real-time verification session when a commitment window opens.Responsibilities
- GPS Polling — Requests location updates at 1Hz intervals via useLocation
- Geofence Check — Compares current coordinates against the commitment’s geofence radius
- Photo Capture — Manages camera state for verification photo
- Status Transition — Updates instance status from pending to proceeding to completed or failed
- Triple-Write — Each status change goes through the orchestrator to persist across all three systems