VG/ gate-pass-lab
Portfolio ↗

runs in your browser · no server · simulated venue

Gate-Pass Stress Lab

Entry gates fail in two ways: the network drops, and people try to get in twice. This lab issues cryptographically signed QR passes, validates them offline, queues admissions in IndexedDB, and then lets you break it — cut the network, replay a pass at two gates, or flood the line with thousands of scans.

01 Issue passes

An ECDSA P-256 key signs each pass. Gates hold only the public key — a stolen scanner can verify passes but can never mint one.

No passes yet.

02 Two gates

Each gate decides locally. Online, the server confirms. Offline, the gate admits and queues — and two offline gates can both admit the same pass.

Gate A
admitted
0
queued
0
—
Gate B
admitted
0
queued
0
—

03 Server ledger & conflicts

What the server knows. When an offline gate reconnects, its queue is replayed and double entries are caught — late, but caught.

0passes admitted
0double entries caught at sync
  • Events will appear here.

04 Stress the gate

A third, offline-first gate processes scans back-to-back. Each scan = signature verification + duplicate check + durable IndexedDB write. Latencies are measured with performance.now() on your device.

Issue passes first.