# Tier-Based POI System - Quick Reference

## 🎯 Tier Strategy

| Tier | Suggestions | Verification | Cost/100 |
|------|------------|--------------|----------|
| FREE | Overpass | Overpass | **$0** |
| STANDARD | Overpass + Mapbox | Mapbox + Overpass | **$0** |
| PREMIUM | OpenAI | Google + Mapbox + Overpass | **$2.80** |
| PRO | OpenAI + Overpass | Google + Mapbox + Overpass | **$3.80** |

## 📍 Key Files

| File | Purpose | Lines Changed |
|------|---------|---------------|
| `poi.processor.ts` | Core logic | +350 lines |
| `ai.controller.ts` | User tier extraction | +2 lines |
| `ai.service.ts` | Queue interface | +1 line |

## 🔧 Testing Commands

```bash
# Type-check
pnpm type-check

# Overpass tests
pnpm test:unit --filter=@my-roadtrip/api -- overpass

# Manual tier testing
curl -X POST http://localhost:3001/api/ai/suggest-pois \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"location":{"lat":48.8566,"lng":2.3522},"categories":["viewpoint"],"radiusKm":10}'
```

## 🎛️ Configuration

**No env vars needed** - tier auto-detected from `request.user?.plan`

## 📊 Cost Breakdown

| Source | Type | Cost | Limit |
|--------|------|------|-------|
| Overpass | Suggestion + Verification | **FREE** | Unlimited |
| Mapbox | Suggestion + Verification | **FREE** | 100k/month |
| OpenAI | Suggestion | **$0.10/1k** | Rate limited |
| Google | Verification | **$2.83/1k** | Pay per use |

## 🚀 Deployment Checklist

- [x] Code implemented
- [x] Type-check passing
- [x] Documentation complete
- [ ] Deploy to dev
- [ ] Manual testing (4 tiers)
- [ ] Monitor costs
- [ ] Deploy to prod

## 🎉 Success Metrics

- ✅ FREE tier: $0 cost (was N/A)
- ✅ STANDARD tier: $0 cost (was $2.80)
- ✅ PREMIUM tier: Same cost, better quality
- ✅ PRO tier: +$1 cost, multi-source suggestions

## 🔗 Quick Links

- [Full Documentation](./TIER_BASED_POI_SYSTEM_COMPLETE.md)
- [Overpass Integration](./OVERPASS_INTEGRATION_COMPLETE.md)
- [Architecture Reference](./docs/REFERENCE.md)
