Skip to content

Getting Started

John Williams edited this page Mar 9, 2026 · 1 revision

Getting Started

This guide gets you from zero to a fully deployed ARGUS instance on Cloudflare in under 30 minutes.


Prerequisites

  • Cloudflare account (free tier works for everything)
  • Node.js 20+nodejs.org
  • Wrangler CLI — Cloudflare's deployment tool
  • API keys for detection services (all have free tiers — see below)

Step 1 — Install Wrangler

npm install -g wrangler
wrangler login
# Opens browser for Cloudflare OAuth — authenticate with your account

Step 2 — Clone the Repository

git clone https://github.com/itallstartedwithaidea/argus
cd argus
npm install

Step 3 — Create Cloudflare Resources

Run these commands in order. Copy the IDs they return — you'll need them in Step 4.

# D1 Database
wrangler d1 create argus-db
# → Returns: database_id = "xxxx-xxxx-xxxx"

# R2 Buckets (evidence storage)
wrangler r2 bucket create argus-evidence-vault
wrangler r2 bucket create argus-screenshots

# KV Namespaces (caching + rate limiting)
wrangler kv:namespace create SCORE_CACHE
# → Returns: id = "xxxx"
wrangler kv:namespace create RATE_LIMITER
# → Returns: id = "xxxx"
wrangler kv:namespace create SESSION
# → Returns: id = "xxxx"

# Queues (async processing)
wrangler queues create argus-analysis-queue
wrangler queues create argus-notify-queue

Step 4 — Configure wrangler.toml

Open wrangler.toml and replace all REPLACE_WITH_YOUR_* placeholders with the IDs from Step 3:

[[d1_databases]]
binding = "DB"
database_name = "argus-db"
database_id = "YOUR_D1_ID_HERE"      # ← paste here

[[kv_namespaces]]
binding = "SCORE_CACHE"
id = "YOUR_KV_ID_HERE"               # ← paste here

Step 5 — Initialize the Database

wrangler d1 execute argus-db --file=./schema/d1_schema.sql
# Should show: "Executed N statements"

Step 6 — Get Free API Keys

All of these have free tiers sufficient for development and moderate production use.

Service Purpose Get Key
Hive AI GAN image detection thehive.ai — free tier
GPTZero AI text detection gptzero.me — free tier
Google Search Console Auto-indexing on publish search.google.com/search-console
Resend (or CF Email) Email notifications resend.com — 100 emails/day free

Step 7 — Set Secrets

wrangler secret put ADMIN_SECRET_KEY
# Enter a strong password — this protects your admin dashboard

wrangler secret put HIVE_API_KEY
# Paste your Hive AI key

wrangler secret put GPTZERO_API_KEY
# Paste your GPTZero key

wrangler secret put SEARCH_CONSOLE_KEY
# Paste your Google Search Console service account key

wrangler secret put EMAIL_API_KEY
# Paste your Resend or email API key

Step 8 — Deploy the Worker API

wrangler deploy workers/api/index.js
# → Deploys to: argus.[your-subdomain].workers.dev

To deploy to your custom subdomain (argus.googleadsagent.ai), add your domain to Cloudflare first, then the routes in wrangler.toml will activate automatically.


Step 9 — Deploy the Frontend (Cloudflare Pages)

cd pages
npm install
npm run build

cd ..
wrangler pages deploy pages/.next --project-name argus
# → Deploys to: argus.pages.dev (then connect your custom domain)

Step 10 — Load the Browser Extension

  1. Open Chrome → address bar → chrome://extensions
  2. Enable Developer mode (toggle top right)
  3. Click Load unpacked
  4. Select the extension/ folder from this repo
  5. The ARGUS eye icon appears in your toolbar

The extension is now active on LinkedIn, Reddit, X, and Instagram.


Step 11 — Test the Setup

# Test the API
curl https://argus.googleadsagent.ai/api/score?platform=linkedin&handle=test

# Should return:
# { "status": "not_analyzed", "message": "Queued for analysis" }

Visit https://argus.googleadsagent.ai/admin and log in with your ADMIN_SECRET_KEY.


Local Development

For local development without deploying:

# Create .dev.vars from example
cp .dev.vars.example .dev.vars
# Fill in your API keys

# Run Worker locally (with local D1 + KV)
wrangler dev workers/api/index.js --local

# Run Pages locally (separate terminal)
cd pages && npm run dev
# → http://localhost:3000

Environment Variables Reference

Variable Required Description
ADMIN_SECRET_KEY Protects /admin dashboard
HIVE_API_KEY GAN image detection
GPTZERO_API_KEY AI text detection
SEARCH_CONSOLE_KEY Optional Auto-triggers Google indexing on publish
EMAIL_API_KEY Optional Sends admin and dispute notifications
APP_URL Set in wrangler.toml vars
ADMIN_EMAIL Set in wrangler.toml vars
FLAG_THRESHOLD Default: 40 (profiles below this go to queue)

Next Steps

Clone this wiki locally