Skip to content

PoisonOps/pageautopsy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PageAutopsy

Typing


The Problem

Most landing page feedback is polite and useless. "Your headline could be clearer." "Consider adding social proof." Generic advice that applies to every page and helps none of them.

PageAutopsy reads your actual content and tells you exactly what's killing conversions — with specific rewrites, not generic guidance.


How It Works

User pastes URL
      │
      ▼
/api/scrape  ─── server-side fetch (bypasses CORS)
                  extracts: title, H1, H2s, meta desc,
                  CTAs, hero copy, trust signals
      │
      ▼
/api/roast   ─── structured prompt → AI provider chain
                  scores 5 dimensions, writes roasts,
                  generates exact rewrites
      │
      ├── Gemini 2.0 Flash (primary)
      │         │
      │         └── quota exceeded / rate limit?
      │                    │
      │                    ▼
      └── Groq LLaMA 3.3 70B (fallback)
                  │
                  └── return whichever succeeds
      │
      ▼
Frontend renders with animations

If one provider goes down, the other picks up. Zero downtime, zero engineering overhead.


What You Get

  • Score out of 100 with an animated ring
  • 5-dimension breakdown: Headline, CTA Strength, Trust Signals, Copy Clarity, Structure
  • Specific roasts — references your actual content, not generic advice
  • 3 headline rewrites — with one-click copy
  • New CTA + hero paragraph written to replace yours
  • Conversion rate estimate — current vs potential after fixes
  • Shareable result — tweet your score with pre-filled message

The Prompt Engineering

The quality of the audit lives entirely in the prompt. 60 lines in api/roast.js. Engineered to:

// The prompt forces the AI to reference actual page content
// (not give generic advice that could apply to any page)
const prompt = `
  You are a conversion rate expert doing a brutal, honest audit.
  
  Page content:
  Title: ${scraped.title}
  H1: ${scraped.h1}
  CTAs found: ${scraped.ctas.join(', ')}
  Hero copy: ${scraped.heroCopy}
  Trust signals: ${scraped.trustSignals.join(', ')}
  
  Score each of these 5 dimensions 0-10:
  ...
  
  RULES:
  - Reference specific words/phrases from the actual content
  - Be specific. "Your CTA says 'Get Started' — that tells the user 
    nothing about what starts, for whom, or what they get." Not: 
    "Your CTA could be more specific."
  - Return strict JSON. No markdown. No preamble.
`;

The difference between "your CTA is weak" and "your CTA says 'Get Started' — started what, for whom, what happens next?" is everything.


Key Technical Decisions

Why no framework? The entire app loads in one HTTP request. No hydration, no bundle, no overhead. Vanilla JS + Vercel functions is the fastest possible architecture for a one-page tool.

Why server-side scraping? Browsers block cross-origin requests (CORS). You can't fetch('https://somesite.com') from the frontend. The Vercel function runs server-side, bypasses CORS, and returns structured content.

Why two AI providers? Gemini's free tier has per-minute quota limits. Groq's LLaMA 70B is a genuinely capable fallback that costs nothing to add. Both get you the same result; the user never knows which one ran.

Why LLaMA 3.3 70B on Groq specifically? Best open model for structured JSON output at this task. Strong enough to write brutal, specific critiques. Groq's inference is fast enough that it doesn't feel like a fallback.

Why not store results? No auth, no database, no running costs beyond Vercel's free function invocations. Every audit is stateless. The trade-off: users can't revisit old audits. Correct trade-off for a free tool at zero cost.


Tech Stack

Layer Tech Why
Frontend Vanilla HTML/CSS/JS One HTTP request, zero bundle
Functions Vercel Serverless (Node.js) CORS bypass, 40s timeout for AI
AI Primary Gemini 2.0 Flash Best quality, fast
AI Fallback Groq LLaMA 3.3 70B Reliable, free tier, JSON capable
Hosting Vercel free tier Zero cost

No database. No auth. Fully stateless.


File Structure

pageautopsy/
├── index.html      — single page, all 3 states (input / loading / results)
├── css/
│   └── style.css   — design system + all component styles
├── js/
│   └── main.js     — state machine, animations, API calls
├── api/
│   ├── scrape.js   — Vercel function: fetch + parse URL content
│   └── roast.js    — Vercel function: AI prompt + fallback chain
├── assets/
│   ├── header.svg  — animated README header
│   └── og-image.svg
└── vercel.json     — 40s function timeout (AI calls need it)

Running Locally

git clone https://github.com/PoisonOps/pageautopsy.git
cd pageautopsy

# .env.local
echo "GEMINI_API_KEY=your_key" >> .env.local
echo "GROQ_API_KEY=your_key"   >> .env.local

npx vercel dev   # reads .env.local, serves functions locally
# → localhost:3000

Gemini key: aistudio.google.com → API Keys Groq key: console.groq.com → API Keys (no credit card, 30 req/min free)


Honest Limitations

  • JS-heavy SPAs fail: the scraper fetches raw HTML — if the page renders entirely in JavaScript, it gets an empty shell. Works on ~70% of landing pages.
  • Auth-gated pages: can't audit pages behind login
  • No history: results don't persist — close the tab and they're gone (by design)
  • Rate limits: Gemini free tier is 15 RPM. Heavy traffic will fallback to Groq, which is 30 RPM. Beyond that: queue or upgrade.

Built in 1 day by Sahil Solankey
WhatsApp me if PageAutopsy roasted your page and you want to fix it →

About

☠ AI-powered landing page autopsy. Brutal, honest, free.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors