60 Jobs
AI Concurrency
30 req/s
Throughput
7
Languages
3 Apps
Microservices
Studioshot is an AI professional headshot generator where users browse a marketplace of photographer-curated virtual studios, select styles, upload selfies for LoRA model training, and receive AI-generated headshots — each one reviewed and retouched by a human artist before delivery.
The platform serves both individual consumers and B2B teams with an organization system featuring credits, roles (owner/admin/member), and invitation workflows. It also offers a suite of free AI photo tools — background removal, photo enhancement, and canvas extension — as a marketing funnel to drive conversions.
A companion admin dashboard manages the full order lifecycle: reviewing AI-generated headshots, approving deliveries, managing style references with S3 presigned uploads, artist assignment, failed album monitoring, and AI sample generation.
The core AI pipeline is orchestrated with Inngest durable functions, configured with a concurrency limit of 60 and throttled at 30 requests per second. Each generation step is fault-tolerant with step-level retries — if a single image fails, only that step retries rather than restarting the entire pipeline.
The pipeline flow: users upload photos → a separate AWS Lambda validates image quality (face detection via RapidAPI, resolution checks, format validation) → photos are converted from HEIC and cropped → stored in both S3 and GCS → fal.ai FLUX LoRA model training kicks off via webhook → Seedream generates images in batches of 3 → results are processed (Sharp for WebP previews, format conversion per app version) → human artists review in the admin panel → approved headshots are delivered to customers.
A critical design decision was the human-in-the-loop gate: after customers submit photos, their order moves to PENDING_EDITOR_CONFIRMATION. An admin must explicitly trigger the prediction (GPU generation) — preventing wasted compute on poor-quality uploads. This single gate saved significant AI processing costs.
The webhook architecture decouples heavy work: the fal.ai webhook handler does minimal validation and emits an Inngest event. The actual image download, processing, and storage happen in a separate Inngest function — making the webhook fast and the heavy work retriable.
Storage is versioned: a getStorageClient(order.version) factory switches between S3 and GCS based on when the order was created, enabling seamless migration between cloud providers without breaking existing orders.