Skip to content
/ daiet Public

Web app moderno em Next.js que gera dietas personalizadas usando integração com IA, com interface responsiva, design moderno e integração com Tailwind CSS.

Notifications You must be signed in to change notification settings

offmonte/daiet

Repository files navigation

🥗 DAIET - Personalized Diet Generator

A modern web application developed with Next.js that generates personalized diets using Google Gemini Artificial Intelligence.

✨ Features

  • 📝 Intuitive form for collecting personal data
  • 🎯 Customizable goals (lose weight, gain weight, maintain weight)
  • 🍽️ Flexible meal count configuration (3-6 per day)
  • 🤖 Integration with Google Gemini AI for diet generation
  • 📱 Responsive and modern design with Tailwind CSS
  • ⚡ Fast and interactive interface

🚀 Technologies Used

  • Next.js 15 - React Framework for production
  • TypeScript - Static typing
  • Tailwind CSS - Utility-first CSS Framework
  • Lucide React - Modern icons
  • Google Generative AI - Gemini API
  • React Hooks - State management

📋 Prerequisites

  • Node.js 18+ installed
  • Google Gemini API Key

🛠️ Installation and Configuration

1. Clone or download the project

# If using Git
git clone <repository-url>

# Or extract the downloaded ZIP file

2. Install dependencies

npm install

3. Configure the Gemini API

  1. Access Google AI Studio
  2. Log in with your Google account
  3. Click on "Create API Key"
  4. Copy the generated key

4. Configure environment variables

Edit the .env.local file and replace your_api_key_here with your actual key:

GEMINI_API_KEY=your_actual_api_key_here

5. Run the project

npm run dev

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

📖 How to Use

  1. Fill in your personal data:

    • Weight (kg)
    • Height (cm)
    • Age (years)
  2. Define your goal:

    • Lose weight
    • Gain weight
    • Maintain weight
  3. Choose the number of meals per day (3-6)

  4. Click on "Generate My Diet"

  5. Wait for the AI to process and view your personalized diet!

🎨 Design Features

  • Modern gradients in purple and blue
  • Glassmorphism with blur and transparency effects
  • Smooth animations and micro-interactions
  • Responsive layout for desktop and mobile
  • Intuitive icons for better UX
  • Loading states during processing

📁 Project Structure

gerador-dietas/
├── src/
│   ├── app/
│   │   ├── api/
│   │   │   └── generate-diet/
│   │   │       └── route.ts          # API route for Gemini
│   │   ├── globals.css               # Global styles
│   │   ├── layout.tsx                # Main layout
│   │   └── page.tsx                  # Main page
│   └── ...
├── .env.local                        # Environment variables
├── package.json                      # Dependencies
├── tailwind.config.ts               # Tailwind configuration
└── README.md                        # This file

🔧 Customization

Modify the AI Prompt

Edit the src/app/api/generate-diet/route.ts file in the prompt variable to adjust how the AI generates diets.

Change Colors and Styles

Modify Tailwind classes in src/app/page.tsx or adjust the tailwind.config.ts file.

Add New Fields

  1. Add the field to the FormData interface
  2. Include the input in the form
  3. Update the API prompt to use the new field

🚀 Deploy

Vercel (Recommended)

  1. Push the code to GitHub
  2. Connect the repository on Vercel
  3. Configure the GEMINI_API_KEY environment variable
  4. Automatic deploy!

Other Platforms

The project is compatible with any platform that supports Next.js:

  • Netlify
  • Railway
  • Heroku
  • AWS Amplify

🤝 Contribution

Feel free to contribute with improvements:

  1. Fork the project
  2. Create a branch for your feature
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

📄 License

This project is under the MIT license. See the LICENSE file for more details.

🆘 Support

If you encounter problems:

  1. Check if the Gemini API key is correct
  2. Confirm that all dependencies have been installed
  3. Check the browser console for errors
  4. Open an issue in the repository

Developed with ❤️ using Next.js, Tailwind CSS and Google Gemini AI

About

Web app moderno em Next.js que gera dietas personalizadas usando integração com IA, com interface responsiva, design moderno e integração com Tailwind CSS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •