fineanmol/icao-photo-studio

ICAO-compliant 630×810 passport photo converter with local processing and Stripe payments

★ 0Forks 0TypeScriptGitHub ↗Compare

Project website ↗

README

ICAO Passport Photo Studio

Single-page commercial web app that converts portraits to ICAO-compliant 630×810px passport photos (per your Guidelines for ICAO.pdf).

Features

  • Exact 630 × 810 pixel output
  • White background whitening
  • Face auto-detection with manual framing (80–85% face scale)
  • Adjustments: position, brightness, contrast, saturation, sharpen
  • Compliance checklist (automated + manual ICAO items)
  • Stripe Checkout for paid downloads (watermarked preview until paid)
  • Browser-only processing — images never leave the client
  • Formats: JPG, PNG, WebP, HEIC/HEIF, GIF, BMP, AVIF, TIFF (HEIF/TIFF converted locally)
  • Local watermark — preview overlay + test download (see below)

Quick start

npm install
npm run models   # face-api weights (also runs on postinstall)
cp .env.example .env.local
npm run dev

Open http://localhost:3000.

Test the watermark (local)

  1. Upload and process any photo.
  2. In the sidebar, open Watermark (local).
  3. Toggle Show watermark on preview to compare with/without overlay.
  4. Click Download watermarked JPEG (test) — saves the exact preview customers see before payment.

Or open: http://localhost:3000/?testWatermark=1

In local dev (npm run dev), payment is skipped automatically so every flow is testable without Razorpay. To unlock lifetime access in production (e.g. for your own use), open the browser console on your deployed site and run:

localStorage.setItem('icao_lifetime_paid', '1')

Razorpay (production)

  1. Create a Razorpay account.
  2. Add to .env.local:
RAZORPAY_KEY_ID=rzp_live_...
RAZORPAY_KEY_SECRET=...
NEXT_PUBLIC_APP_URL=https://your-domain.com
  1. Deploy (Vercel recommended). Set the same env vars in the dashboard.

Deploy

npm run build
npm start

ICAO reference

Requirements are implemented from Guidelines for ICAO.pdf in this repo (630×810, white background, face 80–85%, front view, etc.). Final acceptance remains with the passport office.

Contributors

fineanmol

Issues