How SafeShelf Works
From photo to safety score in under 30 seconds. Here's exactly what our AI does — and what it doesn't do.
SafeShelf is an AI-powered educational tool. All analyses — general and personalised — are for informational purposes only and do not constitute medical advice, clinical diagnosis, or a substitute for professional healthcare guidance.
Do not start, stop, or change medications based on a SafeShelf report. If you have a medical condition, are pregnant, take prescription drugs, or are making decisions for a child, always consult a qualified healthcare professional. SafeShelf AI can make errors and cannot assess your full clinical picture.
⚙️ The Analysis Pipeline
Every time you upload a product label, SafeShelf runs a 4-step process:
📷 Image Upload & Compression
Your image is compressed client-side to JPEG, then uploaded to our server (never directly from browser to Cloudinary, which prevents ad-blocker issues). Images are stored securely on Cloudinary.
🔍 Category Detection
Google Gemini AI reads all visible text and identifies the product category: food, cosmetic, supplement, personal care, household, baby, pet food, tobacco, or unknown. The sub-type (e.g. "leave-on moisturiser", "infant formula 0–6mo") is also detected and changes how scoring weights are applied.
📊 Per-Field Scoring
Each category has 4–6 specific assessment fields, each scored 0–100. Fields are weighted differently and the weighted average becomes the overall score. Hard score caps apply to high-risk categories (tobacco max 15, household max 55).
🧾 Report Generation
The AI generates flagged ingredients with risk levels and explanations, detected allergens, key benefits, category-specific warnings, and actionable recommendations — all in structured JSON returned to your browser.
🧪 The 9 Product Categories
SafeShelf applies different scoring criteria depending on what the product is. Each category has its own fields, weights, and hard rules.
Additive safety · Added sugar (not natural) · Ingredient quality · Nutritional value · Allergen clarity · Preservative load
Endocrine disruptors · Carcinogens & irritants · Fragrance transparency · Surfactant harshness · Active ingredients bonus. Leave-on products penalised harder.
Drug interaction risk · Mega-dose toxicity · Bioavailability quality · Filler quality · Label transparency. Critical drug interactions cap score at 30.
Absorption zone risk · Toxic chemicals · Ingestion risk (lip/oral only) · Fragrance cumulative load · Microbiome impact
Acute hazard level · Mixing danger warnings · VOC/respiratory risk · Child & pet safety · Environmental persistence. Max score: 55.
Heavy metal risk · Developmental toxins · Age-appropriateness · Additive sensitivity at child thresholds · Allergen safety. Honey in under-1yr product caps score at 20.
Pet-specific toxins (xylitol, grapes) · Protein quality · Preservative safety · Species & life-stage fit. Human safety logic does not apply here.
Additive toxin load · Delivery mechanism risk · Relative harm context. Max score: 15. NRT products classified differently (supplement category).
When product type cannot be determined: visible hazard symbols · universal chemical red flags · label readability. Score carries a low confidence flag.
🥜 Allergens vs. Universal Toxins — Why We Separate Them
One of the most common mistakes in ingredient analysis tools is treating allergens the same as universal toxins. We call this the Peanut Butter Paradox.
⚠️ Universally Harmful Chemicals
Dangerous for everyone regardless of individual biology. Examples:
- Formaldehyde releasers in cosmetics
- BHA/BHT/TBHQ in food
- Phthalates & parabens
- Xylitol in dog food
- Chlorine + ammonia mixing danger
→ Scored as harmful for all users
🥜 Personal Allergens
Only relevant to individuals with that specific allergy. Examples:
- Peanuts (safe for 99% of people)
- Milk / lactose
- Gluten / wheat
- Fragrance (affects sensitive skin)
- Sulphites
→ Listed separately, not scored as harmful universally
🎯 Personalised Analysis — How It Works
When you run a personalised scan, SafeShelf constructs a Personal Context block from your health profile and prepends it to the analysis prompt before sending to Gemini AI. This means the AI reasons about the product through the lens of your specific health situation.
Examples of what changes with personalisation:
- Personalised scans are never shown in the public Discover gallery
- They are excluded from search engine sitemaps and marked
noindex - Only you can access your personalised scan results (via your dashboard history)
- Your health profile data is encrypted at rest and never shared with brands, advertisers, or third parties
- SafeShelf is ad-free — your health data is never monetised
Personalised analysis improves relevance but does not make SafeShelf a medical device. The AI has no access to your full medical history, current lab results, exact medication dosages, or clinical context. Drug interaction warnings are based on general pharmacological knowledge and must be confirmed with your prescribing doctor or pharmacist before acting. SafeShelf accepts no liability for health decisions made based on personalised analysis.
📊 Score Interpretation
Scores reflect the product's safety profile within its category. A household cleaner scoring 52 is near the best possible for its type. A food scoring 52 has meaningful concerns.
📂 What Happens to Your Data
Compressed client-side and uploaded to Cloudinary (secure image host) via our server. Images are used to power the AI analysis and may be used to improve SafeShelf's AI models. We never share identifiable images. General scan images are stored publicly on Cloudinary by design.
We resolve your IP to country and city (not a precise address) to understand where SafeShelf is being used. This is stored anonymously alongside the scan and is never tied to your personal identity.
Stored encrypted in our PostgreSQL database. Never shared with any third party, never used for advertising. Used only to power your personalised scans. You can delete your profile at any time from your dashboard.
Important: General (non-personalised) scans have a public URL and may appear in the Discover gallery and in search engines. Do not upload images containing personal or identifiable information. Personalised scans are private and excluded from all public indexing.