Setting Up QR Code Generator

Introduction

Out of the blue, my colleague asked me, “Do you know how to generate a QR code?”

  • Without hesitation, I replied that we could just Google "Free QR code generator" - there are plenty of free tools available online.
  • However, she pointed out that many of those free QR codes either do not last long or have limitations on the number of scans. In fact, she once got caught off guard by this at an event.
  • That immediately piqued my interest. A QR code, much like a barcode, should simply encode the information you provide into a visual pattern - and in theory, it should not expire.

A quick search reveals that this is a common issue.

  • Many of the so-called "free" QR code generators actually create dynamic QR codes, which do not directly encode your data.
  • Instead, they encode a URL that redirects to the provider’s server - often used to display advertisements, track scans (including device type, location, and timestamp) or restrict access behind paywalls.
  • This practice misleads casual users into believing that QR codes inherently expire or require a subscription to remain functional.

Hence, this led us to a better solution: building our own static QR code generator - a tool that embeds actual content (e.g., a URL, email, or location) directly in the code, with no tracking, no redirects, and no expiration.



Key Features of the App

When setting up the app using Firebase Studio, the essential features of the QR code reader and generator PWA include (but are not limited to)

  • QR code reader
    • Scan any standard QR code using the device's camera or an uploaded image.
    • Display the result as raw text or a clickable link if it is a URL.
    • Provide sharing options or the ability to open the result in a new tab.
  • QR code generator
    • Support static QR code generation for URLs, which covers websites, Google Forms, and popular social media platforms.
    • Export the QR code as downloadable PNG images in various sizes (256px, 512px, 1024px).
  • Offline-first functionality
    • Fully functional Progressive Web App (PWA)
    • Installable on desktop and mobile
    • Offline support via a custom service worker and manifest.json



Implementation of Core Components

The app centers around two main components:

  • QrScanner.tsx
  • QrGenerator.tsx
    • Render QR using qrcode.react.
    • Offers image download in multiple resolutions (256×256, 512×512, 1024×1024).



Summary

Compared to earlier projects, this is a much simpler app - without involving complex architectures or backend logic.

  • However, effective app development is not always about building the most advanced, visually stunning app.
  • Sometimes, it is about meeting real-world needs in a reliable and accessible way.
  • To most users, a functional and trustworthy QR tool that "just works" is more valuable than one with bells and whistles like analytics dashboards or user tracking.

So, if you need a reliable QR code for users to scan - for attendance, surveys, maps, or contact details - feel free to use this simple web app: RxQRCoder.

  • It generates static QR codes that last indefinitely, unless the linked content is removed or becomes inaccessible.
  • That said, if you require features like scan tracking, link redirection, or editability after publishing, then a paid dynamic QR code service is the more suitable choice.

Finally, even when managing a simple project like this, it is important not to overlook basic maintenance tasks - be sure to run npm audit to check for vulnerabilities and npm update to keep dependencies current.

Comments