Phase 3 part 1: Search Console and what already ranks

PLAN: Phase 3 rewritten around a weekly seven-job SEO loop (what ranks,
next keywords, brief, page, approval, morning check, Monday report),
with chatseo.app's ideas borrowed and rankings from Search Console only.

Google OAuth (PKCE, offline, read-only webmasters scope) from Settings →
Search engines, with each website's property. Search Console is synced
into SQLite by day (site, page, and page+query; 16 months, then twice a
day). SEO → What ranks shows the last 90 days: totals, the share of
clicks from hidden queries, best pages, queries shown but not clicked,
and the pages to protect and to push, each with its numbers. Schema 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 07:17:37 -07:00
co-authored by Claude Opus 5.5
parent d23d5e2a87
commit 5ea620a091
19 changed files with 1590 additions and 31 deletions
+34
View File
@@ -360,6 +360,40 @@ CREATE TABLE stripe_customers (
utm_medium TEXT NOT NULL DEFAULT '',
first_seen TEXT NOT NULL
);
`,
// 12: Search Console, by day: the property's totals, each page's, and
// each page and query's (Google leaves out the queries it hides, so the
// page totals are kept apart). Position is stored as position ×
// impressions, so averages over days weigh by impressions.
`
CREATE TABLE gsc_site_days (
site TEXT NOT NULL, -- the Search Console property
date TEXT NOT NULL, -- YYYY-MM-DD
clicks INTEGER NOT NULL,
impressions INTEGER NOT NULL,
pos_sum REAL NOT NULL,
PRIMARY KEY (site, date)
);
CREATE TABLE gsc_page_days (
site TEXT NOT NULL,
date TEXT NOT NULL,
page TEXT NOT NULL,
clicks INTEGER NOT NULL,
impressions INTEGER NOT NULL,
pos_sum REAL NOT NULL,
PRIMARY KEY (site, date, page)
);
CREATE TABLE gsc_query_days (
site TEXT NOT NULL,
date TEXT NOT NULL,
page TEXT NOT NULL,
query TEXT NOT NULL,
clicks INTEGER NOT NULL,
impressions INTEGER NOT NULL,
pos_sum REAL NOT NULL,
PRIMARY KEY (site, date, page, query)
);
CREATE INDEX gsc_query_days_by_query ON gsc_query_days (site, query, date);
`,
}