{"id":28666430,"url":"https://github.com/shubhodippal/nutrisift","last_synced_at":"2026-05-04T01:34:13.338Z","repository":{"id":297488391,"uuid":"996164723","full_name":"Shubhodippal/NutriSift","owner":"Shubhodippal","description":"NutriSift: AI-Powered Recipe Platform NutriSift is a full-stack application that combines AI technology with recipe management to help users reduce food waste and eat healthier. The platform lets users generate personalized recipes from available ingredients, discover new dishes through advanced filtering, and manage grocery shopping efficiently.","archived":false,"fork":false,"pushed_at":"2025-06-12T20:10:12.000Z","size":29823,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T21:26:39.648Z","etag":null,"topics":["java","js","react","spring-boot","sql"],"latest_commit_sha":null,"homepage":"https://shubhodippal.github.io/NutriSift/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shubhodippal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T14:47:16.000Z","updated_at":"2025-06-12T20:07:55.000Z","dependencies_parsed_at":"2025-06-05T19:21:19.569Z","dependency_job_id":"699126a0-13af-4ec8-8be3-becf41d91651","html_url":"https://github.com/Shubhodippal/NutriSift","commit_stats":null,"previous_names":["shubhodippal/nutrisift"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shubhodippal/NutriSift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shubhodippal%2FNutriSift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shubhodippal%2FNutriSift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shubhodippal%2FNutriSift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shubhodippal%2FNutriSift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shubhodippal","download_url":"https://codeload.github.com/Shubhodippal/NutriSift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shubhodippal%2FNutriSift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259659774,"owners_count":22891683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","js","react","spring-boot","sql"],"created_at":"2025-06-13T14:16:08.973Z","updated_at":"2026-05-04T01:34:13.331Z","avatar_url":"https://github.com/Shubhodippal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NutriSift - AI-Powered Recipe Creation and Management Platform\n\u003c!-- GitAds-Verify: KGUU4F9BHPZVOJ9BCRE1RY3Q64Q6AA3V --\u003e\n\n![NutriSift Logo](./logo.png)\n\n## 📋 Overview\n\nNutriSift is a comprehensive AI-powered recipe management ecosystem that transforms how individuals interact with food and nutrition. Leveraging the advanced Cohere command-a-03-2025 model, NutriSift addresses multiple pain points in the modern kitchen: ingredient wastage, dietary adherence, meal planning complexity, and nutritional tracking.\n\nAt its core, NutriSift employs artificial intelligence to analyze available ingredients and generate customized recipes tailored to users' dietary preferences, nutritional requirements, and taste preferences. Unlike conventional recipe databases, NutriSift's AI engine understands ingredient combinations, cooking techniques, and flavor profiles to create original, nutritionally balanced recipes optimized for the user's specific needs.\n\nThe platform's architecture integrates seven key components:\n\n1. **AI Recipe Generation Engine**: Creates detailed recipes from user-provided ingredients with comprehensive nutritional analysis using cohere command-a-03-2025 model.\n2. **Smart Recipe Discovery System**: Offers advanced filtering across multiple dimensions (calories, diet types, cuisines).\n3. **Personal Recipe Library**: Enables users to build and organize their culinary collection.\n4. **Comprehensive Meal Planning**: Develops personalized 7-day meal plans with nutritional balance and ingredient optimization based on health metrics and dietary needs.\n5. **Intelligent Grocery Management**: Converts recipes into categorized shopping list.\n6. **Personalized Profile System**: Adapts recommendations based on health metrics, dietary needs, and preferences.\n7. **Location-Based Restaurant Finder**: Bridges home cooking with dining options for a complete food management experience.\n\nNutriSift's React-based frontend delivers a responsive, intuitive interface accessible across devices, while the Spring Boot backend provides secure API endpoints for persistent data storage in MariaDB. Through JWT authentication and encrypted communication of important data, NutriSift maintains data security while enabling cloud synchronization.\n\nThe platform addresses the needs of health-conscious individuals, busy professionals, dietary-restricted users, and culinary enthusiasts by combining convenience with nutritional intelligence. NutriSift's ability to understand relationships between ingredients, suggest substitutions, and optimize grocery shopping represents a significant advancement beyond traditional recipe applications.\n\nBy integrating AI-powered recipe generation with comprehensive meal planning and grocery management, NutriSift creates a cohesive system that reduces food waste, promotes dietary adherence, simplifies meal preparation, and enhances nutritional awareness—ultimately transforming the relationship between users and their food choices.\n\n## ✨ Key Features\n\n### 🤖 AI Recipe Generation\n- **Ingredient-Based Recipe Creation**: Enter ingredients you have on hand and receive complete recipe suggestions\n- **Nutritional Analysis**: Get comprehensive nutrition information for every recipe\n- **Dietary Awareness**: All recipes include diet type classifications (keto, vegan, etc.)\n- **Origin \u0026 Classification**: Recipes include details about cuisine origin and course type\n- **Conversational Interface**: Chat-like experience for requesting and refining recipes\n\n### 🔍 Recipe Discovery System\n- **Advanced Filtering**: Find recipes based on:\n  - Calorie ranges (under 300, 300-500, 500-800, over 800 calories)\n  - Diet types (vegetarian, vegan, gluten-free, keto, paleo, etc.)\n  - Origins (Mediterranean, Asian, European, American, etc.)\n  - Course types (breakfast, lunch, dinner, appetizer, dessert, etc.)\n  - Cuisine styles (traditional, fusion, street food, gourmet, etc.)\n- **Comprehensive Search**: Full-text search across recipe titles and ingredients\n- **Visual Gallery**: Browse recipes with high-quality preview images\n\n### 📚 Recipe Management\n- **Personal Library**: Save unlimited recipes to your personal collection\n- **Custom Organization**: Categorize and tag recipes for easy retrieval\n- **Favorites Marking**: Mark top recipes as favorites for quick access\n- **Search \u0026 Filter**: Quickly find saved recipes with powerful search functionality\n\n### 🛒 Smart Grocery List\n- **One-Click Adding**: Add all ingredients from a recipe to your grocery list\n- **Quantity Adjustment**: Adjust quantities based on serving sizes\n- **Checklist Functionality**: Check off items while shopping\n- **Persistence**: List saves between sessions\n- **Cloud Synchronization**: Access your grocery list across devices\n- **Print \u0026 Share**: Print your grocery list or share it with others\n\n### 📆 Personalized Weekly Meal Planning\n\nNutriSift's AI-powered weekly meal planner creates customized 7-day meal plans tailored to your:\n\n- **Dietary preferences** (vegetarian, vegan, keto, etc.)\n- **Health goals** (weight loss, muscle gain, maintenance)\n- **Calorie targets** (automatically calculated or custom)\n- **Food allergies and restrictions**\n- **Regional cuisine preferences**\n- **Personal taste preferences**\n\n#### Key Meal Planning Features:\n\n- **Complete 7-Day Coverage**: Full meal plans with breakfast, morning snack, lunch, afternoon snack, and dinner for each day\n- **Recipe Variety**: AI ensures diverse meals throughout the week with minimal repetition\n- **Nutritional Balance**: Each day's plan maintains appropriate caloric and macronutrient distribution\n- **Ingredient Optimization**: Efficient use of ingredients to reduce waste\n- **Location Awareness**: Incorporates local and regional cuisine based on your location\n- **Multiple Plan Management**: Save and access previous meal plans\n\n#### Meal Plan Actions:\n\n- **One-Click Generation**: Create new plans with a single click\n- **Recipe Details**: Drill down into any meal for detailed information\n- **Grocery List Integration**: Add entire days or specific meals to your grocery list\n- **Interactive Management**: Edit, delete or save meal plans in your collection\n\n## 🛠️ Technology Stack\n\n### Frontend\n- **React.js**: Core UI library for building component-based interfaces\n- **React Router**: Advanced routing with HashRouter for GitHub Pages compatibility\n- **Context API**: Global state management for user data and preferences\n- **React Hooks**: Functional component state and lifecycle management\n- **LocalStorage API**: Client-side data persistence\n- **SessionStorage API**: Temporary session data management\n\n### Backend\n- **Spring Boot**: Java-based backend framework\n- **Spring MVC**: RESTful API controllers\n- **JDBC Template**: Database operations\n- **BCrypt**: Password encryption\n- **Spring Security**: Authentication handling\n- **Cohere API Integration**: AI recipe generation with command-a-03-2025 model\n\n### Database\n- **MySQL/MariaDB**: Relational database for data persistence\n- **Entity Tables**:\n  - `users`: User account information and security questions\n  - `saved_recipe`: Stored user recipes with nutritional data\n  - `grocery_list`: User grocery items with categories\n  - `recipe_logs`: History of recipe generation requests\n  - `meal_plans`: Weekly meal planning data\n  - `profile`: User profile and preferences\n  - `api_usage_logs`: API request tracking\n\n### External APIs\n- **Cohere API**: AI-powered recipe generation\n- **Pixabay API**: High-quality recipe images\n- **OpenStreetMap**: Restaurant location data\n\n## 📦 Installation \u0026 Setup\n\n### Prerequisites\n- Node.js (v14.0.0 or later)\n- npm (v6.0.0 or later)\n- Java 17 or later\n- Maven\n- MySQL/MariaDB Database\n\n### Frontend Setup\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/Shubhodippal/NutriSift.git\n   cd nutri-sift/Frontend\n   ```\n\n2. **Install dependencies**:\n   ```bash\n   npm install\n   ```\n\n3. **Create environment variables**:\n   Create a .env file in the root directory with the following content:\n   ```\n   REACT_APP_PIXABAY_API_KEY=your_pixabay_api_key_here\n   REACT_APP_API_BASE_URL=http://localhost:8080\n   REACT_APP_RECIPE_SEARCH_ENDPOINT=/recipe/search\n   REACT_APP_API_KEY_HEADER=your_api_key_header\n   REACT_APP_API_KEY=your_api_key_value\n   ```\n\n4. **Start the development server**:\n   ```bash\n   npm start\n   ```\n\n5. **Build for production**:\n   ```bash\n   npm run build\n   ```\n\n### Backend Setup\n\n1. **Navigate to the backend directory**:\n   ```bash\n   cd nutri-sift/Backend/demo\n   ```\n\n2. **Create the application properties file**:\n   `src/main/resources/application.properties`:\n   ```\n   spring.application.name=Nutrisift\n   spring.datasource.url=jdbc:mariadb://\u003cDB_HOST\u003e:\u003cDB_PORT\u003e/\u003cDB_NAME\u003e\n   spring.datasource.username=\u003cDB_USERNAME\u003e\n   spring.datasource.password=\u003cDB_PASSWORD\u003e\n   spring.datasource.driver-class-name=org.mariadb.jdbc.Driver\n   spring.jpa.show-sql=true\n   \n   spring.jpa.hibernate.ddl-auto=none\n   spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect\n   \n   # JWT Configuration\n   jwt.secret=\u003cYOUR_JWT_SECRET\u003e\n   jwt.expiration=86400000\n   \n   # Allow connections from external devices\n   server.address=0.0.0.0\n   \n   # Cohere API Key\n   cohere.api.key=\u003cYOUR_COHERE_API_KEY\u003e\n\n   # Email Configuration\n   email.host=outgoing_server\n   email.port=port_number\n   email.username=web_mail_id\n   email.password=web_mail_password\n   email.ssl=true\n\n   # Add this to your existing properties\n   api.key=your_api_key_value\n   api.header.name=your_api_key_header\n   ```\n\n3. **Build the application**:\n   ```bash\n   mvn clean package\n   ```\n\n4. **Run the application**:\n   ```bash\n   java -jar target/demo-0.0.1-SNAPSHOT.jar\n   ```\n\n### Database Setup\n\n1. **Install and Configure MariaDB/MySQL**:\n   ```bash\n   # For Ubuntu/Debian\n   sudo apt update\n   sudo apt install mariadb-server\n   \n   # For Windows\n   # Download and install from https://mariadb.org/download/\n   ```\n\n2. **Secure your installation**:\n   ```bash\n   sudo mysql_secure_installation\n   ```\n\n3. **Create the database and user**:\n   ```sql\n   CREATE DATABASE NUTRISIFT;\n   CREATE USER 'nutrisift_user'@'localhost' IDENTIFIED BY 'your_strong_password';\n   GRANT ALL PRIVILEGES ON NUTRISIFT.* TO 'nutrisift_user'@'localhost';\n   FLUSH PRIVILEGES;\n   ```\n\n4. **Import the schema**:\n   ```bash\n   mysql -u nutrisift_user -p NUTRISIFT \u003c nutrisift_schema.sql\n   ```\n\n## 📡 API Documentation\n\n### User Authentication\n- `POST /users/register` - Register new user\n- `POST /users/login` - User login\n- `GET /users/security-question?email={email}` - Get security question for password recovery\n- `POST /users/verify-answer` - Verify security question answer\n- `POST /users/reset-password` - Reset user password\n- `POST /users/refresh-token` - Refresh JWT token\n- `POST /users/otp` - Generate one-time password\n\n### Recipe Management\n- `POST /recipe` - Generate recipe from ingredients using AI\n- `POST /recipe/search` - Search for recipes with filters\n- `GET /recipes/{id}` - Get recipe by ID\n- `GET /recipe/user/{uid}` - Get all saved recipes for a user\n- `POST /recipe/save` - Save a recipe\n- `DELETE /recipe/{id}` - Delete a recipe\n- `POST /recipe/meal-plan` - Generate weekly meal plan\n- `GET /recipe/meal-plans/{uid}/{mail}` - Get user's meal plans\n- `DELETE /recipe/del_meal-plan/{id}` - Delete a meal plan\n\n### Grocery List Management\n- `GET /grocerylist/{userId}` - Get user's grocery list\n- `POST /grocerylist/{userId}` - Save grocery list\n- `DELETE /grocerylist/{userId}` - Delete grocery list\n- `PUT /grocerylist/item/{itemId}` - Update grocery item\n- `DELETE /grocerylist/item/{itemId}` - Delete grocery item\n\n### User Profile\n- `POST /users/profile` - Create user profile\n- `GET /users/profile/{email}` - Get user profile\n- `PUT /users/profile/{email}` - Update user profile\n\n## 📱 Detailed Usage Guide\n\n### Home Page\nThe home page serves as the central hub for navigating the application:\n- Access key features through visual navigation cards\n- View recently accessed recipes\n- Manage your account\n\n### Recipe Chat\nThe AI-powered recipe generation interface:\n1. Begin by entering ingredients you have available\n2. Receive a complete recipe with:\n   - Recipe title and description\n   - Ingredient list with quantities\n   - Step-by-step instructions\n   - Nutritional information\n   - Origin and cuisine type\n3. Save, print, or share the recipe\n\n### Discover Recipes\nBrowse and search for recipes with advanced filtering:\n1. Use the search bar for recipes with specific ingridients\n2. Filter by calorie range, diet type, origin, course, and cuisine style\n3. View results in a visual grid\n4. Perform actions like saving, viewing details, or adding to grocery list\n\n### Saved Recipes\nYour personal recipe library:\n1. View your collection of saved recipe\n2. Search your saved recipes\n3. Perform actions on your recipes like viewing details, or adding to grocery list\n\n### Grocery List\nIntelligent shopping assistant:\n1. View items by category\n2. Check/uncheck items as you shop\n3. Edit quantities or add custom items\n4. Print or share your list\n5. Access your list across devices\n6. Manage grocery list (edit, print, check, delete)\n\n### Profile Details\nComplete your personal profile for personalized recommendations:\n1. Enter basic information (name, weight, height, gender, date of birth)\n2. Specify your dietary preferences (vegetarian, vegan, keto, etc.)\n3. Set your body goals (weight loss, maintenance, muscle gain)\n4. List food allergies and restrictions\n5. Provide location information for localized recommendations\n\n### Personalized Meal Planner\nAI-powered weekly meal planning customized to your profile:\n1. Generate complete 7-day meal plans with breakfast, lunch, dinner and snacks\n2. View nutritionally balanced meals tailored to your dietary preferences\n3. Access meal details including ingredients, instructions, and nutritional information\n4. Save, print, or share individual recipes\n5. Add ingredients directly to your grocery list\n6. Manage multiple meal plans (save, print, delete)\n7. Cycle through previous plans to reuse favorite combinations\n\n### Nearby Restaurants\nDiscover dining options in your vicinity:\n1. View interactive map showing restaurants near your location\n2. Filter by restaurant type (general, fast food, café, etc.)\n3. Adjust search radius to expand or narrow your options\n4. View details for each restaurant (name, distance, address)\n5. Access restaurant direction\n6. Enter location manually if GPS is inaccurate\n\n## 💻 Development Guide\n\n### Available Scripts\n\n#### Frontend\n- `npm start` - Run the development server on http://localhost:3000\n- `npm test` - Launch the test runner\n- `npm run build` - Build the app for production to the build folder\n\n#### Backend\n- `mvn spring-boot:run` - Run the Spring Boot application on http://localhost:8080\n- `mvn clean package` - Build the application\n\n\n## 📜 License\n\nThis software is licensed under a **Non-Commercial License**.  \nYou are free to use, copy, and modify it for personal, educational, and research purposes.  \n**Commercial use is strictly prohibited.**  \nSee the LICENSE file for full terms.\n\n## 👨‍💻 Developed By\n\nNutriSift was designed and developed by Shubhodip Pal.\n\nGitHub: [Shubhodippal](https://github.com/Shubhodippal)  \nLinkedIn: [Shubhodip Pal](https://www.linkedin.com/in/shubhodip-pal/)  \nEmail: shubhodippal01@gmail.com\n\n## 👥 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\nFor major changes, please open an issue first to discuss what you would like to change.\n\n## ⚠️ Disclaimer\n\nRecipe images and restaurant images are provided for reference only and may not exactly match the reality. Nutritional information is approximate and should not be used for medical purposes. Always verify ingredients for allergens and dietary restrictions. NutriSift is not responsible for any adverse reactions to recipes or cooking mishaps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshubhodippal%2Fnutrisift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshubhodippal%2Fnutrisift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshubhodippal%2Fnutrisift/lists"}