Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.54 KB

File metadata and controls

45 lines (27 loc) · 1.54 KB

Ingredia - GPT-3 recipe generator app

This is a generic recipe generator app based off of the example app used in the OpenAI API quickstart tutorial. It uses the Next.js framework with React and Magic for cookie-based, passwordless authentication with email-based magic links.

How to use

Clone the repository:

git clone git@github.com:MaxSchmitz/ingredia.git

Configuration

Login to the Magic Dashboard and get the keys of your application

Magic Dashboard

Next, copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):

cp .env.local.example .env.local

Then set each variable on .env.local:

  • NEXT_PUBLIC_MAGIC_PUBLISHABLE_KEY should look like pk_test_abc or pk_live_ABC
  • MAGIC_SECRET_KEY should look like sk_test_ABC or sk_live_ABC
  • TOKEN_SECRET should be a string with at least 32 characters

Login to the OpenAI API and get the keys of your application and add to .env.local:

  • OPENAI_API_KEY should be your api key from openapi

Now, run Next.js in development mode

npm run dev
# or
yarn dev

Your app should be up and running on http://localhost:3000!