Stop guessing what's in your packaged foods. Scan any packaged product with AI-powered precision to reveal hidden sugars, calories, and ingredients. Make informed choices instantly.
- About the Project
- Features
- Tech Stack
- Getting Started
- Usage
- Project Structure
- API Keys Setup
- Troubleshooting
- Our Team
- Contributing
- License
In a world where food labels confuse more than they clarify, NutriGo brings clarity. We're India's AI-powered nutrition companion, making every food choice an informed one.
With 101 million Indians living with diabetes and childhood obesity rates rising, we knew something had to change. NutriGo was born from the belief that everyone deserves to know what's in their food, without needing a nutrition degree to figure it out.
To democratize nutrition knowledge through AI-powered technology, empowering every Indian to make informed food choices that improve their health and well-being.
A future where food transparency is the norm, not the exception. Where every Indian has instant access to clear, reliable nutrition information that helps them live healthier lives.
Instantly scan any packaged food product with advanced AI to decode sugar levels, calories, and hidden ingredients. Crystal-clear visual insights at your fingertips.
Every packaged product gets an intelligent Health Score based on comprehensive analysis of sugar, calories, additives, and nutritional value. Know what's truly healthy.
Discover healthier packaged food substitutes instantly. Compare products side-by-side and make smarter swaps for your everyday nutrition goals.
Monitor your nutrition journey with detailed analytics, personalized recommendations, and AI-driven insights based on your dietary preferences.
Get real-time nutrition breakdown of packaged products in milliseconds. Our AI processes complex data instantly, giving you immediate actionable insights.
Ask questions about nutrition, ingredients, and healthy eating. Get instant AI-powered answers and personalized recommendations 24/7.
- Framework: Next.js 14 - React framework with App Router
- Language: TypeScript - Type-safe JavaScript
- Styling: Tailwind CSS - Utility-first CSS framework
- UI Components: shadcn/ui - Re-usable component library
- State Management: React Hooks (useState, useEffect)
- HTTP Client: Fetch API
- Deployment: Vercel
- Runtime: Node.js (v18+)
- Framework: Express.js - Web application framework
- Language: JavaScript
- Authentication: JWT (JSON Web Tokens)
- File Upload: Multer - Middleware for handling multipart/form-data
- CORS: cors - Cross-Origin Resource Sharing middleware
- Primary Database: Supabase - PostgreSQL database
- ORM: Supabase Client SDK
- Tables:
scans- Stores nutrition scan history and analysis
- AI Model: Google Gemini AI - Advanced AI for image recognition and nutrition analysis
- Image Processing: AI-powered food product recognition
- Natural Language Processing: Chatbot for nutrition queries
- Package Manager: npm / pnpm
- Version Control: Git & GitHub
- Code Editor: VS Code (recommended)
- Environment Variables: dotenv
Before you begin, ensure you have the following installed:
- Node.js 18+ - Download
- Git - Download
- npm or pnpm - Comes with Node.js
- Supabase Account - Sign up
- Google Cloud Account - Sign up (for Gemini AI API)
-
Clone the repository
git clone https://github.com/tung-programming/nutrigo.git cd nutrigo -
Install frontend dependencies
npm install # or pnpm install -
Install backend dependencies
cd backend npm install cd ..
-
Set up environment variables (see Environment Variables section)
-
Set up Supabase database
Create the following table in your Supabase project:
create table scans ( id text primary key, user_id text, detected_name text, brand text, nutrition jsonb, warnings text[], health_score integer, created_at timestamp with time zone default timezone('utc'::text, now()), barcode text, source text );
-
Run the development servers
Backend (Terminal 1):
cd backend npm run devFrontend (Terminal 2):
npm run dev
-
Open your browser
Navigate to
http://localhost:3000
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
BACKEND_URL=http://localhost:4000Create a .env file in the backend directory:
PORT=4000
FRONTEND_URL=http://localhost:3000
JWT_SECRET=your_jwt_secret_key
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_service_role_key
GEMINI_API_KEY=your_gemini_api_keyFrontend Variables:
NEXT_PUBLIC_SUPABASE_URL- Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY- Your Supabase anonymous key (public)BACKEND_URL- The URL where your backend is running
Backend Variables:
PORT- Backend server port (default: 4000)FRONTEND_URL- Frontend application URLJWT_SECRET- Secret key for JWT tokens (generate a random string)SUPABASE_URL- Your Supabase project URLSUPABASE_KEY- Your Supabase service role keyGEMINI_API_KEY- Google Gemini AI API key
- Go to Supabase and create a new project
- Once created, go to Project Settings โ API
- You'll find:
- Project URL โ Use for
SUPABASE_URL - anon public key โ Use for
NEXT_PUBLIC_SUPABASE_ANON_KEY - service_role key โ Use for
SUPABASE_KEY
- Project URL โ Use for
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Gemini API
- Navigate to APIs & Services โ Credentials
- Create an API key
- Copy the API key and use it for
GEMINI_API_KEY
- Sign up/Login - Create an account or log in to access features
- Scan Products - Upload an image of any packaged food product
- View Analysis - Get instant nutrition breakdown and health score
- Track Progress - Monitor your nutrition journey over time
- Ask Questions - Use the AI chatbot for personalized nutrition advice
- Find Alternatives - Discover healthier substitutes for your favorite products
nutrigo/
โโโ app/ # Next.js pages and routes
โ โโโ (auth)/ # Authentication pages
โ โโโ (dashboard)/ # Main application pages
โ โโโ layout.tsx # Root layout
โ โโโ page.tsx # Landing page
โโโ backend/ # Express backend server
โ โโโ routes/ # API routes
โ โโโ middleware/ # Custom middleware
โ โโโ uploads/ # Uploaded images
โ โโโ .env # Backend environment variables
โ โโโ server.js # Express server entry point
โโโ components/ # React components
โ โโโ ui/ # shadcn/ui components
โ โโโ ... # Custom components
โโโ lib/ # Shared utilities
โ โโโ supabase.ts # Supabase client
โ โโโ utils.ts # Helper functions
โโโ public/ # Static assets
โ โโโ team/ # Team member images
โ โโโ ... # Other static files
โโโ styles/ # Global CSS styles
โโโ .env.local # Frontend environment variables
โโโ next.config.js # Next.js configuration
โโโ tailwind.config.js # Tailwind CSS configuration
โโโ package.json # Frontend dependencies
โโโ README.md # Project documentation
- Check if you've created the
.envfile in the backend directory - Verify that
SUPABASE_URLis correctly set - Ensure there are no extra spaces or quotes in the environment variable
- Ensure backend is running on port 4000
- Check if
BACKEND_URLis correctly set in frontend.env.local - Verify CORS settings allow your frontend URL
- Ensure the
uploadsdirectory exists in the backend folder - Check file permissions on the uploads directory
- Verify file size limits in multer configuration
- Verify Supabase table schema matches the provided SQL
- Check if all required columns exist
- Ensure Supabase service role key has proper permissions
If you encounter any issues:
- Check the common issues section above
- Verify all environment variables are correctly set
- Ensure all required dependencies are installed
- Create an issue on GitHub with detailed information
Meet the dedicated team of innovators building the future of food transparency in India:
![]() Arjun Bhat Frontend Developer |
![]() Pranav Rao K Frontend Developer |
![]() Tushar P Backend Developer |
![]() Amogha K A Backend Developer |
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
If you find NutriGo helpful, please consider giving it a โญ on GitHub!
- Website: nutrigo-kappa.vercel.app
- GitHub: tung-programming/nutrigo
- Issues: Report a bug or request a feature
Together, we're building a healthier India, one scan at a time. ๐ฎ๐ณ
Made with โค๏ธ by the NutriGo Team



