Aziz Khan
← Writing

How Uxlyze audits a landing page with headless Chrome and Gemini

GoAIArchitecture

Uxlyze takes a URL and returns a UX and conversion audit. This post is about how it works under the hood, because the interesting parts are not the AI.

The shape

  • Next.js dashboard for projects, reports and analysis credits.
  • Go analyzer that does the heavy work: load the page, measure it, screenshot it, ask the model.
  • Postgres in between. The dashboard creates a report row; the worker picks it up, fills it in and marks it done.

Splitting it this way keeps the web app fast. A full audit takes real seconds of browser time and model time, and none of that should block a request.

Loading the page like a user

The analyzer drives headless Chrome through chromedp. That matters because modern landing pages are rendered in the browser. Fetching the HTML gets you a shell; running the page gets you what a visitor sees.

From the live page it collects:

  • Meta and Open Graph tags for SEO.
  • Structure signals like navigation, sections and how much text there is.
  • Screenshots of key sections, waiting until each element is visible first.
  • Optionally, PageSpeed Insights data for performance.

Asking the model the right way

Screenshots go to Gemini with a versioned prompt and a response schema. Two things made that reliable:

  1. Prompts live in a file with versions (v1, v2), not in code. I can change the prompt without a deploy and compare versions on the same pages.
  2. Structured output. The model fills a schema instead of writing prose. The report generator gets fields it can render, not text it has to parse.

Keeping it from falling over

Browser automation is heavy. The Go service takes jobs into a buffered channel and runs them through a simple per-minute rate limiter, so a burst of reports queues up instead of launching a dozen Chromes at once.

What I'd do differently

The first version mixed deterministic checks and model judgment in one report. I'd keep them separate from day one. Deterministic checks (missing meta tags, slow pages) are facts; model output is opinion. Users trust the report more when it's clear which is which.