Why local processing and WebRTC protect your privacy
A look at SnapDF's architecture and why we deliberately chose against cloud storage.
The problem with traditional online scanners
With many online tools for scanning, cropping or converting documents to PDF, something risky happens behind the scenes: you take a photo on your phone and it is uploaded to an external cloud server.
Even when those servers are well secured, your privacy-sensitive documents (passport, payslips, tax letters, signed contracts) end up, at least temporarily, on systems run by third parties. At Jammo Digital, the developers of SnapDF, we thought this should be different.
Peer-to-peer (WebRTC): encrypted, nothing stored
SnapDF uses WebRTC (Web Real-Time Communication), an open web standard that lets browsers talk directly to each other without data having to pass through a central server.
- How it works: when you scan the QR code, a secure, direct connection (a DataChannel) is set up between your smartphone and your computer.
- Direct transfer: when you press the shutter button, the photo as a rule travels straight from your phone camera into your computer's memory. No server stores it.
- Encrypted: WebRTC encrypts the connection by default (DTLS). Only your phone and your computer, the two endpoints, can read the photo.
- Pairing: to put the two devices in touch we use PeerJS (signalling) and a Google STUN server, which helps work out how the devices can reach each other. That traffic carries connection details such as IP addresses, never your photos.
- Relay fallback: if a direct connection isn't possible, for example because of a strict firewall, the traffic may pass through a TURN relay. Because the connection is end-to-end encrypted, even that relay can't read the photo.
Local Canvas processing and jsPDF
It isn't just the transfer that is local; editing and generating the file also happen entirely on your own device:
- HTML5 Canvas: straightening the corners and applying filters (such as black-and-white or Doc-Boost) is done by your own computer's processor through your browser's Canvas API.
- jsPDF: the PDF is assembled locally. When you click ‘Download PDF’, the file is generated right in your browser.
- Zero footprint: close the tab and all temporary data disappears from working memory.
The vision of Jammo Digital
One core value drove SnapDF's development: convenience should never come at the expense of privacy. By making smart use of modern browser technology, you don't need heavy cloud infrastructure to get professional results. Your paperwork stays yours.
Questions or contact
Do you have technical questions about our P2P architecture, or want to know more about the background of this project? Visit the developer's website:
Jammo Digitaljammo.nl