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