DEV Community

Cover image for I Built a Free QR Code Generator with Scan Analytics
Alex Kay
Alex Kay

Posted on

I Built a Free QR Code Generator with Scan Analytics

Most QR generators are either free but static (no tracking, can't edit), or dynamic with analytics but $15-35/month. I wanted both for free. So I built qree.app.

What It Does

  • 7 QR types: URL, vCard, WiFi, Email, Phone, SMS, Text
  • Custom colors, dot styles, logo in center
  • PNG + SVG download, no watermarks
  • Dynamic QR codes — change URL without reprinting
  • Scan analytics: country, city, device, browser, time

Stack

Rails 8 + Vue 3 + Vite + Tailwind v4 + PostgreSQL. QR generation client-side with qr-code-styling. GeoIP with MaxMind. Background jobs with Solid Queue.

Rails monolith, not a separate API + SPA. Marketing pages are server-rendered ERB (SEO-friendly), Vue mounts only on interactive parts (generator, dashboard, analytics).

How Scan Tracking Works

This is the interesting part. The QR doesn't encode your actual URL. It encodes a short redirect: qree.app/abc1234.

When someone scans:

  1. Phone opens qree.app/abc1234
  2. Server logs IP → GeoIP (country, city) + User-Agent → device detection
  3. 302 redirect to actual destination
  4. Total: ~50ms, user doesn't notice
def show
  qr = QrCode.find_by!(short_code: params[:code])
  LogScanJob.perform_later(qr.id, request.remote_ip, request.user_agent)
  redirect_to qr.original_url, status: 302, allow_other_host: true
end
Enter fullscreen mode Exit fullscreen mode

Logging happens async so the redirect stays fast.

Early Results

8 days after launch, Google Search Console shows 147 impressions, 55 queries, 27 countries. Only 5 out of 78 blog posts indexed so far. No clicks yet (positions 20-90), but trending up.

Try It

qree.app — no sign-up needed for static codes. Free account for dynamic + analytics.

What would you add?

Top comments (0)