Complete step-by-step guide to get the dashboard running.
- Node.js 18+ installed (
node --version) - A Supabase account (free tier works)
- The
synup/markopsGitHub repo cloned locally - Your DigitalOcean droplet (167.71.229.75) still running
- Go to supabase.com/dashboard
- Click New Project
- Name:
marketing-hq - Database password: save this somewhere safe
- Region: pick closest to your team (Mumbai or Singapore)
- Click Create new project — wait ~2 minutes
- Go to Settings → API
- Copy:
Project URL(this isSUPABASE_URL) - Copy:
anon publickey (this isNEXT_PUBLIC_SUPABASE_ANON_KEY) - Copy:
service_role secretkey (this isSUPABASE_SERVICE_ROLE_KEY)
- In Supabase dashboard, go to SQL Editor
- Click New Query
- Copy-paste the entire contents of
supabase/migrations/001_initial_schema.sql - Click Run (green button)
- You should see "Success. No rows returned" — that's correct
- Go to console.cloud.google.com
- Use your existing project (the one with Ads Auditor OAuth)
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Type: Web application
- Name:
Marketing HQ Dashboard - Authorized redirect URIs: add your Supabase callback URL:
https://YOUR-PROJECT-ID.supabase.co/auth/v1/callback - Click Create — copy the Client ID and Client Secret
- Go to Authentication → Providers
- Find Google and enable it
- Paste your Client ID and Client Secret
- Save
The auth callback route in our app already rejects non-@synup.com emails.
The Google OAuth hd parameter also hints to Google to show only @synup.com accounts.
# From your markops repo root
cd marketing-hq
# Install dependencies
npm install
# Create .env.local with your Supabase keys
cp .env.example .env.local
# Edit .env.local with your actual keys:
# NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
# NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
# SUPABASE_SERVICE_ROLE_KEY=eyJ...
# Run dev server
npm run devOpen http://localhost:3000 — you should see the login page.
# Install Vercel CLI if you haven't
npm i -g vercel
# From the marketing-hq directory
vercel
# Follow prompts:
# - Link to synup org
# - Project name: marketing-hq
# - Framework: Next.js (auto-detected)- Go to your project settings in Vercel dashboard
- Settings → Environment Variables
- Add these three:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEY
After deploying, add your Vercel domain to the Google OAuth authorized redirect URIs:
https://your-app.vercel.app/api/auth/callback
Also add it in Supabase:
- Authentication → URL Configuration
- Add your Vercel URL to Redirect URLs
SSH into your droplet:
ssh root@167.71.229.75nano /opt/google-ads-auditor/.envAdd these lines at the bottom:
SUPABASE_URL=https://YOUR-PROJECT-ID.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here
# From your local machine, push the updated repo first
# Then on the droplet:
cd /opt/google-ads-auditor
git pull
# Copy push script into place
cp supabase/push_to_supabase.py .
cp supabase/run_weekly_audit.sh .
chmod +x run_weekly_audit.sh# Run a dry-run audit first
source .env
cd /opt/google-ads-auditor
venv/bin/python -m google_ads_auditor.run_audit --dry-run --json-only
# Then push the result to Supabase
venv/bin/python push_to_supabase.py reports/google_ads_audit_*.jsonCheck your Supabase dashboard → Table Editor → audit_runs to confirm data appeared.
crontab -eAdd this line (runs every Friday at 9 AM server time):
0 9 * * 5 /opt/google-ads-auditor/run_weekly_audit.sh >> /var/log/audit_cron.log 2>&1
- Run
run_weekly_audit.shmanually on the droplet - Check Supabase Table Editor — data should appear in
audit_runs,negative_keywords, etc. - Open your deployed dashboard — you should see the audit data
- Try approving/denying a negative keyword — it should update in Supabase
┌─────────────────┐ ┌──────────────┐ ┌───────────────┐
│ DO Droplet │────▶│ Supabase │◀────│ Vercel │
│ (weekly cron) │ │ (database) │ │ (dashboard) │
│ Python auditor │ │ PostgreSQL │ │ Next.js app │
│ │ │ Auth │ │ │
│ push_to_supa │ │ REST API │ │ @synup.com │
│ base.py │ │ │ │ Google OAuth │
└─────────────────┘ └──────┬───────┘ └───────────────┘
│
┌──────▼───────┐
│ Clawbot / │
│ CEO API │
│ (service │
│ role key) │
└──────────────┘