DietGPT - Your friendly pidgin ai diet assistant
An AI project that utilizes the ChatGPT API but fully customized to only respond to health and diet related prompts. DietGPT is a web application that generates personalized diet plans based on user preferences and dietary restrictions. It uses the GPT-3 language model to generate meal plans and recipes that meet the user's needs. The application is built with Next.js, Tailwind CSS, OpenAI, NextAuth and Prisma ORM.
DietGPT was inspired by a personal need for quick and healthy meal ideas. As busy professionals with busy schedules, we found it difficult to consistently make nutritious meals for ourselves and our families. We wanted a solution that was convenient, accessible, and tailored to our specific dietary needs and preferences. This project was developed as a Portfolio Project for ALX SE Program, as part of our training to become full-stack software engineers. I am proud to have developed a solution that addresses a common problem for many people, and I hope that this chatbot will help others eat healthier and save time in the kitchen.
git clone https://github.com/umohpyro/DietGPT.git
cd DietGPT
npm install
# ------------------------
# NextAuth.js Configuration
# ------------------------
NEXTAUTH_SECRET=secret
NEXTAUTH_URL=http://localhost:3000
# ------------------------
# OAuth Providers
# ------------------------
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# ------------------------
# Database
# ------------------------
DATABASE_URL=
# ------------------------
# OpenAI
# ------------------------
OPENAI_API_KEY=
# ------------------------
# Redis
# ------------------------
REDIS_URL=
REDIS_SECRET=
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
- Create an account or log in with an existing account
- Enter your dietary preferences and restrictions
- Click the button
- View your personalized diet plan and recipes
Contributions are welcome! To contribute, follow these steps:
- Fork the repository
- Create a new branch
git checkout -b feature/<feature-name>
- Commit your changes
git commit -m "Add some feature"
- Push to the branch
git push origin feature/<feature-name>
- Open a pull request
-
Rate Limited API routes
-
Protection of sensitive routes
-
Google authentication
-
Typescript
-
A complete API key system to create & revoke user keys
-
Radix UI Primitives
-
Tailwind CSS
-
Fonts with next/font
-
Icons from Lucide
-
Beautiful dark mode with next-themes
-
Class merging with taiwind-merge
-
Animation with tailwindcss-animate
-
Conditional classes with clsx
-
Variants with class-variance-authority
ChatGPT
If you have any feedback, please reach out to me at andemumoh@gmail.com