I built permanent QR codes for GitHub repositories because hardware outlives URLs
I recently built a small project called qr2g.it.
It is a tool for creating short links and QR codes for public GitHub repositories.
The live version is here:
The source code is here:
https://github.com/smegg99/qr2g.it
At first, this sounds like a very simple idea. You paste a GitHub repository URL, generate a QR code, and place it wherever you need it.
But the project came from a real problem I ran into while working on hardware.
The problem
I wanted to put a QR code directly on a PCB.
The idea was simple: someone looks at the board, scans the QR code, and opens the GitHub repository for the project.
That is useful for documentation, maintenance, manufacturing, debugging, and long-term project identification.
The problem is that a normal GitHub repository URL is not something I want to permanently print onto hardware.
A repository can be renamed.
It can be moved to another account.
It can be transferred to an organization.
GitHub redirects usually help, but once a QR code is printed onto a PCB, enclosure, label, or piece of equipment, it cannot be changed.
A README can be edited.
A website can be updated.
A PCB silkscreen cannot.
That was the reason I built qr2g.it.
What qr2g.it does
qr2g.it creates a short link for a public GitHub repository and generates a QR code for it.
Instead of treating the current owner/repository URL as the only source of truth, it stores a stable GitHub repository identity and uses that to resolve the repository later.
So the link is meant to keep pointing to the right project even if the repository is renamed or moved.
The goal is not to build a general-purpose URL shortener.
The goal is narrower:
Make GitHub QR codes more durable for physical things.
Why this matters
For normal web links, a broken redirect is annoying.
For physical projects, it is worse.
If a link is printed on something that may exist for years, the link becomes part of the object. That could be:
- a PCB,
- an enclosure,
- a product label,
- lab equipment,
- a 3D printed part,
- a hardware prototype,
- internal documentation,
- open-source project material.
In those cases, the QR code should not depend only on the current repository path.
That was the main design idea behind qr2g.it.
The workflow
The workflow is intentionally simple.
You paste a public GitHub repository URL into qr2g.it.
The app creates a short link.
It also generates a QR code that can be downloaded and used in a project.
That QR code can then be placed into a PCB design, printed on a label, added to documentation, or attached to a physical device.
Later, when someone scans the QR code, qr2g.it resolves the repository and redirects them to its current GitHub location.
Why I kept it small
This project is not trying to be a huge platform.
It solves one specific problem I had.
I like projects like that. They start from a real annoyance, solve it directly, and then become useful in other places too.
qr2g.it is one of those tools.
It is small, practical, and built around a very specific use case.
Tech stack
The project is open source, so the full implementation is available on GitHub:
https://github.com/smegg99/qr2g.it
The stack currently includes:
- Go for the backend,
- Nuxt for the frontend,
- PostgreSQL for storage,
- Docker for deployment.
The important part, though, is not the stack. The important part is the idea: a QR code on a physical object should not become useless just because a GitHub repository moved.
Possible use cases
I think qr2g.it could be useful for people working on:
- open hardware,
- electronics projects,
- school or lab equipment,
- internal tools,
- long-term documentation,
- PCB manufacturing,
- public GitHub projects,
- prototypes that need easy identification.
It is especially useful when the QR code is going somewhere that is harder to update than a web page.
Try it
You can try the live version here:
The source code is available here:
https://github.com/smegg99/qr2g.it
Feedback is welcome, especially from people who work with hardware, PCBs, documentation, or open-source projects.
I built this because I needed it for one of my own projects, but I think the problem is common enough that other people may find it useful too.
Top comments (0)