all notes

engineering8 min readby Andrew Stockus

How We Built a QR Code Parking System That Eliminated Manual Validation

A deep dive into building a real-time QR code parking management system that replaces manual pass validation with signed, single-use digital passes and a live capacity dashboard.

  • qr codes
  • python
  • real-time
  • property management

Event venues, markets, and multi-tenant properties with busy parking lots tend to run entry the same way: staff at the gate checking paper passes, waving cars through, and tracking capacity on a clipboard. The result is long entrance queues at peak hours, constant disputes about whether the lot is really full, and zero data about how the parking lot is actually being used. We built a QR code parking system that replaces that process end to end.

The Problem: Paper Passes Don't Scale

A paper pass system has fundamental flaws. Passes are easy to forge — a color photocopy is all it takes. Staff can't tell if a pass has already been used. And when the lot hits capacity, there is no reliable way to know, because no one is counting exits. Visitors drive in, circle a full lot, and leave frustrated. Operators know they are losing weekend visitors to parking friction alone, but have no way to measure how many.

Our Approach: QR-First Architecture

We designed the system around three core components: a QR code generation engine, a scanning and validation layer, and a real-time capacity dashboard. Each component needed to work independently while feeding data into a shared state that would give management complete visibility into lot operations.

The QR generation engine runs on a Python backend using the qrcode library with cryptographic signing. Each QR code encodes a JSON payload containing the vendor ID, customer identifier, timestamp, and a valid-until window, all signed with HMAC-SHA256. This means every QR code is unique, time-limited, and tamper-proof. Vendors generate passes through a simple web interface — they enter the number of passes they need, and the system spits out a PDF sheet of QR codes they can hand or text to their customers.

Scanning and Validation in Under 200ms

At the entrance gate, staff use tablets running our custom scanning app. When a staff member scans a QR code, the app sends the payload to our validation API, which performs five checks in sequence: signature verification (is this a genuine pass?), expiration check (is it still valid?), single-use verification (has it been scanned before?), vendor status check (is the issuing vendor active today?), and capacity check (is there room in the lot?). The entire validation chain completes in under 200 milliseconds, and the tablet displays a clear green checkmark or red X with the reason for rejection.

We built the API with FastAPI for its async performance characteristics. The single-use tracking uses a Redis set for O(1) lookup times — when a pass is scanned, its hash gets added to the day's set, and any subsequent scan of the same pass hits that set and returns a "previously used" rejection. Redis was the right choice here because the data is ephemeral (we only need the day's scans) and the lookup speed is critical for keeping the entrance queue moving.

The Real-Time Dashboard

The management dashboard was where the project really came together. Built with React and connected via WebSocket, it shows a live view of lot occupancy as a percentage gauge, entry and exit rates graphed over time, per-vendor pass usage (so management knows which vendors are driving the most traffic), and peak hour patterns across the day. We added exit tracking using a simple license plate scan at the exit gate — not for identification, just for counting — which feeds the same WebSocket channel.

Management can view the dashboard from their office, their phone, or a wall-mounted TV in the operations room. When the lot hits 90% capacity, the system automatically triggers a yellow warning on the entrance tablets. At 100%, it switches to red with a "LOT FULL" message and optionally sends an SMS to the management team.

What Changes at the Gate

Entrance processing drops to the time it takes to scan a code and read a green checkmark. Parking disputes stop, because the tablet shows the reason for every rejection. The forged pass problem disappears entirely, since QR codes can't be meaningfully photocopied (the cryptographic signature ensures uniqueness). Most importantly, management finally has data: which hours are the bottleneck, how fast the lot turns over, and whether an overflow lot or a shuttle would pay for itself.

The per-vendor traffic data is a powerful management tool in its own right. Vendors who consistently drive high traffic can be offered premium placement. Vendors with low pass usage can be coached. The parking system doubles, somewhat unexpectedly, as a vendor performance analytics tool.

Technical Takeaways

A few lessons from this build that apply broadly. First, cryptographic signing at the generation layer eliminates an entire class of fraud problems — don't just generate codes, sign them. Second, Redis is the right tool for high-speed ephemeral lookups; don't reach for a full database when you need sub-millisecond set membership checks. Third, the real value of a system like this often isn't the primary feature (parking validation) but the data layer it creates. The analytics dashboard was a Phase 2 idea that became the most valuable part of the project. Build your data model with future analytics in mind from day one.

Digitize operations like this.

BigDevelop scopes, builds, and runs systems like this one, from a single integration to a company-wide program.