{"id":31040430,"url":"https://github.com/rahulrmcoder/pantrypal","last_synced_at":"2025-09-14T08:40:33.212Z","repository":{"id":296263035,"uuid":"992713436","full_name":"RahulRmCoder/pantrypal","owner":"RahulRmCoder","description":"Your intelligent kitchen companion that generates personalized recipes based on your dietary preferences, cuisine choices, and available ingredients.","archived":false,"fork":false,"pushed_at":"2025-05-29T18:45:21.000Z","size":1471,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-29T19:52:05.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RahulRmCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-29T15:40:39.000Z","updated_at":"2025-05-29T18:45:25.000Z","dependencies_parsed_at":"2025-05-29T19:52:12.851Z","dependency_job_id":null,"html_url":"https://github.com/RahulRmCoder/pantrypal","commit_stats":null,"previous_names":["rahulrmcoder/pantrypal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RahulRmCoder/pantrypal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2Fpantrypal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2Fpantrypal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2Fpantrypal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2Fpantrypal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RahulRmCoder","download_url":"https://codeload.github.com/RahulRmCoder/pantrypal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2Fpantrypal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275081662,"owners_count":25402336,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-09-14T08:40:31.480Z","updated_at":"2025-09-14T08:40:33.157Z","avatar_url":"https://github.com/RahulRmCoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PantryPal 🍳\r\n\r\nYour intelligent kitchen companion that generates personalized recipes based on your dietary preferences, cuisine choices, and available ingredients.\r\n\r\n## 🌟 Features\r\n\r\n- **Personalized Recipe Generation**: Get 6 unique recipes tailored to your preferences\r\n- **Dietary Restrictions Support**: Vegetarian, Non-vegetarian, Vegan, and Eggetarian options\r\n- **Multiple Cuisine Types**: North Indian, South Indian, Western, Arabic, and Chinese\r\n- **Ingredient-Based Suggestions**: Add your available ingredients and get recipes using only what you have\r\n- **Detailed Instructions**: Step-by-step cooking instructions with timings and temperatures\r\n- **Nutrition Information**: Calories, protein, carbs, and fat content for each recipe\r\n- **Beautiful UI**: Modern, responsive design with smooth animations\r\n- **Smart AI Integration**: Powered by Google's Gemini AI for intelligent recipe creation\r\n\r\n## 📸 Screenshots\r\n\r\n### Home Page - Diet Preference Selection\r\nThe app starts by asking your dietary preferences with beautiful option cards.\r\n\r\n![PantryPal](screenshots/1.png)\r\n\r\n### Cuisine Selection\r\nChoose from 5 different cuisine types to match your taste.\r\n\r\n![React](screenshots/second.png)\r\n\r\n### Ingredient Input\r\nAdd all available ingredients with an intuitive tag-based interface.\r\n\r\n![Node.js](screenshots/3.png)\r\n\r\n### Recipe Results\r\nView 6 personalized recipes with expandable cards showing full details.\r\n\r\n![Gemini API](screenshots/4.1.png)\r\n\r\n## 🚀 Tech Stack\r\n\r\n### Frontend\r\n- **React.js** - UI library\r\n- **React Router** - Navigation\r\n- **Axios** - HTTP client\r\n- **Lucide React** - Icons\r\n- **CSS3** - Styling with animations\r\n\r\n### Backend\r\n- **Node.js** - Runtime environment\r\n- **Express.js** - Web framework\r\n- **Google Generative AI** - Gemini API for recipe generation\r\n- **CORS** - Cross-origin resource sharing\r\n- **dotenv** - Environment variable management\r\n\r\n## 📋 Prerequisites\r\n\r\nBefore you begin, ensure you have the following installed:\r\n- Node.js (v14 or higher)\r\n- npm or yarn\r\n- A Google Cloud account with Gemini API access\r\n\r\n## 🛠️ Installation\r\n\r\n1. **Clone the repository**\r\n   ```bash\r\n   git clone https://github.com/RahulRmCoder/pantrypal.git\r\n   cd pantrypal\r\n   ```\r\n\r\n2. **Install Backend Dependencies**\r\n   ```bash\r\n   cd server\r\n   npm install\r\n   ```\r\n\r\n3. **Install Frontend Dependencies**\r\n   ```bash\r\n   cd ../client\r\n   npm install\r\n   ```\r\n\r\n4. **Set up environment variables**\r\n\r\n   Create a `.env` file in the `server` directory:\r\n   ```env\r\n   GEMINI_API_KEY=your_gemini_api_key_here\r\n   PORT=5000\r\n   ```\r\n\r\n   Create a `.env` file in the `client` directory (optional):\r\n   ```env\r\n   REACT_APP_API_URL=http://localhost:5000/api\r\n   ```\r\n\r\n## 🔑 Getting Gemini API Key\r\n\r\n1. Go to [Google AI Studio](https://makersuite.google.com/app/apikey)\r\n2. Sign in with your Google account\r\n3. Click on \"Get API key\" or \"Create API key\"\r\n4. Select the project \"Gemini API\" when prompted\r\n5. Copy the generated API key\r\n6. Add it to your `server/.env` file\r\n\r\n## 💻 Running the Application\r\n\r\n1. **Start the Backend Server**\r\n   ```bash\r\n   cd server\r\n   npm run dev\r\n   ```\r\n   The server will start on `http://localhost:5000`\r\n\r\n2. **Start the Frontend Application**\r\n   ```bash\r\n   cd client\r\n   npm start\r\n   ```\r\n   The app will open in your browser at `http://localhost:3000`\r\n\r\n## 📁 Project Structure\r\n\r\n```\r\npantrypal/\r\n├── client/                    # React frontend\r\n│   ├── public/               # Static files\r\n│   ├── src/\r\n│   │   ├── components/       # React components\r\n│   │   │   ├── Logo.js\r\n│   │   │   ├── DietPreference.js\r\n│   │   │   ├── CuisineSelection.js\r\n│   │   │   ├── IngredientInput.js\r\n│   │   │   ├── RecipeResults.js\r\n│   │   │   └── RecipeCard.js\r\n│   │   ├── pages/           # Page components\r\n│   │   │   ├── Home.js\r\n│   │   │   └── Results.js\r\n│   │   ├── services/        # API services\r\n│   │   │   └── api.js\r\n│   │   ├── App.js\r\n│   │   ├── App.css\r\n│   │   └── index.js\r\n│   └── package.json\r\n├── server/                   # Node.js backend\r\n│   ├── routes/              # API routes\r\n│   │   └── recipes.js\r\n│   ├── services/            # Business logic\r\n│   │   └── geminiService.js\r\n│   ├── server.js            # Express server\r\n│   └── package.json\r\n└── README.md\r\n```\r\n\r\n## 🎯 How to Use\r\n\r\n1. **Select Diet Preference**: Choose from Vegetarian, Non-vegetarian, Vegan, or Eggetarian\r\n2. **Choose Cuisine Type**: Pick your preferred cuisine style\r\n3. **Add Ingredients**: Enter all available ingredients in your pantry\r\n4. **Generate Recipes**: Click \"Generate Recipes\" to get 6 personalized recipes\r\n5. **View Details**: Click on recipe cards to see detailed instructions and nutrition info\r\n\r\n## 🔧 API Endpoints\r\n\r\n### Generate Recipes\r\n- **URL**: `/api/recipes/generate`\r\n- **Method**: `POST`\r\n- **Body**:\r\n  ```json\r\n  {\r\n    \"dietPreference\": \"vegetarian\",\r\n    \"cuisine\": \"north-indian\",\r\n    \"ingredients\": [\"rice\", \"tomatoes\", \"onions\", \"spices\"]\r\n  }\r\n  ```\r\n- **Response**: Array of 6 recipe objects with details\r\n\r\n## 🎨 Customization\r\n\r\n### Styling\r\n- All styles are in `client/src/App.css`\r\n- Color scheme uses purple/indigo gradients\r\n- Fully responsive design\r\n\r\n### Adding New Cuisines\r\n1. Update `CuisineSelection.js` component\r\n2. Add new cuisine option to the options array\r\n\r\n### Adding New Diet Types\r\n1. Update `DietPreference.js` component\r\n2. Add new diet option to the options array\r\n3. Update the prompt in `geminiService.js` if needed\r\n\r\n## 🐛 Troubleshooting\r\n\r\n### Common Issues\r\n\r\n1. **API Key Error**\r\n   - Ensure your Gemini API key is valid\r\n   - Check that the `.env` file is in the `server` directory\r\n   - No quotes around the API key in `.env`\r\n\r\n2. **CORS Error**\r\n   - Make sure both frontend and backend are running\r\n   - Check the proxy setting in `client/package.json`\r\n\r\n3. **Recipe Generation Failed**\r\n   - Verify internet connection\r\n   - Check API key validity\r\n   - Ensure at least 3 ingredients are added\r\n\r\n### Debug Mode\r\n\r\nAdd these to your `server/server.js` for debugging:\r\n```javascript\r\nconsole.log('API Key loaded:', !!process.env.GEMINI_API_KEY);\r\n```\r\n\r\n## 📝 Environment Variables\r\n\r\n### Server\r\n- `GEMINI_API_KEY` - Your Google Gemini API key (required)\r\n- `PORT` - Server port (default: 5000)\r\n\r\n### Client\r\n- `REACT_APP_API_URL` - Backend API URL (default: http://localhost:5000/api)\r\n\r\n## 🤝 Contributing\r\n\r\n1. Fork the project\r\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\r\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\r\n4. Push to the branch (`git push origin feature/AmazingFeature`)\r\n5. Open a Pull Request\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under the MIT License - see the LICENSE file for details.\r\n\r\n## 🙏 Acknowledgments\r\n\r\n- Google Gemini AI for powering recipe generation\r\n- React.js community for the excellent framework\r\n- Lucide React for beautiful icons\r\n\r\n## 📞 Support\r\n\r\nFor support, email rahulrajasekharanmenon64325@gmail.com or open an issue in the GitHub repository.\r\n\r\n---\r\n\r\nMade with ❤️ by [Rahul Rajasekharan Menon]\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Fpantrypal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulrmcoder%2Fpantrypal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Fpantrypal/lists"}