Skip to main content
PixelWand
← All Projects
saas2025active

PixelWand

Image optimization SaaS with SSIM-based compression

Overview

PixelWand started as a tool I needed myself: a fast, no-nonsense image optimizer that could handle bulk conversions without quality loss. It uses SSIM (Structural Similarity Index) with a binary-search algorithm to find the optimal compression level, testing quality thresholds iteratively until it hits the target SSIM score with minimal file size. The pipeline processes images through WebP, AVIF, and PNG optimization with Sharp. The backend handles presigned URL uploads to Cloudflare R2, server-side processing, and automatic cleanup. Stripe handles subscriptions with usage-based billing. Free tier users get 3 conversions/day enforced by Upstash Redis rate limiting with Postgres fallback. NextAuth manages user sessions and account linking.

Built With

Next.js
TypeScript
Tailwind CSS
Prisma
Stripe
Cloudflare R2
Upstash Redis
Sharp
NextAuth

Architecture

Next.js AppFrontend
NextAuthSessions
API RoutesREST API
Stripe WebhooksEvent Handler
Sharp PipelineImage Processing
Stripe BillingPayments
Upstash RedisRate Limiting
Cloudflare R2Object Storage
PostgreSQLDatabase

Key Highlights

01

SaaS Billing

The platform includes full Stripe integration with tiered subscriptions and usage-based billing.

02

Rate Limiting

Rate limiting uses a dual-layer approach with Upstash Redis as primary and Postgres as fallback, enforcing 3 free conversions per day.

03

Serverless Uploads

Files upload directly to Cloudflare R2 via presigned URLs, eliminating server-side file handling.

04

SSIM Compression

A binary-search algorithm iterates compression levels to hit the target SSIM score with minimal file size.

05

Production CI/CD

The app is deployed on Vercel with automated builds, type checking, and monitoring.

PixelWand screenshot
PixelWand screenshot

Get in Touch

Want to work together?

Whether you have a project in mind, want to collaborate, or just want to say hi, I'd love to hear from you. Drop me a message and I'll get back to you as soon as I can.