MySnapPass: A phone selfie into a government-compliant passport photo
30+ countries · 40+ document specs · compliance-checked photo in about 30 seconds
- Role
- Solo build
- Timeline
- Ongoing
- Year
- 2026
- Client
- Ceptix
Stack
The problem
Getting a passport or ID photo means a trip to a studio, a $20 print, and a wait — and the photo still gets rejected at the counter for a shadow, a tilted head, or a crop that misses the country's millimetre spec by a hair. Every country publishes its own geometry (face-height ratio, top margin, background colour, pixel size) and consumer photo apps mostly just crop a square and hope.
Approach
Built a production SaaS as a two-tier system: a Frappe v15 backend exposing guest-callable REST methods, and a OneJS + Tamagui web app. Uploads land as private files and fire an async AI job on Frappe's RQ long queue, so a multi-second CV pipeline never blocks a web request. The pipeline runs InsightFace buffalo_l for face detection and head pose, U²-Net (ONNX Runtime) plus YOLOv8n-seg for background removal and person masking, then crops and pads to the per-country geometry stored as Country Rule / Country Document Rule records, normalizes exposure, sharpens and despeckles. Sixteen automated compliance checks then grade the result — background colour sampled at corners and edges, face-height ratio, top margin, horizontal centring, shoulders in frame, aspect ratio, native resolution, gaze within 15° of frontal, eyeglass detection, even left/right lighting, neutral expression via DeepFace. Checks fail open when a signal is unavailable so a valid photo is never blocked. Ordering runs Draft → Pending Payment → Paid → Fulfilled, with prices recalculated server-side at checkout so the amount can't be tampered with client-side, Stripe Checkout for payment, and a signature-verified webhook that flips the order paid and dispatches digital delivery or a physical Print Job.
Result
A live service covering 30+ countries and 40+ document specs — passports, visas, biometric IDs, driver's licenses — that returns a compliance-checked file in about 30 seconds. Digital download at $13.95, printed sets of 2–12 shipped via USPS in 2–3 business days, plus optional expert verification and retouching. Backed by a money-back guarantee if an official office rejects the photo. Adding a new country is a data change (one Country Rule row), not a code change, so coverage scales without touching the pipeline.
Highlights
- AI pipeline: face detection, background removal, per-country crop
- 16 automated ICAO-style compliance checks
- Per-country geometry as data — new countries need no code
- Async RQ workers so the CV pipeline never blocks requests
- Head-pose, eyeglass and neutral-expression detection
- Even-lighting and native-resolution gating on capture
- Server-side price recalculation at checkout
- Stripe Checkout with signature-verified webhooks
- Digital delivery or USPS-shipped print fulfillment
- Transactional email across the full order lifecycle