This repository contains the source code for this website. It takes a "Mobility Pass" (Pase de Movilidad) issued by the Chilean government and generates an Apple Wallet pass from it.
The pass itself is completely built inside the browser. No user information is ever sent or stored on a server. How? Sweet open source projects:
- Text is extracted using PDFJS.
- QR codes are detected with jsQR.
- Parsed into pass data with some terrible JS.
- Signature is returned from a serverless function by sending over hashes of pass data (more on that below).
- Packaging with JSZip.
See the /api/signature
folder for reference on how the serverless function provides a signature when receiving hashes. It's Node and Forge. This is deployed on Vercel.
Some manifest signing code was borrowed from pass-js.