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.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证The first digits of a barcode identify the GS1 office that issued the number, not where the product was made
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
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.查看完整 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