Chef GPT is a web application that suggests recipes based on the ingredients you have on hand. It leverages the Hugging Face API to generate recipe recommendations in markdown format, making it easy to render on a web page.
- Ingredient Management: Add and list ingredients you have.
- Recipe Generation: Generate recipes based on the ingredients provided.
- Loading Indicator: Visual feedback while the recipe is being generated.
- React: For building the user interface.
- Vite: For fast development and build tooling.
- Hugging Face API: For generating recipe recommendations.
- ESLint: For maintaining code quality.
- Node.js (v14 or higher)
- npm (v6 or higher)
- Clone the repository:
git clone https://github.com/yourusername/chef-gpt.git
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Build the application for production:
npm run build
- Preview the production build:
npm run preview
- Run ESLint to check for code quality issues:
npm run lint
- App.jsx: Main application component.
- components: Contains React components like Header, IngredientsList, Loader, Main, and Recipe.
- ai.js: Contains the logic for interacting with the serverless function.
- get-recipe.js: Serverless function to handle API requests securely.
- index.jsx: Entry point for the React application.
- index.css: Global styles for the application.
- vite.config.js: Configuration for Vite.
- eslint.config.js: Configuration for ESLint.
The Hugging Face access token is managed through environment variables configured on Vercel. Ensure you set the HF_ACCESS_TOKEN variable in your Vercel project settings.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.
Thank you for checking out Chef GPT! We hope you find it useful and fun to use. Happy cooking!