-
Notifications
You must be signed in to change notification settings - Fork 1
Google Cloud Vision API Service TESTING #10
Description
The Google Cloud VISION API Service has 3 sequential steps that lead to its functionality, I went ahead and did all of these formally but with testing , there could be changes that are needed for implementation.
I will describe the OCR Service in its entirety , along with SUMMARY DETAILS for Service , and the SEQUENTIAL DATAFLOW of the APP so you can see the overarching structure of our service.
Step 1: Backend Scaffold + Auth Verification
What: FastAPI app boots, loads config, initializes Firebase Admin SDK, verifies tokens on protected routes.
Step 2: Google Cloud Vision — OCR Text Extraction
What: Given image bytes, call the Vision API and get raw text back.
Depends on: Step 0 (service account key with Vision API permissions), Step 1 (Firebase Admin initializes credentials context)
Step 3: Receipt Parsing — Raw Text to Item Names
What: Filter out non-item lines (store headers, prices, payment info) and clean the remaining lines into item names.
Depends on: Step 2 (raw OCR text as input)
Step 4: Normalization — Item Names to Known Ingredients
What: Clean up abbreviations, strip brand words, and fuzzy-match each item to TheMealDB's ingredient catalog.
Depends on: Step 3 (list of parsed item names), network access to TheMealDB API (free, no key)
Step 5: Upload Router — Orchestration + Firestore Write
What: Wire Steps 2-4 together behind an authenticated endpoint. Write results to the user's pantry.
Depends on: Step 1 (auth + Firestore client), Steps 2-4 (the three services)
STEP 5 is what is missing as of right now and essentially what I will be delegating off in a seperate issue with this one explaining testing and having the detail files.