
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
SaaS Billing
The platform includes full Stripe integration with tiered subscriptions and usag...
Rate Limiting
Rate limiting uses a dual-layer approach with Upstash Redis as primary and Postg...
Serverless Uploads
Files upload directly to Cloudflare R2 via presigned URLs, eliminating server-si...
SaaS Billing
The platform includes full Stripe integration with tiered subscription...
Rate Limiting
Rate limiting uses a dual-layer approach with Upstash Redis as primary...
Serverless Uploads
Files upload directly to Cloudflare R2 via presigned URLs, eliminating...
Architecture
Key Highlights
SaaS Billing
The platform includes full Stripe integration with tiered subscriptions and usage-based billing.
Rate Limiting
Rate limiting uses a dual-layer approach with Upstash Redis as primary and Postgres as fallback, enforcing 3 free conversions per day.
Serverless Uploads
Files upload directly to Cloudflare R2 via presigned URLs, eliminating server-side file handling.
SSIM Compression
A binary-search algorithm iterates compression levels to hit the target SSIM score with minimal file size.
Production CI/CD
The app is deployed on Vercel with automated builds, type checking, and monitoring.

