Skip to content

Latest commit

Β 

History

History
97 lines (82 loc) Β· 6.12 KB

File metadata and controls

97 lines (82 loc) Β· 6.12 KB

meow-decoder Mobile App β€” React Native Build Tracker

Status Legend

  • Not started
  • Complete
  • [~] In progress

Phase 1 β€” Types & Validation Layer

  • src/types/capture.ts β€” CaptureRequest, CapturedFrame, CaptureResponse, CaptureState
  • src/types/navigation.ts β€” Navigation param types for React Navigation
  • src/services/requestValidator.ts β€” Zod schemas, validateRequest()
  • src/services/qrDecoder.ts β€” parseQRPayload(), validateBase64(), opaque data handling

Phase 2 β€” Constants & Utils

  • src/constants/config.ts β€” Timeouts, thresholds, FOUNTAIN_OVERHEAD, GIF detection params
  • src/constants/theme.ts β€” Colors, fonts, cat-themed palette
  • src/utils/base64.ts β€” isValidBase64(), estimateDecodedBytes() β€” no actual decode
  • src/utils/formatters.ts β€” formatElapsed(), formatPercent(), formatFileSize()

Phase 3 β€” Services Layer

  • src/services/frameCollector.ts β€” FrameCollector class, dedup, size tracking
  • src/services/jsonExporter.ts β€” exportResponse(), chunked export at 5MB boundary

Phase 4 β€” Hooks Layer

  • src/hooks/useCapture.ts β€” Full state machine reducer (IDLEβ†’CAPTURINGβ†’COMPLETE)
  • src/hooks/useQRScanner.ts β€” Vision Camera frame processor, GIF auto-detection
  • src/hooks/useStabilityMonitor.ts β€” Accelerometer shake detection
  • src/hooks/useSessionManager.ts β€” Progress calculations, recoverability metrics

Phase 5 β€” Components Layer

  • src/components/CameraPreview.tsx β€” Vision Camera wrapper with frame processor
  • src/components/ProgressHUD.tsx β€” Progress bar, frame count, recoverability labels
  • src/components/FrameOverlay.tsx β€” QR bounding box, status badges
  • src/components/StabilityIndicator.tsx β€” Shake/blur warning overlay
  • src/components/CatToast.tsx β€” Themed notification toasts with cat sounds

Phase 6 β€” Screens Layer

  • src/screens/SplashScreen.tsx β€” Animated cat logo, version display
  • src/screens/OnboardingScreen.tsx β€” First-run: air-gap explanation, camera permission
  • src/screens/HomeScreen.tsx β€” Load capture request or manual session entry
  • src/screens/CaptureScreen.tsx β€” Camera preview + overlay + progress HUD
  • src/screens/ExportScreen.tsx β€” Review results, save JSON, QR fallback display

Phase 7 β€” App Entry & Navigation

  • src/App.tsx β€” Navigation container, theme provider, AppState lifecycle
  • src/navigation/AppNavigator.tsx β€” Stack navigator wiring all screens

Phase 8 β€” Project Config

  • package.json β€” All dependencies per spec (vision-camera, zod, reanimated, etc.)
  • tsconfig.json β€” Strict TypeScript config with node/jest types for mocks
  • .eslintrc.js β€” ESLint + Prettier rules
  • babel.config.js β€” Reanimated plugin, worklets support

Phase 9 β€” Tests

  • __tests__/captureReducer.test.ts β€” All state transition tests
  • __tests__/requestValidator.test.ts β€” Zod validation edge cases
  • __tests__/frameCollector.test.ts β€” Dedup and accumulation tests
  • __tests__/jsonExporter.test.ts β€” Export and chunking tests
  • __tests__/formatters.test.ts β€” Utility formatter tests
  • __tests__/base64.test.ts β€” Base64 validation tests
  • __tests__/qrDecoder.test.ts β€” QR payload parsing tests
  • __tests__/webDemoIntegration.test.ts β€” Web demo wire format integration

Phase 10 β€” Platform & README

  • android/app/src/main/AndroidManifest.xml β€” Camera-only permissions
  • ios/MeowCapture/Info.plist β€” NSCameraUsageDescription
  • README.md β€” Full updated README per spec

Phase 11 β€” TypeScript Strict Compliance (tsc --noEmit clean)

  • tsconfig.json β€” Add node/jest to types for mock files and Buffer in tests
  • src/constants/config.ts β€” Fix as const on arithmetic expression (not a literal)
  • src/hooks/useQRScanner.ts β€” Replace deprecated Worklets.createRunInJsFn (typed never) with useRunOnJS hook
  • src/hooks/useStabilityMonitor.ts β€” Fix Accelerometer class (doesn't exist) β†’ accelerometer Observable + typed SensorData
  • src/hooks/useSessionManager.ts β€” Fix exactOptionalPropertyTypes violation on sessionId
  • src/components/CameraPreview.tsx β€” Fix FrameProcessor (not exported) β†’ ReadonlyFrameProcessor
  • src/components/ProgressHUD.tsx β€” Fix strokeDashoffset (SVG-only, not in DefaultStyle) β†’ RN-native animated width bar
  • src/services/jsonExporter.ts β€” Fix TextEncoder (not in ES2022 lib) β†’ Buffer.byteLength
  • src/services/qrDecoder.ts β€” Fix exactOptionalPropertyTypes violation on session_id return
  • src/screens/CaptureScreen.tsx β€” Remove unused setQrActive, qrActiveTimer
  • src/screens/ExportScreen.tsx β€” Remove unused progressColor import
  • src/screens/HomeScreen.tsx β€” Remove unused Alert; fix result possibly-undefined
  • src/screens/SplashScreen.tsx β€” Remove unused runOnJS, FIRST_LAUNCH_KEY
  • __tests__/jsonExporter.test.ts β€” Remove total_frames (not in CaptureResponse type)
  • __tests__/requestValidator.test.ts β€” Remove unused CaptureRequestSchema import

Security Invariants (cross-check on each phase)

  • No network permissions in any manifest (AndroidManifest β€” no INTERNET; Info.plist β€” NSAppTransportSecurity blocks all; network_security_config.xml β€” all cleartext blocked)
  • No frame data written to disk except during explicit export (state lives in React useReducer; AppState listener dispatches RESET on background)
  • No crypto keys or passwords ever referenced in app code (app is capture-only; decryption happens on desktop)
  • All incoming JSON validated with Zod before processing (CaptureRequestSchema.strict() in requestValidator.ts)
  • AppState background handler clears frame data from memory (useCapture.ts AppState addEventListener dispatches RESET)
  • No any type escapes in TypeScript (tsconfig strict + @typescript-eslint/no-explicit-any as ESLint error)
  • No console.log(frameData) or similar data leaks in production paths (no-console as ESLint error in .eslintrc.js)