Real-time price aggregation from live API sources
Stack: Next.js 16.2 + TypeScript + DynamoDB + MCP
Data: Fetched live from Alpha Vantage, Best Buy, and Ticketmaster APIs
PriceLens aggregates live prices from real API sources across electronics, events, and finance. No fake data, no mock prices — every price shown is fetched in real-time from the source's official API.
The Problem: Product research means checking 5+ websites to find the best price. Most comparison tools either use stale data or scrape without permission.
The Solution: PriceLens uses official developer APIs to fetch real-time pricing data, organized into a clean comparison dashboard with automated price alerts.
- Live price comparisons — real prices from Best Buy, Ticketmaster, Alpha Vantage
- Smart deal finding — find the cheapest source instantly
- Automated price alerts — get notified when prices drop to your target
- MCP-native integration — query pricing from Claude, Cursor, or Cline
| Category | What We Track | Data Source | API |
|---|---|---|---|
| 📱 Electronics | Laptops, phones, headphones | Best Buy (live) | developer.bestbuy.com ✅ |
| 🎫 Events | Concerts, sports, theme parks | Ticketmaster (live) | developer.ticketmaster.com ✅ |
| 📈 Finance | Stocks, forex, crypto, commodities | Alpha Vantage (live) | alphavantage.co ✅ |
| Round-trip airfare | Integration coming | ⏳ | |
| 🏨 Hotels | Per-night room rates | Integration coming | ⏳ |
Prices flow through a pluggable DataSource adapter system (src/lib/sources/):
Next.js API Routes
│
▼
db-adapter.ts
│
├── DynamoDB (if AWS keys configured)
└── MemoryStore (local)
│
▼
PriceFetcher orchestrator
│
├── Alpha Vantage API ──→ finance (free, 25 req/day)
├── Best Buy API ──────→ electronics (free, instant signup)
└── Ticketmaster API ──→ events (free, 5,000 req/day)
Each source:
- Checks if its API key is configured in
.env.local - Fetches live prices when called
- Caches results with TTL to respect rate limits
- Gracefully degrades when no API key is set (shows setup guidance)
To add a new source: implement the DataSource interface, register it in price-fetcher.ts, add the env var to .env.example, and add the SourceInfo to types.ts.
PriceLens works with an in-memory store by default (no AWS required). When AWS credentials are configured in .env.local, it transparently switches to DynamoDB.
Products (sku: HASH)
├── name, category, tags, baseSpecs
└── 27 products across 5 categories
Prices (sku: HASH, source: RANGE)
├── pricePerUnit, unit, currency, timestamp, sourceType
└── Fetched live from API sources
Alerts (userId: HASH, alertId: RANGE)
├── sku, targetSource, targetPrice, createdAt
└── User-specific price drop notifications
# Via AWS CLI
chmod +x scripts/provision-dynamodb.sh
./scripts/provision-dynamodb.sh
# Or CloudFormation
aws cloudformation deploy \
--template-file infra/dynamodb-template.yaml \
--stack-name pricelens-dynamodb \
--capabilities CAPABILITY_IAMConnect any MCP-compatible client (Claude Desktop, Cursor, Cline):
| Tool | What It Does |
|---|---|
search_prices |
Search products by keyword/category across all sources |
compare_sources |
Full price comparison across merchants/airlines/sites |
find_best_price |
Find the cheapest source with savings percentage |
list_categories |
Browse product categories with counts |
list_products_by_category |
Products with specs in a category |
set_price_alert |
Create automated price drop alerts |
list_alerts |
View active alerts for any user |
delete_alert |
Remove a price alert |
get_source_overview |
Complete pricing summary per merchant/airline |
{
"mcpServers": {
"pricelens": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/pricelens/src/mcp-run.ts"],
"env": {
"ALPHA_VANTAGE_API_KEY": "your-key",
"BESTBUY_API_KEY": "your-key",
"TICKETMASTER_API_KEY": "your-key"
}
}
}
}- Node.js 18+
- npm 9+
- AWS account (optional — in-memory mode works without)
git clone https://github.com/LSUDOKO/PriceLens
cd PriceLens
npm installcp .env.example .env.localGet your free API keys:
- Alpha Vantage (finance): alphavantage.co/support — instant, free
- Best Buy (electronics): developer.bestbuy.com — instant, free
- Ticketmaster (events): developer.ticketmaster.com — instant, free
Without API keys, the app shows the product catalog with a setup guide. No fake data is displayed.
# Start the web dashboard
npm run dev
# → http://localhost:3456
# Seed the product catalog (not prices — those come from live APIs)
curl -X POST http://localhost:3000/api/seed# Health check shows source configuration
curl http://localhost:3000/api/health | jq
# Prices will populate once API keys are configured
# and the first API call triggers a live fetchSearch, filter, and sort 27 products across 5 categories. See live prices from configured API sources. Each product card shows its price range, best deal, and expandable source breakdown. When no API keys are configured, a setup banner guides you to add them.
Visual overview of live API sources color-coded by average price. See which sources are cheapest (green) vs most expensive (red). Summary cards show the cheapest source, most expensive, and price spread.
Full CRUD interface for price alerts. Search products with autocomplete, set target prices, choose specific sources or track all. Alerts trigger webhooks when live prices cross your threshold.
| Route | Method | Description |
|---|---|---|
/api/seed |
GET/POST | Seed product catalog (prices come live from APIs) |
/api/health |
GET | Health check + source status + cache age |
/api/prices |
GET | Query products/prices by SKU, source, category |
/api/alerts |
GET/POST/PUT/DELETE | Full CRUD for price alerts |
/api/check-alerts |
GET/POST | Manual alert check trigger (auth-protected) |
View the interactive architecture diagram for a visual representation of the full stack.
┌─────────────────────────────────────────────────────┐
│ Claude Desktop │
│ (or any MCP Client) │
└──────────────────────┬──────────────────────────────┘
│ stdio (JSON-RPC)
▼
┌─────────────────────────────────────────────────────┐
│ PriceLens │
│ ┌─────────────┐ ┌────────────┐ ┌───────────┐ │
│ │ Next.js API │ │MCP Server │ │Price │ │
│ │ Routes │ │(9 Tools) │ │Fetcher │ │
│ └──────┬──────┘ └─────┬──────┘ └─────┬─────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────┐ │
│ │ db-adapter.ts │ │
│ │ ┌──────────┐ ┌─────────────────┐ │ │
│ │ │DynamoDB │ │MemoryStore │ │ │
│ │ │(Optional)│ │+ TTL Cache │ │ │
│ │ └──────────┘ └────────┬────────┘ │ │
│ └─────────────────────────┼────────────────┘ │
│ │ │
│ ┌─────────────────────────▼────────────────┐ │
│ │ PriceFetcher │ │
│ │ ┌──────────┐ ┌────────┐ ┌────────────┐ │ │
│ │ │Best Buy │ │Ticket │ │Alpha │ │ │
│ │ │API │ │master │ │Vantage API │ │ │
│ │ │(live) │ │API │ │(live) │ │ │
│ │ │ │ │(live) │ │ │ │ │
│ └─────────────┘ └────────┘ └────────────┘ │
└─────────────────────────────────────────────────────┘
-
Pluggable Data Sources: Every live API source implements the
DataSourceinterface. Add new sources by creating an adapter and registering it. -
No Fake Data: Zero hardcoded prices. Every price is fetched live from official APIs. When no API key is configured, the app shows setup guidance — never fake data.
-
TTL Caching: Results are cached in memory with configurable TTLs (15 min for finance, 30 min for electronics, 1 hour for events) to respect API rate limits.
-
Graceful Degradation: Each source adapter checks for its API key. Missing keys = empty data = clear UI guidance. No crashes, no errors.
-
MCP First: The MCP server runs on the same
db-adapterlayer as the web UI. Every API endpoint is also accessible as an MCP tool.
Set these environment variables in Vercel:
ALPHA_VANTAGE_API_KEYBESTBUY_API_KEYTICKETMASTER_API_KEYNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYAWS_ACCESS_KEY_ID(optional)AWS_SECRET_ACCESS_KEY(optional)AWS_REGION(optional)
./scripts/provision-dynamodb.sh
aws dynamodb list-tables --region us-east-1
# → pricelens-products, pricelens-prices, pricelens-alerts# Type check
npm run typecheck
# Lint
npm run lint
# Run tests (24 unit tests)
npm run test
# Watch mode
npm run test:watch
# MCP server (for AI client integration)
npm run mcpMIT
- Uses Alpha Vantage API for live financial data
- Uses Best Buy Developer API for live electronics pricing
- Uses Ticketmaster Discovery API for live event pricing
- Uses Amazon DynamoDB for persistent storage (optional)
- Uses Next.js 16.2 + Vercel for frontend deployment
