Skip to content

Latest commit

 

History

History
104 lines (78 loc) · 2.92 KB

File metadata and controls

104 lines (78 loc) · 2.92 KB

URGENT: Real Business Data Setup Guide

🚨 CLIENT REQUIREMENT: Real Business Search Results

The client expects real business data, not mock/dummy data. Here's how to activate real business search:

🔑 Step 1: Get Required API Keys

Google Places API (Recommended)

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable "Places API" and "Geocoding API"
  4. Create credentials (API Key)
  5. Restrict the key to your backend domain for security

Yelp Fusion API (Optional - for additional data)

  1. Go to Yelp Developers
  2. Create an app to get API key
  3. Copy the API key for backend configuration

🚀 Step 2: Deploy Backend with Real APIs

Option A: Railway Deployment (Recommended)

# 1. Push to GitHub (already done)
git push origin main

# 2. Connect to Railway
# - Go to railway.app
# - Connect GitHub repo
# - Deploy from main branch

# 3. Add Environment Variables in Railway Dashboard:
OPENAI_API_KEY=sk-...
GOOGLE_PLACES_API_KEY=AIza...
GOOGLE_PLACES_ENABLED=true
YELP_API_KEY=your_yelp_key
YELP_API_ENABLED=true
ENV=production

Option B: Heroku Deployment

# 1. Install Heroku CLI
# 2. Create Heroku app
heroku create your-app-name

# 3. Set environment variables
heroku config:set OPENAI_API_KEY=sk-...
heroku config:set GOOGLE_PLACES_API_KEY=AIza...
heroku config:set GOOGLE_PLACES_ENABLED=true
heroku config:set YELP_API_KEY=your_yelp_key
heroku config:set YELP_API_ENABLED=true

# 4. Deploy
git subtree push --prefix backend heroku main

⚙️ Step 3: Configure Frontend for Real Backend

Update Vercel environment variables:

NEXT_PUBLIC_API_URL=https://your-backend-url.railway.app

🧪 Step 4: Test Real Data Flow

  1. Test Backend Directly:

    https://your-backend-url.railway.app/businesses?location=Manila&niche=lawyer
    
  2. Test Frontend:

    • Should now fetch real businesses from Google Places/Yelp
    • Will show actual business names, addresses, phone numbers
    • Real websites will be analyzed for scoring

📊 Expected Real Results

Instead of mock data like "Downtown Law Office - Manila", you'll get:

  • Real business names: "Sycip Salazar Hernandez & Gatmaitan"
  • Real addresses: "SyCip Law Center, 105 Paseo de Roxas, Makati"
  • Real phone numbers: "+63 2 8845 2345"
  • Real websites: "https://syciplaw.com"

⚡ Quick Test Commands

# Test if APIs are working
curl "https://your-backend-url/businesses?location=Manila&niche=restaurant"

# Should return real businesses with actual data

🆘 Immediate Action Required

  1. Get Google Places API key (15 minutes)
  2. Deploy backend to Railway/Heroku (30 minutes)
  3. Update frontend environment variable (5 minutes)
  4. Test with real data (10 minutes)

Total setup time: ~1 hour

The backend code is already ready for real APIs - just needs the keys and deployment!