Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.31 KB

File metadata and controls

50 lines (38 loc) · 1.31 KB

Google My Business Integration - Quick Start

Quick setup guide for GMB integration.

🚀 Quick Setup (5 Steps)

1. Create Database Tables

-- Run in Supabase SQL Editor
-- Copy and paste CREATE_GMB_TABLES.sql

2. Set Up Google OAuth

  1. Go to Google Cloud Console
  2. Enable "Google My Business API"
  3. Create OAuth 2.0 credentials
  4. Add redirect URI: https://yourdomain.com/gmb/callback

3. Deploy Edge Functions

supabase functions deploy connect-gmb
supabase functions deploy fetch-gmb-data

4. Set Environment Variables

In Supabase Dashboard → Edge Functions → Secrets:

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • GMB_REDIRECT_URI

5. Connect Account

  1. Go to /dashboard/gmb
  2. Click "Connect Google My Business"
  3. Complete OAuth flow
  4. Data syncs automatically

📋 Files Created

  • CREATE_GMB_TABLES.sql - Database schema
  • supabase/functions/connect-gmb/ - OAuth connection
  • supabase/functions/fetch-gmb-data/ - Data sync
  • src/hooks/useGmbData.ts - React hooks
  • src/components/gmb/GmbDashboard.tsx - Dashboard component
  • src/pages/GmbPage.tsx - GMB page
  • src/pages/GmbCallback.tsx - OAuth callback handler

✅ Done!

Your GMB integration is ready. See GOOGLE_MY_BUSINESS_SETUP.md for detailed instructions.