Skip to content

Repository files navigation

ContactCheck — Contact Allergen Scanner (PWA)

A free, private, client-side Progressive Web App (PWA) designed to screen cosmetic and household ingredient lists for Methylisothiazolinone + Methylchloroisothiazolinone (Kathon CG).

Key Features

  • 100% Client-Side: Powered by Tesseract.js for on-device optical character recognition. No server, no accounts, and no AI/LLM API costs. Photos never leave your browser.
  • Image Preprocessing: HTML5 Canvas pipeline with rotation, auto-contrast stretching, and black-and-white Otsu thresholding to handle curved packaging and fine print.
  • Smart Matching Engine:
    • Handles line-break hyphens common in product labels (e.g. Methylchloro- \n isothiazolinone).
    • Normalizes whitespace, punctuation, and character diacritics.
    • Typo-tolerant Levenshtein fuzzy matching to catch common OCR errors in long chemical names.
    • Complete coverage of all 37+ known aliases, brand trade names (Kathon CG, Euxyl K 100, Acticide, Parmetol), and European/CAS registry numbers (EINECS 247-500-7, BRN 1210149).
  • Multiple Input Modes:
    • Direct camera photo capture (optimized for mobile device rear cameras)
    • Image file upload / drag-and-drop
    • Manual text paste with pre-loaded sample ingredient lists
  • Results & Inspection:
    • High-contrast alert banners (⚠️ Allergen Present vs ✅ No Match Detected)
    • Interactive raw OCR text viewer with highlighted matches
    • Quick-edit text tool to correct any OCR misreads and re-evaluate instantly
    • Searchable allergen alias reference directory
  • PWA & Offline Capable: Web App Manifest and mobile-friendly responsive layout.

Getting Started

# Install dependencies
npm install

# Run tests
npm test

# Start local development server
npm run dev
# Open http://localhost:3000

# Build for production
npm run build
npm start

Safety Disclaimer

This application is an educational and personal screening aid, not a certified medical device. Always visually inspect the physical product packaging before use.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages