September 1, 2026 · By Dhurka Manchukan, Software Engineer · Engineering · 4 min read
How I built a production QR platform
QRinst started as a weekend script to generate a single QR code for an event flyer. The workspace it grew into needed three things a one-off script doesn't: codes that stay editable after printing, scan analytics, and a UI simple enough that a non-technical user could manage a batch of codes without a manual. This post walks through the decisions that shaped it.
The core decision: every code is a redirect
The most important design choice was to make every code a redirect instead of a static payload. A printed QR code points at a short QRinst URL (qrinst.mdxtora.com/r/…), and that URL's destination can change without reprinting anything. That single choice is what makes editing and analytics possible. A static code has nowhere to hook into: once it is printed, the destination is baked into the pattern of squares.
The trade-off is that the redirect service becomes part of the critical path. If it is slow or down, every printed code is affected. So the redirect endpoint is deliberately tiny: look up the short code, record the scan, respond with a redirect. Nothing else happens on that path.
Keeping the redirect path fast
People scan codes on phones, often on mobile data, often in a hurry. A redirect that takes two seconds feels broken. The design goals for that endpoint were simple: no heavy work before responding, no blocking calls to slow services, and analytics recorded in a way that cannot delay the visitor.
- Resolve the short code with a single indexed lookup.
- Respond with the redirect first; record the scan after the response, and skip known bots.
- Send the redirect with no-store caching, so an edited destination applies on the very next scan.
- Fail safe: if analytics recording fails, the visitor is still redirected.
Scan analytics without overcollecting
Analytics turn a QR code from a picture into something you can learn from: how many scans and when. The temptation is to collect everything. QRinst deliberately records only a timestamp for each scan, keeps the detailed history for 60 days, and avoids collecting personal details about the person scanning.
Pruning old events also keeps things quick. Detailed scan events are kept for 60 days while total counts live as long as the code, so the dashboard never has to scan an unbounded table just to draw a chart.
A workspace that stays simple
Once codes are redirects, managing them becomes the interesting product problem. People create dozens of codes for menus, posters, packaging and events, and need to find them again later. The dashboard is built around a few ideas: clear names, and one place to see every code with its destination and scan count.
Editing a destination is a single action, and it is safe: the printed code never changes, only where it points. That is the feature people notice most, because it turns a typo on a printed poster from a disaster into a two-minute fix.
Lessons learned
- Pick the one architectural decision that unlocks your main features, and protect it.
- Keep the critical path tiny and let everything else happen around it.
- Collect less data than you can, and be clear about what you keep.
- Design the management UI for the person with fifty codes, not the person with one.
What I would do differently
If I started again, I would write the scan-recording path and its failure handling first, before any dashboard work. It is tempting to build the visible parts of a product early because they are satisfying to demo, but the redirect layer is where trust is earned. A dashboard with a rough edge is an annoyance; a printed code that fails to resolve is a real problem for someone who has already paid for the print run.
I would also write down the data retention rules earlier. Deciding how long raw scan events are kept, and when they are rolled up into daily counts, is much easier before there is a pile of historical data that someone might care about.
Everything else in QRinst, including the dashboard and scan tracking, is built on top of that redirect layer. If you are building something similar, start there and resist adding features until that path is fast and dependable.
Written by
Dhurka Manchukan
Software Engineer · Sri Lanka
Dhurka Manchukan is a software engineer based in Sri Lanka and the person behind MDXTORA. Dhurka designs, builds and runs QRinst, Faviqo and Wayvert, and writes the articles in the Journal from what comes up while building them.
About the author →Keep reading
- EngineeringBuilding scalable React applicationsPractical patterns for keeping a growing React and TypeScript codebase maintainable.
- ProductBuilding a travel toolkit that works without an accountNotes on building Wayvert, a free travel toolkit for currency, units, time zones and trip budgets, and the decisions behind keeping it fast, honest and light on data.
- GuidesHow to estimate a trip budget before you bookA practical way to estimate what a trip will cost: the four daily categories, how to handle flights and currency, and how much buffer to add.
