Barcode Scanning App with Expo and Gemini: How I Built PureX

PureX turns a phone into a personal health and safety scanner. Scan a product barcode for nutrition and safety insights, or use your location for local water-quality reports, with Google Gemini explaining both.

By Wasif Rehman · · Mobile

In short

  • Expo modules such as expo-camera and expo-location handle the native work, so the effort can go into making scanning feel instant.
  • A barcode or a location reading means little until AI turns it into a plain-language insight.
  • When people make health decisions on AI output, readability and reliability are the bar.
  • RevenueCat removes most of the receipt-validation work, but an Expo dev-client build still needs build properties and entitlements to line up.

A barcode scanning app for product and water safety

I built PureX at AIDEVGEN with React Native and Expo, Google Gemini for analysis and Supabase on the back end. It does two things:

Two ways to use PureX
FeatureInputWhat the user gets
Product scanThe camera reads a product barcodeAI-analysed nutrition and safety insights
Water qualityThe device locationWater-quality reports for their area

This is how the pieces fit together.

The PureX stack
JobTool
Mobile frameworkReact Native and Expo
Barcode scanningexpo-camera
Locationexpo-location
AI analysisGoogle Gemini through @google/genai
Data and authSupabase
Sign-in on iOSApple authentication through expo-apple-authentication
SubscriptionsRevenueCat through react-native-purchases
Reportsexpo-print and expo-sharing

Barcode scanning with expo-camera and location with expo-location

Barcode scanning runs on expo-camera, and water-quality lookups use expo-location.

The real work is making scanning feel instant across a wide range of products and lighting conditions. The camera pipeline has to:

  • Respond quickly
  • Give the user clear feedback
  • Degrade gracefully when a code is damaged or unusual

Using Google Gemini to turn scan data into health insights

A barcode or a location reading means nothing on its own. Google Gemini, through @google/genai, interprets the scanned product or the regional data into clear, actionable insights:

  • What is in a product
  • What to watch for
  • What a water report actually means for you
  1. Barcode or location
  2. Product or regional data
  3. Gemini analysis
  4. Plain-language insight
From scan to insight

Supabase auth, Sign in with Apple and RevenueCat subscriptions in Expo

Supabase handles data and authentication. Pairing it with Apple authentication (expo-apple-authentication) gives iOS users the fast, privacy-respecting sign-in they expect, while Supabase stores user data and history behind it.

The premium tier runs on RevenueCat (react-native-purchases), which abstracts the cross-platform pain of in-app purchases.

Once they do, RevenueCat removes most of the receipt-validation drudgery.

Expo modules that make a utility app feel native

The details are what make a utility app feel premium. PureX uses:

  • Haptics
  • Blur
  • Gradients
  • Push notifications
  • Report generation and sharing with expo-print and expo-sharing

Each is a small Expo module. Together they push the app from "functional" to "feels native".

What I learned building a React Native AI app

A focused mobile app can combine camera, location and AI into something useful without becoming bloated.

Expo carried the heavy native lifting. The product work was making the AI insights trustworthy and the scanning fast. Get those two right and the rest is polish.

I also paired Gemini with React Native for car maintenance in Building an AI-Powered Car Maintenance App.

Frequently asked questions

How does PureX scan barcodes?

With expo-camera in a React Native and Expo app. The camera pipeline is built to respond quickly, give clear feedback and degrade gracefully when a code is damaged or unusual.

What does Google Gemini do in the app?

Gemini, through @google/genai, interprets scanned product data or regional water data into clear insights: what is in a product, what to watch for and what a water report means for you.

How do you add subscriptions to an Expo app?

PureX uses RevenueCat through react-native-purchases, which handles the cross-platform in-app purchase work and most of the receipt validation. In an Expo dev-client build, the build properties and entitlements have to line up.

Which backend does PureX use?

Supabase, for data and authentication. It is paired with Apple authentication through expo-apple-authentication, and Supabase stores user data and history.

Case study: PureX

All posts