Sourcing Guides

We're a Garment Factory. We Vibe-Coded Our Own Tag-Tracing System.

A client found counterfeits of their garments. Off-the-shelf platforms charged by code or scan and kept the data on their systems. So our factory built its own solution and open-sourced it.

Back to Resources
Sourcing GuidesJuly 16, 2026
We're a Garment Factory. We Vibe-Coded Our Own Tag-Tracing System.

A client found counterfeits of their garments. Off-the-shelf platforms charged by code or scan and kept the data on their systems. So our factory built its own solution and open-sourced it.

This spring, one of our clients found copies of their garments for sale. Not lookalikes. Copies, with their branding on them.

They asked what we could do from the factory side. That week, the honest answer was nothing.

I'm a merchandiser at Jiashun, a cut-and-sew factory in Dongguan. I quote orders and chase production. Anti-counterfeiting was nobody's department here, until suddenly it was.

Renting

Small factories don't build software. We rent it, the way we rent almost everything that isn't sewing.

Renting shapes you. You bend your process around the tool's assumptions, and eventually the bending feels normal. A tool almost fits, the workaround becomes routine, and nobody writes down what got lost.

When the counterfeit question landed, we did the normal thing and went shopping. The platforms looked polished in demos: a QR code on the hang tag, a branded scan page and a dashboard.

Three things stopped us. Pricing ran per code or per scan, so the cost rose with our client's success. The verification logic was closed, which felt strange for a product whose only job was to be believed.

And the scan history lived with the vendor, not the brand: when and where garments were checked, which product lines drew attention and which ones attracted copies.

We nearly signed anyway. That is what almost-fitting tools are for.

Building

Here the story takes a turn that would not have been possible two years ago.

We don't have a software team. We have a colleague in sales who got curious about the new AI coding agents.

He began experimenting with ways to apply them to business problems he understood firsthand.

In March, the counterfeit question became one of those experiments. A working version came together in one evening in early April. Refinements followed the next morning.

By mid-April, real hang tags were carrying the codes through packing.

AI agents got us there fast, but not cleanly. At one point, a guide page was protected while its images were not. He spotted it in the diff.

That is the bargain: agents type fast, and the judgment stays human. On an authenticity system, that part isn't optional.

All told, it's about 8,000 lines, one Docker image, running since April without drama.

What it does

The system itself may be the least interesting part of the story. For each production run, it generates a batch of unique codes.

Those codes go into the hang tag artwork we already send to the printer.

The codes are bound to garments at final packing. Buyers scan and land on the brand's verification page in their own language. Each scan appears in the dashboard with its time, region and device.

Mobile verification page showing a green Authentic Product Verified result with product details and company traceability
THE BUYER'S VIEW (DEMO BRAND SHOWN)

A printed QR code can be copied. But the copy carries the same identity as the original. Every scan adds to the same history.

One code should belong to one garment. If the same code is scanned fourteen times across eight cities, the dashboard gives the brand something concrete to investigate and take to a marketplace.

Brand dashboard showing total codes, bound codes, scan trend over 30 days and scan region distribution across eight cities
THE BRAND'S VIEW (DEMO DATA)

Our client's garments now go out with codes on their tags. It won't stop copies by itself, but repeated scans can leave a trail the brand can investigate.

Giving it away

We published the whole system at github.com/jiashunclothing/tag-tracing under the MIT license.

"Trust us" is a weak pitch for an authenticity product. "Read the code" is a better one.

Clients do not come to us for software. They come for the sewing floor, wash development and the pattern room.

For the brands we work with, adding per-unit tracing to an order is now as straightforward as adding woven labels. Ask about it when you sample.

The rule that quietly died

For as long as I've been in this trade, software had one rule: factories rent it. Building your own was for companies that sold software. Everyone else worked around what vendors had imagined. I think that rule just died.

Not because the hard parts disappeared. They didn't. What changed is how much someone with firsthand business knowledge and some technical grounding can deliver.

A narrow tool that once needed a team can now be built by one colleague working with AI agents.

The other ingredient was already here: knowing how a code should travel from print file to packing table to a customer's phone. The real change was that the person closest to the problem could shape the tool directly.

Since we built this, Claude Fable 5 and GPT-5.6 have pushed coding and knowledge work forward again.

We find ourselves asking what the same progress could mean for sampling, sourcing, production planning and quality control.

We do not expect AI to replace the knowledge on the floor. We want to see what happens when the people who hold that knowledge can turn more of it into tools.

That does not mean every tool should be built in-house. AI made building cheaper; it did not make ownership free. The harder question is which tools matter enough to own, and which failures a business is prepared to take responsibility for.

What stays with me isn't the system. It's how ordinary the week felt. A client brought us a problem, and the factory answered it. Maybe that is AI in the trades: not robots at the sewing line, but a factory that owns its tools.

Next steps

Continue your sourcing research

Connect this guide to the relevant production service, then compare the related decisions before sending a brief.

Need this turned into a production quote?

Send your target style, fabric notes, decoration details and quantity so Jiashun can review the production path.

Start a Production Brief
Chat on WhatsApp