DEV Community

Daniel
Daniel

Posted on

Building a Tinder-Style Photo Cleaner: Architecture Lessons from Swipe Cleaner

The Problem

I had 4,000+ photos on my phone. Half were 4K duplicates, a quarter were screenshots. Manual cleanup was impossible.

The Solution: Tinder-Style Swiping

Swipe Cleaner uses a card-based interface:

  • Swipe left → delete (recoverable)
  • Swipe right → keep

The insight: swiping is 3x faster than checkbox tapping.

Architecture

Local-First

All processing happens on-device via File System Access API. No photos leave your device.

Duplicate Detection

Uses perceptual hashing (pHash) to detect near-identical images. Hamming distance < 10 = duplicate.

Tech Stack

  • React + Vite
  • File System Access API
  • Canvas API + Web Workers
  • Custom pHash in WASM (Rust)

Performance

  • 1,000 photos: 2.3s
  • 4,000 photos: 6.8s
  • 10,000 photos: 14.2s

Key Lessons

  1. Ship the core loop first, polish later
  2. WASM > Workers for image processing (10x speedup)
  3. Recoverable deletes eliminate user fear

Links

Try Swipe Cleaner: https://www.opennomos.com/en/project/01KW95TC7VFJXZNYHNV3SJ04CN

Built something similar? Would love to hear about your solutions in the comments!

Top comments (0)