Check it out: https://groggy.martinshameti.workers.dev
Tracking individual items from grocery purchases is challenging, and itemizing receipts manually is tedious.
As a user, I want to track my monthly spending on tomatoes, see price increases at the same store, and find cheaper options at other stores.
Groggy is a web app for scanning and managing grocery receipts. Upload a receipt photo, use AI-powered OCR (via Landing AI) to extract line items, store info, and totals, then view summaries or detailed breakdowns.
- Receipt Upload: Scan receipts via file upload (mobile/web compatible).
- OCR Extraction: Automatic line item detection (item names, prices) and store details.
- Receipt Storage: Securely store receipts in Cloudflare D1 database.
- User Authentication: Login/logout with user-specific receipt history.
- Receipt Views: List view (summaries) and detail view (full line items table).
- Responsive UI: Built with React and Tailwind CSS.
graph TD
A[User] --> B[React Frontend]
B --> C[Upload Receipt Image]
C --> D[Cloudflare Workers /extract Endpoint]
D --> E[Landing AI OCR API]
E --> F[Extract Line Items & Store Info]
F --> G[Cloudflare D1 Database]
G --> H[Store Receipt Data]
H --> I[Workers /receipts Endpoint]
I --> J[Fetch Receipts for User]
J --> B
B --> K[Display Receipt List/Summary]
K --> L[View Receipt Details]
L --> M[Show Line Items Table]
subgraph "Frontend (React)"
B
K
L
M
end
subgraph "Backend (Cloudflare Workers)"
D
I
end
subgraph "Database (D1)"
G
H
end
subgraph "External API (Landing AI)"
E
F
end
- Frontend: React, React Router, Tailwind CSS, Radix UI components.
- Backend: Cloudflare Workers (serverless functions).
- Database: Cloudflare D1 (SQLite-compatible).
- AI/OCR: Landing AI API for receipt text extraction.
- Deployment: Cloudflare Pages/Workers.
- Build Tools: Vite, TypeScript, Bun.
- Clone the repo:
git clone <repo-url> - Install dependencies:
bun install - Set up Cloudflare: Configure Wrangler for Workers/D1.
- Add env vars: API keys for Landing AI, auth secrets.
- Deploy:
bun run deploy
- Log in to access your receipts.
- Click "Scan Your Grocery Receipt" to upload a photo.
- View extracted receipts in the list (store name, date, total).
- Click a receipt for details (full line items table).
POST /extract: Upload receipt, process with Landing AI, store in D1.GET /receipts/:userId: Fetch user's receipts.GET /receipts/:userId/:id: Fetch single receipt details.