Healthcare (Hair Transplant Clinics) / BeautyTech AI-Powered Mobile App

Natural Hairline Simulations From Real Photos for Hair Transplant Consultations

An AI-powered iOS app that generates natural-looking,

"Shipped a clinic-ready hairline simulation app with reliable"
GenAIImage-InpaintingReplicateFirebaseiOSSubscriptionsTestFlightAppStore
Frontend
iOS (Swift/SwiftUI)Apple TestFlight
Backend
FirebaseCloud Functions
AI Models
Replicate-hosted image inpainting model (hairline enhancement)
Infrastructure
Apple App Store (IAP subscriptions)Replicate API
Lowest
Cost per AI generation
Per-image inference cost using Replicate-hosted model
2 min
High-reliability generation time
Switched to a more stable model variant that "never fails" for
15%
Reduced platform fee target
Prepared Apple Small Business Program eligibility to lower fees vs.

Problem Statement

The client needed an AI tool that could enhance existing hair

Our Approach

We engineered an iOS workflow for patient photo capture/upload,

Photo-Real Hairline Enhancement via Targeted Inpainting

Technical Details
Implemented an AI generation pipeline using a
Business Value
Clinics can demonstrate realistic, professional "after

Challenges We Solved

Unpredictable Generation Wait Times from Server Cold Starts

Users experienced 2–10 minute waits and a progress bar that repeatedly

Redesigned the loading UI into explicit multi-step stages (iterated

Replicate APIiOS (Swift/SwiftUI)UX progress state machine

Pixelated Saves vs. Clean Screenshots (Output Quality Mismatch)

Generated images appeared acceptable on-screen and via screenshots, but

Adjusted the image export pipeline to persist the original generation

iOS Photo Library APIsImage processing/export pipeline

Generation Looping, Duplicate Saves, and Temporary Provider Ban

A flow using in-app camera capture caused very long generations, then

Mitigated client-side looping/duplicate-save behavior by stabilizing

Firebase Cloud FunctionsiOS state managementReplicate API

White-Background Failure Cases in Inpainting

The model produced poor or failing results when subject photos had

Reproduced the issue from shared sample images, added operator

Replicate model iterationImage pre-processing (cropping guidance)QA via TestFlight

Securing AI Credentials and Enforcing Subscriptions

Direct mobile-to-AI-provider calls risked API key exposure and made it

Moved sensitive requests behind Firebase Cloud Functions, enabling

FirebaseCloud FunctionsApp Store Connect In-App Purchases

Project Timeline

1

Discovery

Defined core use case: realistic hairline modification on real photos

2

Build

Iterated through TestFlight releases, added external testers, improved

3

Launch

Completed App Store readiness (subscriptions, compliance prerequisites

Ready to Build Something Similar?

Let's discuss how we can help transform your business with AI.

Start Your Project