SnackSage is an AI-powered mobile application that helps reduce household food waste by integrating real-time pantry inventory tracking with personalized recipe recommendations. Built using React Native, Express.js, MongoDB Atlas, and Google Gemini AI with Retrieval-Augmented Generation (RAG), SnackSage provides a smart, sustainable, and data-driven approach to food management.
Download App: https://tinyurl.com/bdpc6tbn
Web Trial: https://tinyurl.com/mryd7m8x
- AI-Driven Recipe Suggestions – Gemini AI + RAG generates recipes using available ingredients and expiring items.
- Real-Time Inventory Tracking – Manage pantry items with expiry alerts and category analytics.
- QR Code Item Entry – Scan food packaging to auto-fill item details.
- Conversational Chatbot – Get interactive cooking assistance and substitution advice.
- Visual Dashboard – Donut charts display pantry distribution, expiry alerts, and usage metrics.
- Sustainability Metrics – Track waste reduction aligned with UN SDG 12.3.
| Layer | Technologies | Purpose |
|---|---|---|
| Frontend | React Native, Expo, Figma | Cross-platform mobile UI/UX |
| Backend | Express.js, Node.js | REST APIs, business logic |
| Database | MongoDB Atlas | Cloud NoSQL storage |
| AI | Google Gemini API + RAG (FAISS) | Recipe generation & chat |
| Deployment | Vercel, Expo OTA | Hosting & continuous updates |
| Testing | Postman, Jest, Mocha | Unit & API validation |
- Client Layer: React Native handles UI and user interactions.
- API Layer: Express.js exposes secured REST endpoints with JWT authentication.
- Data Layer: MongoDB Atlas stores users, items, and recipe history.
- AI Layer: Google Gemini + RAG retrieves contextual recipes and ensures accurate responses.
Follow these steps after cloning the repository: https://www.github.com/sahilmurhekar/SnackSage.
- Node.js (v18+ recommended) and npm or yarn
- expo-cli (
npm install -g expo-cli) - Git
- A MongoDB Atlas cluster (or local MongoDB)
- Google Cloud account with access to Gemini API (set API key)
git clone https://www.github.com/sahilmurhekar/SnackSage.git
cd SnackSagecd server
# install dependencies
npm install
# copy example env and update values
cp .env.example .env
# set MONGODB_URI, JWT_SECRET, GEMINI_API_KEY, PORT (optional)
# start the dev server
npm run dev- The server runs on
http://localhost:5000by default (or the PORT in.env). - Available scripts:
npm run dev(nodemon),npm run start(node),npm run test.
cd ../mobile
# install dependencies
npm install
# set environment variables for API base URL (e.g., in app.config.js or .env)
# start Expo
expo start- Open the Expo QR code with Expo Go (iOS/Android) or run on simulator/emulator.
- To build native binaries use
eas build(configure EAS and credentials) orexpo build(classic).
Create .env files in /server and /mobile as required. Example keys:
# server/.env
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
GEMINI_API_KEY=your_gemini_api_key
PORT=5000
# mobile/.env (or app config)
API_BASE_URL=http://localhost:5000/api
- Use MongoDB Atlas free tier or local MongoDB.
- Import any seed/mock data if present:
server/scripts/seed.js(if included) withnode scripts/seed.js.
- Populate the RAG index at server startup or via
server/scripts/ingest_recipes.js. - Ensure
GEMINI_API_KEYis set and the server can reach Gemini endpoints.
- Backend: configure Vercel (serverless functions) or deploy to any Node host. Ensure environment variables are set in the host.
- Frontend: publish via Expo (OTA) or build native apps. For web or static deployments, adapt with
expo-webor build a React web client.
# at repo root
# run backend
cd server && npm run dev
# run mobile
cd mobile && expo start
# run tests
cd server && npm test- Authentication: Secure JWT-based login/register.
- Add Item: Manual or QR-based item entry with expiry date tracking.
- Dashboard: Displays inventory charts and upcoming expiry alerts.
- Recipe Chat: Conversational interface with markdown-rendered recipe steps.
- Analytics: Visual insights on waste reduction and consumption patterns.
- Backend: Hosted on Vercel
- Frontend (Mobile): Expo OTA build (scan via Expo Go app)
- Database: MongoDB Atlas (Free Tier Sandbox)
- JWT Authentication with token expiry.
- HTTPS for all API communications.
- Input sanitization to prevent injection attacks.
- GDPR-compliant data handling (user data deletion endpoint).
- Voice and RFID-based item entry.
- Offline mode with local caching.
- Integration with Open Food Facts API for live product data.
- Expanded sustainability dashboard with CO₂e savings visualization.
| Name | Reg. No. | Role |
|---|---|---|
| Diksha Dutta | 22BIT0230 | Frontend Developer |
| Sahil Rajesh Murhekar | 22BIT0467 | Full Stack Developer |
| Priyanshu Pulak | 22BIT0587 | Testing & Documentation |
Guide: Prof. Suganya P, Assistant Professor Sr. Grade 1, VIT Vellore
This project is licensed under the MIT License – feel free to use, modify, and distribute with attribution.
SnackSage empowers households to cut food waste by up to 30% through intelligent, sustainable, and AI-driven pantry management.
