AI-Powered Personalized Meal Plans for UCR Students
Highlander Health is a full-stack web application that generates personalized daily meal plans for UC Riverside students based on their unique metrics and the current UCR dining hall menu. The app uses OpenAI's function calling for structured meal plan generation, ensuring accurate and tailored nutrition recommendations.
- 🍽️ Personalized Meal Plans - Get breakfast, lunch, and dinner recommendations tailored to your goals
- 📊 Macro Tracking - See calories, protein, carbs, and fat for each meal
- 🏛️ Multiple Dining Halls - Support for Glasgow, Lothian, AI, and The Barn
- 🤖 AI-Powered - Uses OpenAI function calling for structured, reliable outputs
- 📱 Responsive Design - Beautiful UCR-branded UI that works on any device
- ⚡ Smart Caching - Menu data is cached for fast performance
- 📈 Analytics Ready - PostgreSQL integration for usage tracking
| Category | Technologies |
|---|---|
| Frontend | HTML5, CSS3, JavaScript |
| Backend | Python, Flask, Flask-CORS |
| AI/ML | OpenAI GPT-4 with Function Calling |
| Database | PostgreSQL (optional) |
| Web Scraping | BeautifulSoup4, Requests |
| Data Processing | Pandas |
- Python 3.8+
- OpenAI API Key (Get one here)
-
Clone the repository
git clone https://github.com/androodo/HighlanderHealth.git cd HighlanderHealth -
Create virtual environment
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
# Copy the example file copy env.example .env # Windows cp env.example .env # macOS/Linux # Edit .env and add your OpenAI API key OPENAI_API_KEY=sk-your-api-key-here
-
Run the application
python app.py
-
Open in browser
http://127.0.0.1:5000
HighlanderHealth/
├── app.py # Main Flask application
├── scraper.py # UCR dining hall menu scraper
├── database.py # PostgreSQL database handler
├── requirements.txt # Python dependencies
├── env.example # Environment variables template
├── .gitignore # Git ignore rules
├── static/
│ ├── UCR-bear.png # UCR Highlander bear logo
│ ├── screenshot.png # App screenshot
│ └── ... # Other static assets
└── templates/
└── index.html # Main frontend template
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
✅ Yes | Your OpenAI API key |
DB_HOST |
❌ No | PostgreSQL host (default: localhost) |
DB_PORT |
❌ No | PostgreSQL port (default: 5432) |
DB_NAME |
❌ No | Database name |
DB_USER |
❌ No | Database username |
DB_PASSWORD |
❌ No | Database password |
This app is designed with official UCR colors:
- UCR Blue:
#003DA5 - UCR Gold:
#FFB81C
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Main application page |
/api/generate-meal-plan |
POST | Generate personalized meal plan |
/api/menu |
GET | Get dining hall menu |
/api/dining-halls |
GET | List available dining halls |
/api/stats |
GET | Get usage statistics |
/api/health |
GET | Health check endpoint |
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- UC Riverside - For the amazing dining halls
- OpenAI - For the powerful GPT API
- UCR Dining Services - For providing menu data
Go Highlanders! 🐻💙💛
Built with ❤️ for UCR Students

