Inspiration

People increasingly want to know what is actually in their food, and they change what they buy when they find out. The tools that exist have two problems. They only work on packaged products already sitting in a database, so anything imported, fresh or store-brand comes back empty. And they hand you a number without telling you where it came from, so you either trust it blindly or ignore it.

Frela was built to fix both: score anything with an ingredient list, and never show a number without showing the reasoning behind it.

What it does

Point the camera at a barcode and Frela looks the product up and scores it instantly. If there is no barcode, or the product is in no database at all, scan the ingredient label instead — Frela reads it on-device and scores it anyway. That is the part most scanners cannot do.

Every score opens into a full breakdown built from four separate components:

  • Nutrition — the official Nutri-Score 2023/2024 algorithm, implemented from the Sante publique France tables, including all five product categories and their category-specific rules
  • Additives — a curated risk rating across 154 E-numbers, scored by the riskiest additive present rather than the average, so one high-risk additive is not laundered by ten harmless ones
  • Processing — NOVA classification, the axis Nutri-Score deliberately ignores
  • Organic — certified organic earns back points that conventional farming does not

The four are weighted by food category, so a cooking oil is not judged like a soft drink. When a product's data is incomplete, Frela says so instead of inventing a flattering number.

Scanning is only half of it. The retention loop is a clean-eating streak: a GitHub-style contribution grid where every day you scan fills in a square, coloured by how clean that day's choices were. Checking labels stops being a lookup and becomes a habit you can see.

How we built it

  • iOS — SwiftUI, SwiftData for local-first persistence, VisionKit DataScanner for barcodes
  • Scan-anything path — Apple Vision on-device OCR (German and English) extracts the label text, which is sent as text, not images to a small backend proxy that structures it with a language model. Keeping OCR on-device makes it fast, private, and roughly ten times cheaper than shipping photos to a vision model
  • Scoring — deterministic Swift, never a language model. A health score has to be reproducible and explainable, so it is implemented directly from the published tables and covered by 37 test vectors that check real products against their known official grades
  • Monetization — the RevenueCat SDK with a two-tier subscription (yearly and weekly) behind a frela Pro entitlement, driving a fully native paywall. Prices are read live from StoreKit and never hardcoded, including the derived per-week figure and the savings calculation
  • Data — Open Food Facts for barcode lookups, cached in Supabase so repeat scans are instant
  • Backend — Node/Express on Vercel with HMAC-signed requests, so no API keys ship inside the app
  • CI — GitHub Actions archives and uploads the build, with a check that refuses to upload anything compiled on a beta toolchain

Challenges we ran into

Implementing Nutri-Score correctly was much harder than expected. The 2023/2024 update has five product categories with genuinely different point tables, a protein-exclusion rule that flips depending on the negative score, a red-meat protein cap, and a fats category that scores energy-from-saturates instead of energy. Most third-party implementations get at least one of these wrong. We worked from the official Sante publique France tables and validated against products whose published grades are known — extra virgin olive oil has to come out B, Coca-Cola has to come out E.

The harder judgement call was the additive scale. Rating everything as alarming is easy and useless. We deliberately rate citric acid and lecithin as no known risk, because a system that flinches at citric acid devalues the flags that actually matter — nitrites, azo dyes, titanium dioxide.

Accomplishments that we're proud of

A score that can always answer "why". Every component, every additive and every Nutri-Score point is visible in the breakdown, and the whole thing is deterministic — the same product always produces the same number, and we can defend every part of it.

What we learned

That the honest version of a health score is more useful than the scary version. Telling people which additives are fine is exactly what makes the warnings credible.

What's next for Frela

Healthier-alternative suggestions from the same shelf, full German localisation of the reference content, and shareable streak cards.

Built With

Share this project:

Updates

Submission history