SEO has spent 20 years optimizing for ten blue links. But the questions don't go there anymore, people ask ChatGPT, Perplexity, and Claude directly, and those engines cite only a handful of sources. If you're not in that handful, you're invisible, no matter how well you rank on Google. Nobody could tell us which queries we were missing or who was getting cited instead. So we built an agent to measure it, and fix it.
What it does
Paste in a URL. The agent crawls your site, gathers high-intent keywords, then probes six real AI models (ChatGPT, Claude, Gemini, Grok, Llama, Perplexity) to see where competitors get cited and you don't. It ranks those gaps, generates publish-ready pages built for both Google and AI citation, and opens a GitHub PR to ship them.
How I built it
- Next.js 16 + React 19 on Vercel, with a staged pipeline: crawl → ideate → visibility → plan → generate → ship.
- OpenRouter behind one client to fan out across all six answer engines; an adapter layer over the Anthropic and OpenAI SDKs for generation.
- Prisma + Postgres (Supabase) for run state, Supabase Google auth, and Stripe prepaid credits with a hard cost guard.
- Octokit to drop the generated pages straight into a pull request.
Challenges I faced
- The 60-second serverless wall. Full runs blew past Vercel's limit, so we chunked the pipeline, one page per request, each persisted on its own. A timeout now costs one in-flight page, not the whole run.
- A stale cache that lied. Each serverless instance held its own copy of a run, so finished runs looked empty to other instances. We made every read DB-first.
- A dependency that 500'd prod. A transitive jsdom upgrade crashed our crawler; pinning it stopped the bleeding.
What I learned
AEO is a different game from SEO, and it's measurable — ranking on Google and getting cited by AI are only loosely correlated, and the gaps are the whole opportunity. We also learned that serverless changes your architecture, not just your deploy target: the database is the only source of truth, and "one long function" is a trap.
Built With
- anthropic
- anthropic-api
- claude
- css-frameworks-&-libraries-next.js-16-(app-router)
- deepseek
- deepseek-(configurable-generation-provider)-models-probed-for-visibility:-gpt-4o
- dompurify
- gemini
- github-api
- gpt-4o
- grok
- html
- javascript
- json-ld
- langfuse
- llama
- next.js
- node.js
- octokit
- openai
- openai-sdk
- openrouter
- perplexity
- perplexity-sonar-langfuse-(llm-tracing/observability)-apis-&-services-openrouter-api
- postgresql
- prisma
- react
- react-19
- sql
- stripe
- supabase
- tailwind-css-v4-prisma-7-(orm)
- tailwindcss
- typescript
- vercel
- zod
Log in or sign up for Devpost to join the conversation.