Git Product home page Git Product logo

dereje1 / smart-recipe-generator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 754 KB

Smart Recipe Generator is an AI-powered web app that creates unique recipes based on user-selected ingredients and dietary preferences. Built with Next.js and MongoDB, and deployed on Vercel.

Home Page: https://smart-recipe-generator.vercel.app

JavaScript 0.29% CSS 0.19% TypeScript 99.52%
awss3 mongodb nextjs14 nodejs openai recipe-app recipes typescript

smart-recipe-generator's Introduction

Smart Recipe Generator

Smart Recipe Generator is an AI-powered web application that generates unique and delicious recipes based on user-selected ingredients and dietary preferences. It uses OpenAI for recipe generation and DALL-E for creating appetizing images of the recipes. The application is built using a MERN stack (MongoDB, React, Node.js) and deployed on Vercel.

Features

  • User Authentication: Secure login using Google OAuth with next-auth.
  • AI-Powered Recipe Generation: Generate recipes based on selected ingredients and dietary preferences.
  • Recipe Image Generation: Generate images of the recipes using DALL-E.
  • User Profiles: View and manage your own recipes.
  • Likes System: Like your favorite recipes.
  • Responsive Design: Mobile-friendly and responsive UI.

Tech Stack

  • Frontend: React, Next.js, Tailwind CSS
  • Backend: Node.js, MongoDB
  • Authentication: NextAuth.js with Google OAuth
  • AI Integration: OpenAI for recipe generation, DALL-E for image generation
  • Image Hosting: AWS S3
  • Hosting: Vercel

Installation

Prerequisites

Tool Version Required
Node.js / npm ~20.15.0 / ~10.7.0 โœ…
Git ~2 โœ…
Docker Desktop ~4.4.2
MongoDB Compass ~1.0.0
  1. Clone the Repository:

    git clone https://github.com/Dereje1/smart-recipe-generator.git
    cd smart-recipe-generator
  2. Install Dependencies:

    npm install
  3. Set Up Environment Variables: Create a .env.local file in the root directory and add the following environment variables:

    NEXT_PUBLIC_API_BASE_URL=http://localhost:3000
    NEXTAUTH_URL=http://localhost:3000
    NEXTAUTH_SECRET=your-secret
    GOOGLE_CLIENT_ID=your-google-client-id
    GOOGLE_CLIENT_SECRET=your-google-client-secret
    OPENAI_API_KEY=your-openai-api-key
    AWS_ACCESS_KEY_ID=your-aws-access-key-id
    AWS_SECRET_KEY=your-aws-secret-key
    MONGO_URI=your-mongodb-uri
    S3_BUCKET_NAME=your-s3-bucket-name

    If you wish and have Docker, you can run MongoDB locally using:

    docker-compose up mongodb

    Point your MongoDB URI to:

    mongodb://root:123456@localhost:27018
  4. Run the Development Server:

    npm run dev

    The application will be available at http://localhost:3000.

Usage

  1. Sign In: Log in using your Google account.
  2. Select Ingredients: Choose ingredients from the list.
  3. Generate Recipes: Click the button to generate recipes.
  4. Select Recipes: Choose from the generated recipes to save into your account.
  5. View Recipes: See the generated recipes and their images on the homepage.
  6. Like Recipes: Like your favorite recipes.
  7. Profile: View and manage your recipes in your profile.

Deployment

The application is deployed on Vercel. Follow these steps to deploy:

  1. Login to Vercel: If you don't have an account, sign up at vercel.com.
  2. Import Project: Import your GitHub repository to Vercel.
  3. Configure Environment Variables: Set the environment variables in Vercel's dashboard.
  4. Deploy: Click on Deploy.

Live Demo

Check out the live application here.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

smart-recipe-generator's People

Contributors

dereje1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.