Back to Projects

Nail Swap AI

An AI-powered SaaS that generates custom nail art designs from hand photos, letting users visualize their manicure before committing to it.

The Problem

Getting nail art done is a commitment-you're stuck with the design for weeks, and most people have no way to preview what a specific style will actually look like on their hands. Reference photos from Instagram or Pinterest show someone else's hands, and nail technicians can only describe what they have in mind. Users needed a way to see the exact design on their own hands before sitting in the salon chair.

The Solution

Nail Swap AI lets users upload a photo of their hand along with an optional reference image, select their preferred nail shape, length, and color, then receive an AI-generated preview showing that exact design applied to their actual nails. The generation uses OpenAI's image models to analyze the hand photo and render realistic nail art while preserving the user's skin tone, hand shape, and finger proportions. A credit-based system keeps the economics simple-users buy credits upfront and spend one per design, with the option to regenerate if the first result isn't quite right. To drive growth without ad spend, there's a full affiliate program where nail influencers and content creators earn 20% commission on any purchase from their referrals.

How It Works

  1. 1 Upload & Configure: User uploads a hand photo (validated for type and size), optionally adds a reference design image, and selects shape/length/color preferences. A new Design record is created and one credit is deducted immediately.
  2. 2 Background Generation: A background worker calls OpenAI's gpt-image-1 model. The prompt is built dynamically based on user selections and includes instructions to preserve the hand while rendering new nail art.
  3. 3 Status Polling: The frontend polls a status endpoint every few seconds. When the generation completes, the backend downloads the result image, saves it locally, and updates the Design record to "completed."
  4. 4 Delivery: The user sees their AI-generated design and can regenerate once if needed. All generated images are stored and accessible from their dashboard.

Tech Stack

  • Backend: Python, Flask, Gunicorn, SQLAlchemy
  • Frontend: Jinja2 templates, Tailwind CSS, vanilla JavaScript
  • Database: SQLite (development), MySQL (production)
  • AI: OpenAI API (gpt-image-1 for generation, GPT-4 Vision for analysis)
  • Payments: Stripe Checkout with webhook validation
  • Auth: Flask-Login, Google OAuth (one-tap sign-in)
  • Notifications: Discord webhooks for errors and transactions
  • Infrastructure: Docker, Nginx, Hetzner VPS, Let's Encrypt SSL

Results

  • Live in production with paying users purchasing credit packages at $9.99 for 10 designs
  • 395+ affiliates tracked in the referral system
  • Built-in templating system for SEO landing pages and blog content
  • Sub-30 second design generation with real-time status updates
  • Automated deployment with health checks and Discord crash notifications