How aaliyahussain27/contextcam works
ContextCam is a mobile document-scanning app: a user captures a label or document, OCR extracts text, mode detection selects health/legal/academic analysis, and results can be saved to local history. The graph follows the sampled camera, processing, result, and storage calls. README capabilities such as offline OCR, expiry warnings, and PDF export are included; where their implementation details were not sampled, relationships are documented or marked unverified.
Main entry points: index.js Camera capture · processingService.js Scan processing · storageService.js Local scan history · result.js Analysis result
Components 12
Capture and OCR
- Camera capture
src/app/index.js - Text extraction
src/utils/ocrService.js
Contextual analysis
- Scan processing
src/utils/processingService.js - Mode detection
src/utils/modeDetector.js - Gemini analysis
src/utils/geminiService.js
Results and history
- Analysis result
src/app/result.js - History and PDF export
src/app/history.js - Local scan history
src/utils/storageService.js
App settings
- History settings
src/app/settings.js
Other components
- Phone user
- On-device OCR
- Gemini API
Connections 14
- Phone user → Camera capture: captures image
src/app/index.js - Camera capture → Text extraction: submits photo
src/app/index.js - Text extraction → On-device OCR: extracts text
README.md - Camera capture → Scan processing: submits extracted text
src/app/index.js - Scan processing → Mode detection: detects mode
src/utils/processingService.js - Scan processing → Gemini analysis: requests analysis
src/utils/processingService.js - Gemini analysis → Gemini API: generates analysis
src/utils/geminiService.js - Camera capture → Analysis result: routes scan result
src/app/index.js - Analysis result → Scan processing: reprocesses selected mode
src/app/result.js - Analysis result → Local scan history: saves scan
src/app/result.js - History and PDF export → Local scan history: loads and manages scans
src/app/history.js - History settings → Local scan history: manages stored history
src/app/settings.js - History and PDF export → Phone user: offers PDF backup
README.md - Local scan history → Phone user: warns before expiry
README.md