A Progressive Web App (PWA) for iPhone that extracts fuel pump data and odometer readings from photos using OCR, then sends the data to Fuelly via SMS.
- 📷 Capture or upload photos of gas pump display and odometer
- 🔍 Client-side OCR using Tesseract.js (no backend required)
- 📊 Confidence scores for extracted data
- ✏️ Edit extracted values before sending
- 📲 One-tap SMS to Fuelly (503-512-9929)
- 📲 Installable to iPhone home screen
- 🌐 Works offline after first load
- Open Safari on your iPhone
- Navigate to the deployed URL
- Tap the Share button
- Scroll down and tap "Add to Home Screen"
- Tap "Add"
- Tap the pump photo area and capture the gas pump display
- Tap the odometer photo area and capture your odometer
- Tap "Extract Data"
- Review the extracted values (edit if needed)
- Tap "Send SMS to Fuelly"
- Verify and send the message
The app formats data for Fuelly's SMS service:
[miles] [price] [gallons]
Example: 45230 3.599 12.45
# Serve locally (requires HTTPS for PWA features)
npx serve . -l 8080 --ssl-cert ./cert.pem --ssl-key ./key.pem
# Or use any static file server
python3 -m http.server 8080Note: PWA features (service worker, install prompt) require HTTPS. For local testing, use localhost which is exempt from the HTTPS requirement.
-
Install Wrangler CLI:
npm install -g wrangler
-
Login to Cloudflare:
wrangler login
-
Create KV namespace:
cd worker wrangler kv:namespace create "RATE_LIMIT"
-
Update
wrangler.tomlwith the returned KV namespace ID -
Set environment variables in Cloudflare dashboard:
- Go to Workers > fuelly-ocr-proxy > Settings > Variables
- Add:
GOOGLE_VISION_API_KEY = your-key-here
-
Deploy:
cd worker npm install wrangler deploy -
Update
config.local.jswith your Worker URL
Deploy the web app to any static hosting service:
- GitHub Pages
- Netlify
- Vercel
- AWS S3 + CloudFront
Simply upload all files in the root directory.
- Vanilla JavaScript (no framework)
- Tesseract.js for OCR
- PWA (Service Worker + Manifest)
- HTML5 + CSS3
MIT