Photosynth-AI

A full stack SaaS for AI image transformations: restore old photos, generative fill, remove objects or backgrounds and recolor, paid for with credits.

Role
Solo: design, frontend and backend
Built
February 2024, upgraded to Next.js 16 in 2026
Hosting
Vercel

What it does

Sign in, upload an image, pick a transformation and get the result back from Cloudinary's AI. Each transformation costs one credit. The free plan comes with 20, and paid plans add more through Stripe.

How it works

  • Next.js App Router with server actions for images and transactions. Each action checks the Clerk session first.
  • Credits are deducted atomically: the update only matches when the balance covers the cost, so two requests at once can't overspend.
  • The image's owner is always set on the server, and zod strips any extra fields a client tries to slip in.
  • Payments go through Stripe Checkout, and a webhook verified with Stripe's signature check adds the credits. Clerk user events arrive through a webhook verified with svix.
  • Next.js 16's proxy runs Clerk's middleware, with only the landing page, sign-in pages and webhooks left public.

Testing

Vitest covers checkout, image ownership, the Stripe webhook and transformation types, and GitHub Actions runs lint, type-checking, the tests and a production build.

Stack

Next.js 16 · React 19 · TypeScript · Tailwind CSS · Clerk · MongoDB + Mongoose · Stripe · Cloudinary · zod · Vitest