A web app for scanning and comparing the nutritional content of food products, powered by the Open Food Facts database.
Nutripare lets you look up food products by barcode or name, view their nutritional information, and compare them side by side. Each product receives a computed nutrition score based on configurable thresholds, making it easy to make informed decisions at a glance. User data — saved products, comparisons, and nutrition settings — is persisted per account via Firebase.
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS v4
- Firebase (Auth + Firestore)
- Open Food Facts API
- shadcn/ui
- html5-qrcode
- Vitest
- Barcode scanning — scan a product's barcode directly from your camera to look it up instantly
- Product search — search for products by barcode (with EAN check digit validation)
- Side-by-side comparison — compare two or more products' full nutritional profiles at once
- Nutrition scoring — each product gets a score based on user-defined thresholds for nutrients (green / blue / amber / red)
- Built-in rulesets — choose from preset rulesets (Default, Low Carb, High Protein, High Fiber, Low Fat, Low Salt) or create your own
- Column reordering — drag and drop columns to reorder them in the comparison table
- Saved products — save products to your account for quick access later
- Saved comparisons — save product comparisons to revisit them
- Custom nutrition settings — configure which nutrients matter and set your own thresholds
- Product reporting — flag products with incorrect or missing data
- Expandable comparison table — expand the table to fit all products (or full viewport width on wide comparisons) with a toolbar toggle; preference is persisted across sessions
- Dark / light mode — toggle between themes, persisted across sessions
- Authentication — sign in with email/password or Google via Firebase Auth (email verification required)
Prerequisites: Node.js 18+, npm, and a Firebase project with Auth and Firestore enabled.
-
Clone the repository
git clone https://github.com/ioanat94/nutripare.git cd nutripare -
Install dependencies
npm install
-
Create a
.env.localfile in the project root:NEXT_PUBLIC_FIREBASE_API_KEY= NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= NEXT_PUBLIC_FIREBASE_PROJECT_ID= NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= NEXT_PUBLIC_FIREBASE_APP_ID= OPENFOODFACTS_BASE_URL=https://world.openfoodfacts.net OPENFOODFACTS_STAGING_AUTH=off:off
-
Start the development server
npm run dev
The app will be available at
http://localhost:3000.
Ioana Tiplea
- Email: ioanatiplea94@gmail.com
- LinkedIn: linkedin.com/in/ioana-tiplea
- GitHub: github.com/ioanat94