The Challenge
Problem
Finding ladies night deals and promotions at bars and restaurants is fragmented — scattered across social media, venue websites, and word of mouth. Users needed a unified way to discover deals nearby, filtered by day and location.
- Deal information changes frequently and is hard to verify
- No single source of truth for venue promotions
- Manual searches are time-consuming and unreliable
- API costs can spiral quickly with naive implementations
- Need to work across multiple cities and countries
The Solution
Solution
Built a sophisticated multi-stage search pipeline that combines AI services (Google Gemini, Perplexity Sonar), Google Places API, and intelligent caching. The system discovers, verifies, and serves venue deals with 70% API cost reduction through smart caching strategies.
System Architecture
6-Stage Search Pipeline
Technology Stack
| Component | Technology |
|---|---|
| Runtime | Node.js 18+ |
| Framework | Express.js |
| Database | PostgreSQL 14+ with PostGIS |
| Cache | Redis |
| AI Services | Google Gemini 2.5, Perplexity Sonar |
| Location | Google Places API, OpenStreetMap Nominatim |
| Security | Helmet.js, express-validator, bcrypt |
| Mobile | React Native, Android (Kotlin), Expo |
Cost Optimization
API costs can quickly spiral with venue discovery apps. We implemented aggressive optimization strategies:
┌────────────────────────┬─────────────┬───────────┐ │ Service │ Daily Limit │ Est. Cost │ ├────────────────────────┼─────────────┼───────────┤ │ Google Places Search │ 500 calls │ $16.00 │ │ Google Places Details │ 300 calls │ $5.10 │ │ Google Gemini │ Unlimited │ ~$0.50 │ │ Perplexity Sonar │ Variable │ ~$2.00 │ ├────────────────────────┼─────────────┼───────────┤ │ Total │ │ ~$23.60 │ └────────────────────────┴─────────────┴───────────┘
Optimization Strategies
- Aggressive Caching: 24-hour daily cache for processed venues, Redis for frequent lookups
- API Call Batching: Max 2 API calls per venue verification
- Intelligence Hints: Pre-scraped data reduces AI tokens needed
- Distance Filtering: Venues >100km filtered out, 75km default radius
Results
The system successfully serves real-time venue discovery across multiple cities with native mobile apps on both Android and iOS platforms.
Need AI-powered discovery?
We build intelligent search systems that scale without breaking the bank.
Get in touch