Build a Robust AI Consulting Business - Technical Stack ExplainedBuild a Robust AI Consulting Business - Technical Stack Explained
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Built a full AI consulting business system — from website to outreach machine.
For a boutique AI consulting firm targeting mid-market companies in the US and Europe, I designed and shipped the full technical stack:
Production website (React + TypeScript + Express) Not just a landing page. A conversion machine: lazy-loaded routes, per-page SEO metadata, structured data for Google, a sitemap, an OG image for social sharing, and Lighthouse-ready performance fixes (including a Framer Motion LCP bug that was silently tanking search rankings).
AI Diagnostic Tool A multi-step lead qualification form that calls Claude under the hood, generates a personalized automation ROI report for each prospect, and delivers it at a unique URL — with prompt injection protection baked in (XML-delimited user inputs, system prompt hardening).
Security layer CSP headers, correct trust-proxy config for a Cloudflare + Railway dual-hop topology, hardened email notification logic, and temp file cleanup that survives errors. Production-grade, not tutorial-grade.
LinkedIn prospecting engine A Python + Playwright scraper that:
Rotates across 10 industry niches
Qualifies leads by title, location, and post recency
Auto-generates personalized connect requests (≤300 chars) and follow-ups via Anthropic API
Exports to Excel, deduplicates across runs
Currently targeting Property Management decision-makers in Florida & Texas
This is what "full-stack AI consulting infrastructure" actually looks like in practice.
What was built
A production-ready AI consulting business stack, covering six layers end to end.
On the frontend, a React SPA with TypeScript, lazy-loaded routes, per-page SEO metadata via react-helmet-async, and full internationalization in English, Spanish, and Danish.
The SEO layer included a sitemap, robots.txt, JSON-LD structured data schemas for Google, a custom OG image at 1200×630px for social sharing, and a performance fix for a Framer Motion bug that was silently blocking the page's Largest Contentful Paint — meaning Google couldn't properly index the main headline.
The backend is an Express + TypeScript API deployed on Railway, hardened with Content Security Policy headers, correct trust proxy configuration for a Cloudflare + Railway dual-hop topology, and proper temp file cleanup that survives errors.
The AI feature is a multi-step diagnostic form that sends the prospect's business data to Claude, generates a personalized automation ROI report, and delivers it at a unique shareable URL — with prompt injection protection built in so user-submitted text can never hijack the LLM's instructions.
On the security side, all user-controlled fields are wrapped in XML delimiters in the prompt, environment variable handling was hardened to eliminate silent fallbacks, and no sensitive data leaks through error paths.
Finally, the outreach system is a Python + Playwright scraper that rotates across industry niches, qualifies leads by title, location, and post recency, then uses the Anthropic API to generate personalized LinkedIn connect requests and follow-up messages for each lead — exporting everything to Excel with deduplication across runs.
Key technical problems solved
LCP blocked by Framer Motion: opacity:0 on H1 prevented Google from indexing the headline. Fixed by rendering plain HTML on first paint.
Prompt injection risk: All user-submitted fields wrapped in XML delimiters + system prompt instruction to treat them as data, not commands.
Dual-hop proxy misconfiguration: trust proxy: 1 was wrong for a Cloudflare → Railway topology. Corrected to 2 to get real client IPs in logs and rate limiting.
Location-aware lead qualification: Scraper's filter system refactored to support per-niche target_locations, enabling pivot from Danish to US markets without touching core logic.
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started