This is a submission for the Redis AI Challenge: Real-Time AI Innovators.
What I Built
ReceiptSense, an AI-powered receipt analyzer that helps people track spending, catch overpayments, and discover better grocery deals.**
It started as a simple idea: what if your grocery receipt could talk back? What if it could tell you where you overpaid, where you could’ve saved, and even how prices are trending over time?
So I built just that.
Users snap a photo of their receipt → OCR kicks in → Redis Stack handles the rest: semantic search, trends, insights, alerts. All in real time.
Whether it’s finding that you overpaid for almond milk or discovering Store A consistently beats Store B on certain items, ReceiptSense makes price awareness effortless.
Demo
- GitHub Source: receiptsense
- 🚀 Try it live: receiptsense.vercel.app
Screenshots:
1. Upload Interface
Drag-and-drop support. OCR kicks in immediately.
2. Price Comparison
Semantic search: type milk, get back whole milk, almond milk, and trend data.
3. Smart Recommendations
Green = good deal. Red = overpriced. Simple.
4. Receipt History
Track all past uploads, sorted by latest.
How I Used Redis 8
🔍 Vector Search + Semantic AI
I used vector embeddings to match similar items—even when the names don’t exactly match.
// Store vectorized items for search
await client.json.set(itemKey, '$', {
name: item.name,
price: item.price,
name_vector: embedding
});
// Query similar items
await client.ft.search('item_idx', '*=>[KNN 10 @vector $vec]', {
PARAMS: { vec: vectorBuffer }
});
Example:
Searching for “milk” brings up “whole milk”, “almond milk”, “oatmilk” — even if those terms weren’t used exactly.
📈 TimeSeries for Trend Analysis
I log prices over time and use Redis TimeSeries to generate insights.
await client.ts.add(`price:${itemName}`, Date.now(), price);
await client.ts.range(key, fromTime, '+', {
AGGREGATION: { type: 'avg', timeBucket: 86400000 }
});
Insight Examples:
- “Price increased 8.2% in the last 24 hours”
- “Lowest price last week: $2.89 at Kroger”
🔄 Real-Time Streams
Every receipt upload and price event goes through Redis Streams.
await client.xAdd('receipt-stream', '*', {
event: 'receipt_uploaded',
storeName,
totalAmount: totalAmount.toString()
});
That gives me a pipeline for triggering notifications, trend updates, or analytics dashboards in real time.
🧩 Multi-Model Redis Setup
Here’s how I structured the data:
- JSON Documents: Items + metadata + vector embeddings
- Hashes: Store receipt summaries and relationships
- Sets: Tagging and category matching
- Full-text Search + Vectors: Combined for smarter matching
AI-Driven Insights Generated
Insight Type | Example |
---|---|
💰 Best Deal | “Walmart: $2.99 (25% below avg)” |
⚠️ Overpaid Alert | “You paid $4.99, avg is $4.05 (+23.5%)” |
🏪 Store Rankings | “Target saves you $1.50 vs Kroger (last 5 receipts)” |
📈 Price Trends | “Almond milk up 8.2% this week” |
🕒 Time Insights | “Avg daily range: $2.99 - $5.49 (mean $4.12)” |
Tech Stack
- Frontend: Next.js 15 + Tailwind CSS
- OCR: Tesseract.js (runs client-side)
- Backend/DB: Redis Stack (JSON, Vectors, Streams, TimeSeries)
Why This Matters
Receipts are boring. But they hold valuable info.
With Redis Stack, I turned static pieces of paper into a live system that watches your grocery spending, helps you shop smarter, and shows you pricing trends most people never see.
That’s the real power of AI + real-time data.
If this idea sparks something for you or you'd like to collaborate—hit me up. Thanks for reading!
Top comments (0)