Tokens
Track, visualize, and compete on AI coding assistant token usage across Claude Code, Cursor, OpenCode, Codex, Gemini, Kimi, and Qwen. The Kardashev Scale for AI Devs.
Scan a barcode. It tells you which GS1 office sold the company its number — not where the product was made. This shows the difference.
DataTypeScript · CSSGitHub @aritrade1709OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The first digits of a barcode identify the GS1 office that issued the number, not where the product was made
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Scan a product barcode and see what its digits actually encode. The leading digits
identify the GS1 member organisation that issued the company its number — not where
the product was made. This shows the difference, using the manufacturer's own
declared origin where one exists.Read the full README ↗aritrade1709.github.io/barcode-truth
Scan a product barcode and see what its digits actually encode. The leading digits identify the GS1 member organisation that issued the company its number — not where the product was made. This shows the difference, using the manufacturer's own declared origin where one exists.
There is a widely repeated claim that the first three digits of a barcode tell you a
product's country of origin — that 890 means made in India, 690 means made in
China. It isn't true. Those digits record which GS1 office a company registered with.
A company can register in one country and manufacture in any other, and many do.
This tool puts the two answers side by side. Scan a can of Coca-Cola and the prefix points at Belgium, the declared factory is in Atlanta, and the origin field says the United Kingdom — one barcode, three different countries. Where a manufacturer has declared nothing, which is the common case, it says so rather than guessing.
Everything runs in the browser. Camera frames are decoded on-device and never uploaded; the only outbound request is a barcode lookup against Open Food Facts.
Prefix resolution. GS1 publishes its prefix allocations as ranges, mixing
three-digit entries (300–379, France) with four-digit ones (960–9624, GS1 UK's
GTIN-8 block). Compared as plain integers those two families collide, so every range
is normalised to a common four-digit interval — the low bound padded with zeros, the
high bound with nines — which makes the table tile without overlap and lets a lookup
be a single interval test. The generator asserts non-overlap when it builds the table.
Ranges are classified, because not all of them name an organisation. 020–029,
040–049 and 200–299 are restricted-circulation numbers that a shop or company
issues to itself; they are valid only inside the building they came from. 978–979
is ISBN, 977 is ISSN, 981–983 and 990–999 are coupons. These resolve to "no
country at all" rather than to a wrong country.
Origin reconciliation. Open Food Facts stores manufacturing_places and origins
as separate fields, and they mean different things — where it was made, versus where
the ingredients came from. They are compared separately and in that order. Red Bull
sold in Morocco declares Austrian ingredients and a Moroccan factory; pooling the two
fields into one set would find "Austria", match it against the Austrian prefix, and
report agreement where there is a contradiction. The factory is compared first, and
ingredient origin is used only as a labelled fallback.
Free-text place names are matched against a country vocabulary derived from the GS1 table itself, so the project ships one country list rather than two. Names that are also common subnational places are demoted when an unambiguous name appears alongside them — "Atlanta, Georgia, United States" resolves to the United States, not to Georgia the country. A declared place that is a city rather than a country yields no inference at all.
Digit structure. The GS1 prefix and the check digit are located exactly. The boundary between the company prefix and the item reference is not, and is presented as unknowable: GS1 issues company prefixes of varying length and does not publish the lengths, so any tool drawing a fixed line there is guessing.
Check digit. The modulo-10 check digit is recomputed and the arithmetic is displayed rather than reduced to a pass or fail. Weights alternate 3 and 1 starting from the rightmost payload digit, which is the detail most implementations get wrong on even-length codes.
Scanning. Chrome and Android expose a native BarcodeDetector; Safari does not.
The native detector is used when it reports support for the relevant formats, and a
ZXing decoder is dynamically imported only when it is absent — so the browsers that
have a decoder never download the 400 KB fallback. Both decoders are handed the same
cropped central band rather than the full frame, since a barcode is a wide, short
thing and decoding the rest is wasted work. A decoded value must appear in two
separate frames, and pass its check digit, before it is accepted; single frames
produce occasional confident misreads under motion blur and glare.
Offline behaviour. The prefix table and a set of demo products are committed, so the whole analysis path works with no network. Product lookups check the cache first, then try Open Food Facts, Open Products Facts and Open Beauty Facts in turn.
pnpm install
pnpm dev
No environment variables, no API keys, no accounts.
| Command | |
|---|---|
pnpm dev | development server |
pnpm build | production build |
pnpm test | tests |
pnpm gs1 | regenerate the GS1 prefix table |
pnpm fixtures | re-cache the demo products |
The two regeneration scripts are not needed to run or build the project; their output
is committed. pnpm test requires Node 23.6 or newer, as the tests are TypeScript
executed directly by Node.
TypeScript and Vite, with no framework and no backend. ZXing is the fallback barcode decoder. Deployed as a static site on GitHub Pages.
| Source | Terms | Notes |
|---|---|---|
| GS1 prefix allocations | CC BY-SA | 144 ranges covering 131 member-organisation territories. Transcribed on Wikipedia from GS1's published company prefix list. Committed to the repository. |
| Open Food Facts | ODbL | Product names, brands, images and declared origins. No key required. |
| Open Products Facts · Open Beauty Facts | ODbL | Same API, queried when a code is not in the food database. |
Product data is contributed by Open Food Facts volunteers and is made available under the Open Database License. Individual product images are licensed by their contributors.
MIT