# How to Vibe Code Your Own Photoleap (and Stop Paying for It)

> Creative & powerful photo editing app by Lightricks

- Site: https://photoleapapp.com
- Category: Photo & Video
- Verdict: **Serious undertaking** (42/100 vibecodeable)
- Estimated effort: 3-5 months of part-time work

## Verdict

Build a personal web-based subset using serverless APIs, or keep paying for the real app; the native mobile performance and custom vision pipelines are a serious undertaking.

Attempting to clone Photoleap in its entirety on mobile requires mastering native Metal graphics pipelines, local touch-masking canvas performance, and high-frequency cloud GPU orchestration. A solo developer can build a very respectable desktop/web wrapper using React, Next.js, and fal.ai for the generative features, but matching the buttery-smooth local layer manipulation and on-device rendering of a 500-person company's flagship app is unrealistic.

### What you can't replicate

- Proprietary fine-tuned mobile vision models and custom ML weights
- Organic brand loyalty and 65M+ app store install base
- Deep native OS graphics framework optimizations for zero-latency stylus and touch response

## What it does

A feature-rich consumer photo editor combining traditional layer-based manipulation with generative AI capabilities like text-to-image, AI headshots, object removal, and background swapping.

### Core features

- Layer-based photo editor with blending modes, masks, and brush drawing
- AI text-to-image art generation with aspect ratio and style pickers
- AI Headshot generator creating professional portraits from selfies
- AI object replacement ('AI Replace') via local mask selection
- AI image extender ('AI Uncrop') for background expansion
- AI tattoo generator and virtual skin placement simulator
- Object and background removal pipelines
- App Store In-App Purchases and subscription management

## The business

### Pricing

- Monthly Pro: $3.99/mo — Full access to AI tools, advanced editing, and unlimited exports with a 7-day free trial.
- Annual Pro: $47.99/yr — Billed annually with a 20% discount.
- Lifetime Purchase: $79.99 — One-time purchase for permanent app access.

### Funding

$310M raised.
- Venture Round (August 2015) - $10M
- Series B (November 2018) - $60M
- Series C (July 2019) - $135M ($1B valuation)
- Series D (September 2021) - $100M
Investors: Goldman Sachs Growth Equity, Insight Partners, Coatue, Viola Ventures, Left Lane Capital, Hanaco Venture Capital

Founded 2013.
Team size: 500-600.

## The hard parts

- High-performance native mobile raster graphics and real-time masking with zero stylus/touch latency
- Managing unstable third-party generative AI model inference costs and latency under a $3.99/mo budget
- Complex computer vision pipelines for precise face-embedding alignment and subject segmentation
- App Store review compliance and strict content moderation filters for user-uploaded images

## How to vibe code Photoleap

### Prerequisites

- Node.js LTS (free): Required for running the local development environment and package manager.
- GitHub (free): Version control and seamless connection for Vercel/Cloudflare deployments.
- fal.ai Account (pay-as-you-go): Provides fast serverless API access to Flux and image-to-image diffusion models for AI Replace and Text-to-Image.

### Recommended AI tools

- Claude Code: The premier agentic coding tool for scaffolding full-stack features, setting up API routes, and debugging complex canvas state logic.
- Cursor: Essential for precision UI work on the photo editing canvas component and managing React state.

### Stack

- Frontend: Next.js
- Backend: Next.js API Routes
- Database: Turso
- Auth: better-auth
- Payments: Stripe
- Other: fal.ai API, UploadThing, Tailwind CSS, Vercel AI SDK

### Hosting

- Vercel (Hosting the Next.js web application frontend and serverless API endpoints.): $0-20/mo
- Cloudflare R2 (Storing user-uploaded source photos and generated output images with zero egress fees.): $0/mo

### Build guide

1. **Project Scaffolding and Database Setup** — Initialize the Next.js application with Tailwind CSS, configure Turso for SQLite database access via libSQL, and set up better-auth for secure user authentication.

```
Create a new Next.js project configured with TypeScript and Tailwind CSS. Install `@libsql/client` for Turso database integration and `better-auth` for user authentication. Set up the schema for users, projects, and generated images in a `db/schema.ts` file, and implement the database connection utility. Create a basic landing page and dashboard shell.
```

2. **Photo Upload and Storage Pipeline** — Implement file upload functionality using UploadThing or Cloudflare R2 bindings to securely ingest source photos into the web app.

```
Build a drag-and-drop photo upload component in Next.js using UploadThing. Store uploaded image URLs in the Turso database linked to the authenticated user's account. Create a gallery view on the dashboard showing all imported images with thumbnail previews and file metadata.
```

3. **Canvas Editing and Layer Core** — Build an HTML5 Canvas workspace supporting image rendering, basic crop, brightness adjustments, and layer blending foundations.

```
Create an interactive photo editor workspace using an HTML5 Canvas component in React. Implement state management for image filters (brightness, contrast, blur), cropping bounding boxes, and basic layer stacking. Ensure users can adjust parameters with sliders and see live preview renders on the canvas.
```

4. **AI Text-to-Image Generation Integration** — Integrate the fal.ai API to allow users to generate art and custom assets from text prompts and aspect ratio selectors.

```
Implement a 'Text to Image' feature module in the app. Create a server-side API route that calls the fal.ai Flux API endpoint with user prompts, negative prompts, and aspect ratio parameters. Handle loading states, polling for generation completion, and saving the resulting generated image into the user's asset library and Turso database.
```

5. **AI Replace and Masking Pipeline** — Add an interactive brush tool for masking specific regions of a photo and submitting masked inpainting jobs to the fal.ai API.

```
Build an interactive brush masking overlay on top of the HTML5 Canvas workspace. Allow users to paint over unwanted objects or areas they wish to transform. When the user enters a replacement prompt and clicks 'AI Replace', export both the original image and the binary mask data as base64 or R2 URLs, submit them to an inpainting endpoint via fal.ai, and render the resulting modified image back onto the canvas.
```

6. **Export, Sharing, and Polish** — Implement image download capabilities, history undo/redo stacks, and final UI polish across the editor workspace.

```
Add export functionality allowing users to download edited canvas images in PNG or JPEG format at custom resolutions. Implement an undo/redo history stack for canvas edit actions. Add clean notification toasts, loading spinners for AI requests, and responsive mobile-friendly layout adjustments.
```

### Cost vs paying

**Starting costs (one-time):**

- Custom domain (optional): $12/yr
- Initial fal.ai API inference credits: $10
- Total: ~$22 one-time

**Ongoing costs (monthly):**

- Vercel Hosting: $0/mo (Hobby tier)
- fal.ai API usage (personal scale): ~$5/mo
- Total: ~$5/mo

- Paying for the SaaS instead: $3.99/mo
- Build time: 40-60 hours
- AI tool credits: $20 (Claude Pro)
- Break-even: Paying for Photoleap is economically rational unless building it for learning.

## Sources

- [Wikipedia - Lightricks](https://en.wikipedia.org/wiki/Lightricks)
- [Lightricks Press Kit & Official Overview](https://www.lightricks.com)
- [Startup Intros - Lightricks Funding & History](https://startupintros.com)
- [Sensor Tower - Photoleap App Store Metrics & Pricing Data](https://sensortower.com)