# SEO Audit / "Website SEO Potential" — exact spec (from recon + live screens)

The detail behind the dashboard "Website SEO Potential" score. Header: **Website SEO Potential**,
"Audited last week", buttons **Export as PDF** + **Refresh SEO Audit**. Three gauges: **SEO Score**,
**GEO Score**, **Combined Score** (labels: "Room to optimize" / "High potential").

Each check status = **OPTIMIZED** | **QUICK WIN** | **BIG OPPORTUNITY**. Section badge = e.g.
"1 quick win" / "2 big opportunities". Summary chips: "17 optimized · 6 quick wins · 10 big opportunities".
Checks can carry tags (e.g. `blog`, `article`) and an info tooltip.

## SEO Checks — 7 sections (real check names)
1. **Crawlability & Indexation** — Robots.txt Configuration · Noindex Directives · XML Sitemap Hygiene · Canonicalization · Index Coverage (GSC) · Redirect Chains
2. **Metadata & On-Page SEO** — Title Tag Quality · Meta Description Coverage · H1 Alignment · Heading Hierarchy · Image Alt Text
3. **Site Speed & Core Web Vitals** — Homepage score (X/100) · Largest Contentful Paint (LCP) · Cumulative Layout Shift (CLS) · Total Blocking Time
4. **Website Authority & Trust Signals** — Domain Authority · Services Page · About Page · Author Attribution · Customer Testimonials · Social Media Presence · Editorial Policy
5. **Structured Data & Rich Results** — Organization Schema · LocalBusiness Schema · (+ rich-result checks)
6. **Internal Linking & Site Architecture**
7. **Backlink Profile & Off-Page SEO**

## AI visibility GEO checks — 5 sections
1. **AI Search Visibility**
2. **LLM Content Eligibility**
3. **Entity & Knowledge Graph**
4. **AI Crawler Access & Bot Policy**
5. **Conversational Query Optimization**

## Opportunities to grow (prioritized flat list)
"Highest-impact opportunities to act on first." Each item: title · badge (BIG OPPORTUNITY) · tag (SEO|GEO) ·
effort (LOW EFFORT|MEDIUM EFFORT|HIGH EFFORT) · a 1–2 sentence recommendation. Examples (real):
- Meta Description Coverage · SEO · LOW EFFORT — "Write compelling meta descriptions (150–160 chars)…"
- H1 Alignment · SEO · MEDIUM EFFORT — "Ensure every page has exactly one H1…"
- Largest Contentful Paint (LCP) · SEO · HIGH EFFORT
- Organization Schema / LocalBusiness Schema · SEO · LOW EFFORT
- Brand Citation Rate · GEO · MEDIUM EFFORT
- Competitor Citation Dominance · GEO · MEDIUM EFFORT
- Answer-First Structure · GEO · MEDIUM EFFORT

## How each check actually runs (real implementation)
- **Crawlability**: fetch `/robots.txt`, `/sitemap.xml`; parse `<meta robots>`, `<link rel=canonical>`; follow redirects (chain length). Index Coverage → GSC API.
- **Metadata/On-Page**: fetch homepage (+ sample pages) HTML; check `<title>` length, `<meta name=description>` presence/length, exactly one `<h1>`, heading order, `<img alt>` coverage.
- **Core Web Vitals**: **PageSpeed Insights API** (needs `PAGESPEED_API_KEY`) → performance, LCP, CLS, TBT.
- **Authority/Trust**: crawl for /services, /about pages, author bylines, testimonials, social links, editorial policy; **Domain Authority** needs an external DA source (Moz/DataForSEO) — gate honestly.
- **Structured Data**: parse JSON-LD blocks for Organization/LocalBusiness/etc.
- **Internal Linking**: crawl internal links, orphan detection.
- **Backlinks (off-page)**: from our backlink data + external DA source.
- **GEO checks**: LLM (ai.ts) for AI Search Visibility / Conversational; crawler access = check robots.txt for GPTBot/ClaudeBot/PerplexityBot allow; entity = schema + brand consistency.

## Scoring model
- Per check: pass = OPTIMIZED; minor = QUICK WIN; major gap = BIG OPPORTUNITY.
- Section score + SEO Score / GEO Score / Combined Score (0–100 gauges).
- Dashboard "Website SEO Potential /13" = section-level rollup (7 SEO + ~5–6 GEO). Exact 13-check calc NOT in recon — use our own transparent rollup.

## Backlink Building settings (real, from live screen)
- **Backlink Building Disabled** state → "Enable Backlink Building" button.
- **Backlink Profile**: multiple profiles ("New Profile 1", **+ Add Profile**). Each profile: avatar, name ("Unnamed Profile"), bio ("No bio added yet. Click to edit…"), **Edit**. Fields: authorName, bio, linkedinUrl, headshotUrl, topics, expertKeyQuestions. `backlinkPlan` ∈ {0,1,2,3,5,10,20}/mo.
- **PR Backlink Dashboard** (when enabled): Pitches sent · Selected · Placed · Domain Authority + pipeline (drafted→pitched→selected→placed). [BUILT]

## What needs external keys (gate honestly, never fake)
- Core Web Vitals → PageSpeed Insights API key
- Domain Authority / off-page → Moz or DataForSEO key
- GEO AI checks + content → LLM key (ai.ts)
- Index Coverage → GSC (already wired)
Everything crawl-based (robots, sitemap, title, meta, H1, headings, alt, canonical, schema, internal links,
AI-crawler policy) runs with NO external key — just fetch the site.
