Wire real camera + manual code entry (replace mock scan flow) #11

Open
opened 2026-03-24 20:08:18 +00:00 by forgejo_admin · 0 comments
Contributor

Type

Feature

Lineage

Standalone -- Phase 7 scope for mcd-tracker

Repo

forgejo_admin/mcd-tracker-app

User Story

As a McDonald's rewards tracker user
I want to use my real camera and enter codes manually
So that I can track actual receipts instead of using mock data

Context

The scan flow in scan/+page.svelte is 100% mocked -- fake camera, hardcoded survey code, simulated OCR delay. Need real functionality for end-to-end validation. Not doing receipt intelligence / OCR (that is Phase 14). Just making the flow functional with real camera + manual entry.

File Targets

Files to modify:

  • src/routes/scan/+page.svelte -- replace mock camera with real capture
  • Related API integration files for POST /receipts

Acceptance Criteria

  • Camera capture works on mobile (Capacitor) and web (file input fallback)
  • Photo uploads to API via POST /receipts successfully
  • Manual survey code entry replaces fake OCR
  • GPS location picker integrated
  • Full scan -> save -> history -> redeem flow works with real data

Test Expectations

  • Manual test on mobile device with Capacitor
  • Web fallback test with file input
  • Run command: npm run test

Constraints

  • Use @capacitor/camera for native, <input type="file" capture="camera"> for web fallback
  • Do not implement OCR -- that is Phase 14 scope
  • Response shape must stay compatible with existing frontend

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • mcd-tracker -- parent project
### Type Feature ### Lineage Standalone -- Phase 7 scope for mcd-tracker ### Repo `forgejo_admin/mcd-tracker-app` ### User Story As a McDonald's rewards tracker user I want to use my real camera and enter codes manually So that I can track actual receipts instead of using mock data ### Context The scan flow in `scan/+page.svelte` is 100% mocked -- fake camera, hardcoded survey code, simulated OCR delay. Need real functionality for end-to-end validation. Not doing receipt intelligence / OCR (that is Phase 14). Just making the flow functional with real camera + manual entry. ### File Targets Files to modify: - `src/routes/scan/+page.svelte` -- replace mock camera with real capture - Related API integration files for `POST /receipts` ### Acceptance Criteria - [ ] Camera capture works on mobile (Capacitor) and web (file input fallback) - [ ] Photo uploads to API via `POST /receipts` successfully - [ ] Manual survey code entry replaces fake OCR - [ ] GPS location picker integrated - [ ] Full scan -> save -> history -> redeem flow works with real data ### Test Expectations - [ ] Manual test on mobile device with Capacitor - [ ] Web fallback test with file input - Run command: `npm run test` ### Constraints - Use `@capacitor/camera` for native, `<input type="file" capture="camera">` for web fallback - Do not implement OCR -- that is Phase 14 scope - Response shape must stay compatible with existing frontend ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `mcd-tracker` -- parent project
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/mcd-tracker-app#11
No description provided.