MacroMind is an intelligent nutrition tracking system powered by Google's Gemini Pro Language Model. It provides real-time nutritional analysis, tracks daily macro goals, and offers AI-powered nutrition consultation.
- Real-time AI-powered nutritional breakdown
- Automatic calorie calculation
- Protein content analysis
- Running daily totals
- Dynamic calculation of remaining daily allowances
- Personalized macro tracking
- Real-time goal updates
- Detailed food logging
- Timestamp tracking
- Nutritional breakdown history
- Easy data reset
- Flexible history management
- Data persistence
- Expert nutritional guidance
- Context-aware responses
- Personalized dietary advice
-
AI/ML Integration
- Google Gemini Pro API for natural language processing
- Advanced prompt engineering
- Contextual response generation
-
Backend Architecture
- Python-based system
- Flask server for Replit hosting
- Environment variable management
- Threaded server implementation
git clone https://github.com/Khushal-Me/MacroMind.git
pip install -r requirements.txt
- Visit Google AI Studio
- Sign in with your Google account
- Click "Create API Key" or "Get API Key"
- Copy your generated API key
- Go to Discord Developer Portal
- Click "New Application"
- Name your application "MacroMind"
- Navigate to the "Bot" section in the left sidebar
- Click "Reset Token" to reveal your bot token
- Important: Enable "Message Content Intent" under Privileged Gateway Intents
GEMINI_API_KEY=your_gemini_api_key
DISCORD_BOT_TOKEN=your_bot_token
!add [food]- Add food items with AI nutritional analysis!left- Check remaining daily allowances!history- View food log!clear- Reset all data!q [question]- Ask nutrition questions
- Natural language food analysis
- Nutritional content extraction
- Smart response generation
- Error handling and validation
- User-specific tracking
- Daily reset functionality
- Persistent storage
- History management
- Flask-based web server
- Threading for optimal performance
- Continuous operation
- Error recovery systems
Optimized for Replit deployment with:
- Flask server implementation
- Automatic error handling
- Environment variable management
- 24/7 uptime configuration using uptimerobot.com
Contributions are welcome! Feel free to submit Pull Requests.
This project is licensed under the MIT License.
Note: MacroMind is an AI-first application focusing on intelligent nutritional analysis and expert guidance.