MyPhotoAI is a proof-first AI headshot and portrait generation engine. I took over the codebase in 2026 and rebuilt it as a production system where clean images and watermarked previews are strictly isolated at the storage level, then grew it a programmatic SEO funnel that now serves 1,898 static pages.
What I built:
- 4 lane-routed AI providers: Gemini variants, InstantID on Kaggle T4 GPUs, and Flux LoRA on Replicate and RunPod, with zero-dollar failover routing
- Server-enforced 402 download gate: clean image URLs are never exposed to client-side DevTools
- 3-tier prompt safety recovery ladder with MediaPipe BlazeFace quality scoring
- Adaptive Redis spend gate that tracks 7-day median usage and blocks compute spend spikes
- 1,898-page programmatic SEO engine built from a 2,158-keyword manifest, served on Cloudflare Pages at near-zero hosting cost, with IndexNow liveness queues and an LLM helpfulness gate on every page
- Checkout in 10 local currencies for high-fraud-region conversion
Stack: React, TypeScript, Express, PostgreSQL, Redis, Gemini, Stripe, Cloudflare Pages, Docker.
Case study: https://kiragu.alkenacode.dev
Built with