All tools
Open source Health & life

padho-label

Reads a packaged food label and tells you what's actually in it.

  • TypeScript
  • Vision

01 · What it does

The problem it solves

Indian packaged-food labels state sugar, salt and fat per 100g, which is hard to judge against your own health needs. Padho Label ("padho" is Hindi for "read") scans the barcode, checks a bundled 98-product catalogue, then Open Food Facts, and returns an A–E grade plus a 0–100 score computed from your profile — diet, goals, and conditions such as diabetes, hypertension or PCOS. It restates sugar in teaspoons and matches ingredients against a 73-entry FSSAI additive reference. Scoring is rule-based, not a model, so the same product always produces the same verdict.

Who it's for

Anyone in India who reads food labels for a health reason — diabetes, hypertension, PCOS, allergies, or a vegetarian, vegan, Jain or satvik diet. Also a useful reference if you want a working offline-first Expo app to read or fork.

02 · Setup

Before you start

  • Node.js 20 (used by the Dockerfile and CI)
  • An Android device or emulator, or an iOS device or simulator
  • JDK 17 and Android Studio for Android release builds
  • Xcode for iOS builds (macOS only)

Clone

git clone https://github.com/ca-who-codes/padho-label.git

Install

npm install --legacy-peer-deps

Run on Android

npm run android

03 · Step by step

Getting it running

  1. Install dependencies

    Clone and install. Use the same flag the project CI uses — a plain npm install can stop on a peer dependency conflict.

    npm install --legacy-peer-deps
  2. Decide whether you need any keys

    Every environment variable is optional. With none set, it works as an Open Food Facts scanner with OCR on a shared demo key. Copy the example file only if you want your own OCR.space key.

    cp .env.example .env
  3. Generate the native projects

    Barcode scanning uses react-native-vision-camera, which does not run in Expo Go. Run prebuild once to create the android and ios directories.

    npm run prebuild
  4. Launch on a device

    Start on a connected device or emulator. Grant the camera permission — scanning and label capture both need it.

    npm run android
  5. Complete the onboarding profile

    Enter diet, goals, allergies and conditions in the app. Without a profile you get a plain grade; the personalised score and allergen banners only work once it exists.

  6. Scan a product, or photograph the label

    Point the camera at a barcode for a verdict, nutrition breakdown and healthier alternatives in the same category. If the barcode is not found anywhere, use label capture to OCR the panel instead.

  7. Verify the build

    The suite covers scoring, dietary rules, OCR parsing, additive detection and product matching, plus a clean TypeScript check.

    npm test && npx tsc --noEmit

04 · What you get

Capabilities

Personalised grade and score

An A–E grade plus a 0–100 score derived from your profile, with a plain-language breakdown of why.

Allergen and diet conflicts

Gluten, dairy, nuts, soy and egg, and vegetarian, vegan, Jain, satvik and eggitarian diets, checked against the ingredient list.

Sugar in teaspoons

Grams per 100g converted to teaspoons, and per serving where the pack declares one.

Added versus intrinsic sugar

Reads the ingredient list, so lactose in plain milk is not penalised like added sugar.

Offline seed catalogue

98 common Indian products are bundled, so search and comparison work from first launch with no network.

Local-only data

Profile, history and favourites live in device storage. No account, no backend, nothing synced.

05 · Before you rely on it

Limitations, honestly

Every tool has edges. These are the ones that will cost you time if nobody tells you first.

  • Expo Go will not run this — vision-camera needs a native build via prebuild and then Gradle or Xcode.
  • SETUP.md tells you to push to a main branch, but the release workflow only triggers on master, the repo default.
  • The README says 18 tests; there are actually 71 across three files. It also says 80+ additives; the database holds 73.
  • The repo description calls it AI-powered — there is no LLM or ML dependency. Scoring is rule-based; OCR.space only extracts text.
  • The bundled Airtable token can be extracted from any build, so keep it read-only and scoped to one base.
  • No LICENSE file, so no reuse rights are granted. Nutrition data is community-sourced and is not medical advice.

Read the source

Everything above came from the repository. Read it, fork it, or open an issue if something here is wrong.

github.com