Undercut
Track public complaints about your competitors on X and Instagram. Filter junk posts for free, draft a tailored reply for $0.10, and send it yourself in one click.
Cold outreach is mostly ignored. People publicly complaining that a competitor broke their workflow are already looking for a replacement, but finding those posts by hand eats hours every week. Undercut scrapes competitor mentions on X and Instagram, kills noise through two free filtering stages, writes product-aware replies via LLM only on verified complaints, and hands the user a one-click native reply link instead of running spam bots.
Overview
Solo founders and small SaaS teams rarely have ad budgets, yet frustrated users complain about incumbent software on X and Instagram every day. Tracking those mentions manually is repetitive, while enterprise social-listening suites charge monthly retainers and still leave you writing every reply from scratch.
Undercut started during the HackOnVibe hackathon as a direct answer to that loop, then went through a full production refactor. You enter your product profile, three core differentiators, tone of voice, and competitor targets. Undercut pulls recent posts, strips out noise automatically, and queues drafted replies that you edit and send yourself in one click.
The Cost & Spam Trap
Running one paid model over raw social feeds burns money and gets accounts banned.
Raw social search results are mostly spam, giveaways, news reposts, and unrelated slang. Sending every scraped post straight to a paid generative model destroys unit economics under a $0.10 per-draft wallet model.
Auto-posting replies through bot scripts is worse. Platforms suspend accounts quickly, and one tone-deaf automated pitch hurts a young product's reputation. The pipeline had to be free on noise, strict on draft quality, and explicitly human-in-the-loop on delivery.
Two-Gate AI & Anti-Bot Architecture
Cheap filters delete garbage early; paid models only write for real complaints.
Every scraped post moves through three ordered stages before reaching the user's reply box, keeping marginal model cost well below the $0.10 credit fee:
Gate 0 (local fuzzy pre-filter) runs immediately after scraping X (twitter-api45) or Instagram (instagram-scraper-stable-api via POST username lookup, normalizing four unstable payload shapes). Posts scoring below 0.20 on complaint keywords are dropped in memory with zero LLM cost.
Gate 1 (free AI classifier) triggers when a user requests a draft. It runs a zero-cost classification LLM across an 8-model fallback chain to return a strict binary verdict. Rejected posts are permanently deleted (DELETE) from leads_queue instead of filling Postgres with dead rows.
Gate 2 (LLM draftsman + native intent) invokes the generative LLM using the user's product profile, differentiators, and selected tone (Professional, Casual, Supportive, or Bold). Drafts enforce a 262-character ceiling on free X accounts and route directly to native X web intent URLs (or clipboard copy for Instagram) so a human always clicks Send.
From Hackathon Stack to Production Ledger
Migrating off Supabase and closing silent billing edge cases.
The initial 10-day hackathon version ran on Supabase Auth, Row Level Security, and a PostgreSQL stored procedure (consume_cycle_credit). Preparing it for real usage exposed friction across auth callbacks, database portability, and failure recovery.
In October, I migrated the persistence and auth layer across 46 files to Neon PostgreSQL, Drizzle ORM, and NextAuth Google OAuth. That refactor caught two real runtime bugs: a profile key mismatch where profiles.id shifted from UUID to Google JWT sub strings (varchar(255)), and crashes on /billing triggered by unparsed Postgres decimal(10, 4) strings.
I also hardened credit consumption inside src/lib/pipeline/helpers.ts. New accounts start with 5 weekly free demo credits and top up via Stripe Checkout with tiered bonuses (3% at $50+, 5% at $100+). If Gate 2 fails after a credit is deducted, the server automatically logs a REFUND_FAILED_GENERATION ledger entry, restores the exact demo credit or $0.10 balance, and resets the lead to PENDING with gate_1_passed = true so retries never double-charge.
Outcomes & Verification
Awarded Excellence in Software Engineering at HackOnVibe, hardened for production.
Undercut received the founders' special Award for Excellence in the Field of Software Engineering on the HackOnVibe July 2026 results page. Post-migration audits added route-level React error boundaries on /dashboard and root layouts, mobile slide-out navigation, defensive payload normalization across unstable scraper schemas, and Stripe webhook handling for checkout.session.completed.
Local fuzzy scoring and a zero-cost LLM classifier hard-delete irrelevant posts before the paid drafting model or user credits are ever touched.
Enforces a 262-character ceiling for free X accounts and opens pre-filled native reply links so founders review every pitch without risking bans.
Migrated from Supabase to Neon Postgres, Drizzle ORM, and NextAuth, adding automatic credit refunds and ledger rows whenever Gate 2 fails.
