A modern web application developed with Next.js that generates personalized diets using Google Gemini Artificial Intelligence.
- 📝 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
- 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
- Node.js 18+ installed
- Google Gemini API Key
# If using Git
git clone <repository-url>
# Or extract the downloaded ZIP filenpm install- Access Google AI Studio
- Log in with your Google account
- Click on "Create API Key"
- Copy the generated key
Edit the .env.local file and replace your_api_key_here with your actual key:
GEMINI_API_KEY=your_actual_api_key_herenpm run devThe application will be available at http://localhost:3000
-
Fill in your personal data:
- Weight (kg)
- Height (cm)
- Age (years)
-
Define your goal:
- Lose weight
- Gain weight
- Maintain weight
-
Choose the number of meals per day (3-6)
-
Click on "Generate My Diet"
-
Wait for the AI to process and view your personalized diet!
- 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
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
Edit the src/app/api/generate-diet/route.ts file in the prompt variable to adjust how the AI generates diets.
Modify Tailwind classes in src/app/page.tsx or adjust the tailwind.config.ts file.
- Add the field to the
FormDatainterface - Include the input in the form
- Update the API prompt to use the new field
- Push the code to GitHub
- Connect the repository on Vercel
- Configure the
GEMINI_API_KEYenvironment variable - Automatic deploy!
The project is compatible with any platform that supports Next.js:
- Netlify
- Railway
- Heroku
- AWS Amplify
Feel free to contribute with improvements:
- Fork the project
- Create a branch for your feature
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is under the MIT license. See the LICENSE file for more details.
If you encounter problems:
- Check if the Gemini API key is correct
- Confirm that all dependencies have been installed
- Check the browser console for errors
- Open an issue in the repository
Developed with ❤️ using Next.js, Tailwind CSS and Google Gemini AI