Skip to main content
    All work

    AI Diagnostic Suite

    Five AI verticals built on one deployment with host-header routing. The public one is ideas: name a niche, get its top cited pain points and a planned-out product idea.

    The problem

    Five separate diagnostic products would mean five deployments, five pipelines, and five sets of infrastructure to maintain — for what is the same pipeline pointed at different sources and prompts.

    Approach

    • One Next.js application resolves the vertical from the Host header, so a new vertical is a config file rather than a deployment.
    • Report generation runs asynchronously — the request returns immediately and the client redirects to a report page that fills in.
    • Safety escalation runs before anything else: an emergency short-circuits with a 422 and the pipeline never starts.

    Architecture

    • Middleware maps Host to a vertical key; each vertical config supplies its own sources, prompts, glossary, compliance rules, and feature flags.
    • Inngest runs the async job: optional photo analysis, a parallel scrape fan-out across five to ten sources, rank and deduplicate, then LLM analysis.
    • Two-model split — Sonnet for analysis, Haiku for guide generation — with an analysis cache carrying a 7-to-30-day TTL per vertical.
    • Rate limiting at 50 reports per IP per 24 hours.

    What shipped

    • Five verticals — home repair, legal, pets, vehicles, and product ideas — resolved from one codebase by Host header routing.
    • Async report pipeline with photo analysis and multi-source evidence ranking.
    • Per-vertical compliance and escalation rules.

    By the numbers

    Verticals from one deployment
    5
    Sources per report
    5–10

    Stack

    Next.js 16Drizzle ORMInngestClaudePostgresNetlify

    Building something like this?

    Tell us what you're working on and we'll tell you honestly whether we're the right team for it.

    Start a conversation