How jelger1/focus-keyword-tool works
Keyword Focus & Intent Check is an internal SEO analysis tool: a marketer submits a page URL and focus keyword, receives an intent assessment, and—if it matches—a content-gap and optimization report. If it does not match, the tool proposes a better keyword and automatically re-analyzes. The README documents region/language selection, Search Console imports and API data, live progress, Markdown and PDF exports, and a status check. The graph follows those documented capabilities; some subsystem wiring is based on the README because its source was not sampled.
Main entry points: analyze.js Analyze endpoint · refocus.js Refocus endpoint · app.js Browser flow · status.js Status endpoint
Components 28
User workflow
- Browser flow
app.js - Report cards
report.js - PDF export
pdf.js
Analysis and refocus
- Analyze endpoint
api/analyze.js - Refocus endpoint
api/refocus.js - Status endpoint
api/status.js
SEO analysis
- Page extraction
lib/page.js - SERP provider
lib/serp.js - Intent assessment
lib/intent.js - Competitor comparison
lib/compare.js - Content gap
lib/gap.js - Refocus logic
lib/refocus.js - Keyword candidates
lib/keywordsources.js - Claim checks
lib/facts.js - Progress stream
lib/progress.js
Data sources
- Ahrefs data
lib/ahrefs.js - Search Console API
lib/searchconsole.js - Search Console export
lib/gsc.js - Source merging
lib/hybrid.js - Claude client
lib/claude.js
Report and controls
- Password and rate limit
lib/auth.js - Request throttling
lib/ratelimit.js
Other components
- Marketer
- Target website
- SERP services
- Anthropic Claude
- Google Search Console
- Ahrefs
Connections 45
- Marketer → Browser flow: submits URL and keyword
- Browser flow → Analyze endpoint: requests analysis
- Browser flow → Refocus endpoint: requests refocus
- Analyze endpoint → Page extraction: fetches target page
- Page extraction → Target website: reads HTML
- Analyze endpoint → SERP provider: fetches SERP
- SERP provider → SERP services: queries rankings
- SERP provider → Ahrefs data: uses Ahrefs provider
- Analyze endpoint → Ahrefs data: fetches keyword metrics
- Ahrefs data → Ahrefs: queries metrics and ideas
- Analyze endpoint → Search Console API: requests page data
- Search Console API → Google Search Console: queries performance
- Analyze endpoint → Competitor comparison: compares SERP pages
- Competitor comparison → Page extraction: extracts competitor pages
- Analyze endpoint → Intent assessment: builds intent assessment
- Analyze endpoint → Claude client: requests assessment
- Claude client → Anthropic Claude: sends prompts
- Analyze endpoint → Content gap: builds gap recommendations
- Analyze endpoint → Claude client: requests gap recommendations
- Analyze endpoint → Claim checks: validates model claims
- Analyze endpoint → Source merging: sets source flags
- Browser flow → Search Console export: uploads export
- Browser flow → Refocus endpoint: sends export rows
- Refocus endpoint → Page extraction: re-fetches target
- Refocus endpoint → Keyword candidates: builds candidate list
- Keyword candidates → Search Console API: requests query data
- Keyword candidates → Search Console export: reads uploaded export
- Keyword candidates → Source merging: combines source data
- Refocus endpoint → Ahrefs data: enriches and checks keywords
- Refocus endpoint → Claude client: chooses better keyword
- Refocus endpoint → Refocus logic: validates choice
- Refocus endpoint → Claim checks: checks proposed data
- Browser flow → Analyze endpoint: re-analyzes chosen keyword
- Analyze endpoint → Progress stream: streams phase updates
- Refocus endpoint → Progress stream: streams phase updates
- Analyze endpoint → Browser flow: returns report
- Refocus endpoint → Browser flow: returns keyword choices
- Browser flow → Report cards: renders report
- Report cards → PDF export: prepares printing
- Browser flow → Status endpoint: checks configuration
- Status endpoint → Search Console API: checks connection
- Status endpoint → Password and rate limit: checks password
- Status endpoint → Request throttling: limits checks
- Analyze endpoint → Password and rate limit: checks password
- Refocus endpoint → Password and rate limit: checks password