How devi-sivakumar-ds/finsight works
Purpose and entry points
FinSight is an Expo/React Native research prototype for accessible, voice-first mock check deposits. The participant app starts at App.tsx, which mounts navigation in src/navigation/AppNavigator.tsx. Its companion operator system is a browser dashboard served by wizard-dashboard/server.js, with UI assets in wizard-dashboard/public/.
Study-mode control boundary
The app is explicitly configured for research-stage Wizard of Oz control in src/config/studyMode.ts. In this mode, the mobile client owns rendering, speech, feedback, navigation, and local deposit state; a human operator decides ambiguous conversational, capture, OCR, and confirmation outcomes. This separates interaction evaluation from unreliable autonomous perception or language decisions.
Mobile deposit workflow
The principal task is a staged navigation flow: home/onboarding, deposit overview and privacy, account selection, check preparation/capture, OCR review, amount entry, confirmation, then success or recovery. The deposit-specific navigator is src/navigation/DepositNavigator.tsx; representative stateful stages are src/screens/CheckCaptureScreen.tsx, src/screens/OCRProcessingScreen.tsx, and src/screens/ConfirmationScreen.tsx. src/screens/ErrorScreen.tsx provides a recovery boundary rather than silently failing.
Wizard command and synchronization loop
The app-side WebSocket client in src/services/wizardClient.ts connects to the relay and exchanges structured session, state, and event messages. src/services/wizardExecutor.ts maps received operator commands into app actions, while src/services/wizardState.ts maintains the reportable session/deposit snapshot. Shared protocol/state contracts live in src/types/wizard.ts and command definitions in src/utils/wizardCommands.ts. This continuous app-to-dashboard state reporting is the main anti-drift mechanism.
Operator dashboard and relay infrastructure
wizard-dashboard/server.js hosts the dashboard, relays WebSocket traffic between operator and app clients, and persists local session logs. The operator-facing dashboard is a lightweight browser application rooted at wizard-dashboard/public/index.html with behavior in wizard-dashboard/public/app.js. The mobile app therefore requires reachability to the dashboard server; Android USB workflows use scripts/wizard-android-usb.sh to reverse the relevant local ports.
Interaction-feedback services
Voice is a cross-cutting runtime layer: src/contexts/VoiceSettingsContext.tsx provides user settings, and src/hooks/useAlwaysOnVoice.ts / src/hooks/useTTS.ts integrate continuous interaction and spoken output. Service boundaries isolate platform or simulated capabilities: src/services/ttsService.ts, src/services/sttService.ts, and src/services/hapticsService.ts. Capture feedback is similarly encapsulated in src/services/captureSoundService.ts and src/components/VisualMic.tsx.
Autonomous-capability seams and mock domain backend
The codebase retains separable automation seams for future/non-WoZ operation: camera/snapshot guidance in src/services/geometryDetection.ts and src/services/snapshotAnalysis.ts, OCR simulation/extraction in src/services/ocrService.ts, and intent handling in src/services/intentService.ts. Banking actions are intentionally non-production and pass through src/services/mockBankingAPI.ts; account choices are local fixture data in src/data/accountProfiles.ts. No real banking integration is indicated.
Main entry points: wizardClient.ts Wizard client · DepositNavigator.tsx Deposit workflow · server.js Dashboard relay · CheckCaptureScreen.tsx Check capture
Components 20
Mobile participant app
Expo/React Native deposit study client.
- App entry
App.tsx - App navigator
src/navigation/AppNavigator.tsx - Deposit workflow · Routes deposit stages through success or recovery.
src/navigation/DepositNavigator.tsx - Check capture
src/screens/CheckCaptureScreen.tsx - OCR review
src/screens/OCRProcessingScreen.tsx - Confirmation
src/screens/ConfirmationScreen.tsx - Recovery · Explicit recovery boundary for failed stages.
src/screens/ErrorScreen.tsx - Automation seams · Future camera guidance, OCR, and intent handling boundary.
src/services/geometryDetection.ts - Mock banking · Non-production banking actions backed by local account fixtures.
src/services/mockBankingAPI.ts
Wizard control
Research-mode command and state synchronization.
- Study mode · Enables Wizard of Oz control boundary.
src/config/studyMode.ts - Wizard client · Reports session state and receives relay messages.
src/services/wizardClient.ts - Command executor · Maps operator commands into app actions.
src/services/wizardExecutor.ts - Session state · Maintains reportable session and deposit snapshot.
src/services/wizardState.ts - Wizard protocol
src/types/wizard.ts
Operator dashboard
Browser UI and WebSocket relay.
- Operator UI
wizard-dashboard/public/app.js - Dashboard relay · Serves the dashboard, relays WebSockets, and persists local logs.
wizard-dashboard/server.js - Android USB tunnel · Reverses local dashboard ports for Android USB workflows.
scripts/wizard-android-usb.sh
Interaction feedback
Voice, haptic, and capture feedback runtime.
- Voice settings
src/contexts/VoiceSettingsContext.tsx - Always-on voice · Continuous interaction and spoken output integration.
src/hooks/useAlwaysOnVoice.ts - Speech services · Text-to-speech and speech-to-text boundary.
src/services/ttsService.ts
Connections 21
- App entry → App navigator: mounts
- App navigator → Deposit workflow: enters deposit task
- Deposit workflow → Check capture: capture stage
- Check capture → OCR review: capture result
- OCR review → Confirmation: reviewed amount
- Deposit workflow → Recovery: failure path
- Study mode → Wizard client: enables WoZ sync
- Session state → Wizard client: reports snapshot
- Wizard client → Dashboard relay: WebSocket state and events
- Dashboard relay → Wizard client: operator commands
- Wizard client → Command executor: received commands
- Command executor → Deposit workflow: drives app actions
- Wizard protocol → Wizard client: message contracts
- Operator UI → Dashboard relay: operator WebSocket
- Android USB tunnel → Dashboard relay: Android reachability
- Voice settings → Always-on voice: configures
- Always-on voice → Speech services: uses speech I/O
- Deposit workflow → Always-on voice: voice guidance
- Check capture → Automation seams: guidance and analysis
- OCR review → Automation seams: OCR seam
- Confirmation → Mock banking: submits mock deposit