A modern web application that tracks Pokemon TAG graded card sales from eBay, with intelligent card matching and price analytics, use the hosted version or download and run locally with all the card information - both run super fast.
- Real-time eBay Scraping: Automatically fetches sold TAG graded Pokemon cards
- Smart Card Matching: Fuzzy matching algorithm links sales to specific cards
- Individual Card Analytics: Price trends, statistics, and variant tracking
- Currency Conversion: Toggle between GBP and USD with real-time conversion
- Local Caching: Browser localStorage for instant loading
- Responsive Design: Works on desktop and mobile
- Open Source: Card database hosted on GitHub
eBay β Scraper β Card Matcher β Frontend Display
β
Card Database (JSON)
The application uses a sophisticated matching algorithm:
- Keyword Matching: Each card has multiple matching keywords
- Fuzzy Matching: Handles spelling variations and abbreviations
- Variant Detection: Automatically detects Regular/Full Art/Rainbow variants
- Confidence Scoring: 60%+ confidence threshold for matches
/data/cards/
βββ tag-team-cards.json # Card database
/pages/
βββ index.js # All sales view
βββ cards.js # Individual card view
βββ api/
βββ ebay.js # eBay scraper
βββ card-matcher.js # Card matching service
{
"setInfo": {
"name": "TAG Graded Cards",
"description": "Pokemon TAG graded cards from various sets",
"lastUpdated": "2024-06-01"
},
"cards": [
{
"id": "tag-001",
"name": "Pikachu & Zekrom-GX",
"setName": "Team Up",
"setCode": "TEU",
"cardNumber": "33",
"rarity": "Ultra Rare",
"type": ["Electric"],
"hp": 240,
"artist": "Mitsuhiro Arita",
"matchingKeywords": [
"Pikachu Zekrom",
"Pikachu & Zekrom",
"PikachuZekrom",
"Pika Zek",
"TEU 33",
"Team Up 33"
],
"imageUrl": "https://images.pokemontcg.io/sm9/33_hires.png",
"variants": [
{
"variant": "Regular",
"condition": "NM",
"marketPrice": 15.00
}
]
}
]
}- Primary: fetch + cheerio (Vercel-compatible)
- Fallback: Playwright (local development)
- Resilient: Graceful degradation between methods
- Multi-keyword matching: Handles various name formats
- Variant detection: Regular, Full Art, Rainbow Rare
- Confidence scoring: Ensures accurate matches
- Statistics calculation: Price trends and analytics
- Multi-currency support: GBP and USD with automatic detection
- Real-time conversion: Converts all prices based on user preference
- Persistent settings: Currency choice saved in localStorage
- Exchange rate API: Extensible for real-time rate updates
- Browser localStorage: Instant loading for users
- Timestamp tracking: Shows data freshness
- Error handling: "Failed to update" with last refresh time
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build- Edit
/data/cards/tag-team-cards.json - Add card with comprehensive
matchingKeywordsarray - Include multiple name variations and set codes
- Deploy - matches will work automatically
- Include full card name
- Add abbreviated versions ("Pika Zek")
- Include set code + number ("TEU 33")
- Add common misspellings
- Include symbol variations ("&" vs "and")
- Historical price charts
- Multiple set support
- Price alerts
- Market trend analysis
- Mobile app
- User watchlists
This is an open-source project! Contributions welcome:
- Card Database: Add missing cards to JSON files
- Matching Keywords: Improve keyword arrays for better matching
- Features: Add new functionality
- Bug Fixes: Report and fix issues
- Card Matching: ~100ms for 60 sales against 50+ cards
- Scraping: ~3-5 seconds for full eBay results
- Caching: Instant load from localStorage
- Matching Accuracy: 85%+ with confidence scoring
GET /api/ebay- Fetch latest sales dataPOST /api/card-matcher- Match sales to cards{ "sales": [/* eBay sales array */] }GET /api/exchange-rates- Get current exchange rates{ "success": true, "base": "GBP", "rates": { "GBP": 1.0, "USD": 1.27 }, "timestamp": "2024-01-01T00:00:00.000Z" }
Built with Next.js, Tailwind CSS, and lots of β