Rails Programmatic SEO & AI Writer.
A Ruby on Rails lead-generation site for a sister software-services brand, where I rebuilt about 2,900 service-in-city pages behind automated content checks and added an AI article writer.
I rebuilt the site's city pages (18 services across 200 US cities) from a keyword plan: every page gets its own title, headings and FAQ, internal links that only point to pages that exist, and goes live only once its content check passes. I also made the headless CMS the source of truth for the blog, through a verified webhook and idempotent upserts, and added a five-stage AI article writer that runs as one background job and saves its draft back to the CMS for an editor.
- Role
- Sole active developer · Softaims
- Time
- 2026
- Stack
- Ruby on Rails · PostgreSQL · OpenAI · Minitest
- Access
- Private: company project
Constraints
About 2,900 pages had to read as genuinely local, never invent facts or offices, and switch over without breaking the pages that already ranked.
Key decision
I made going live a test, not a judgement call. A QA engine with 110 tests renders each real page and keeps it offline if its copy misses its keywords, names the city too often or too rarely, repeats a sibling page, claims an office that doesn't exist, links to a dead page, or has FAQ data that differs from the visible FAQ. The AI copy corrects itself: each retry is told exactly what the last attempt broke, and invented numbers, prices or awards are rejected.
- Plan: A keyword plan, turned from the manager's template into data: 18 services across 200 US cities, about 2,900 pages, with the real search terms for pages that already rank.
- Build: Each page gets its own title, headings and FAQ, and internal links that only point to pages that exist.
- Write: An AI model writes the page's local copy as structured JSON.
- Check: A QA engine renders the real page and checks it: keywords present, the city named 15 to 30 times, no copy repeated from sibling pages, no invented offices, no dead links, FAQ data matching the page.
- Retry: The next attempt is told exactly what failed, so it fixes that instead of rolling the dice again. Invented numbers, prices or awards are rejected too.
- Live: Only a page that passes is marked checked, and only checked pages switch to the new template, one at a time. All 2,900 passed before the switch was complete.
Plan. A keyword plan, turned from the manager's template into data: 18 services across 200 US cities, about 2,900 pages, with the real search terms for pages that already rank.
About 2,900 city pages live behind 110 automated checks · a five-stage AI writer with every call costed
Stack
Ruby on Rails · PostgreSQL · OpenAI · Minitest · Nokogiri · GoodJob · Strapi · Turbo · Stimulus · Tailwind CSS
Want to talk about this build?
I'm open to remote full-time roles and freelance work, and happy to walk through the decisions behind it.