Skip to content

Highlander Health is a full-stack web app that generates personalized meal plans for UCR students based on their metrics and the dining hall menu. It features a modern HTML/CSS/JavaScript frontend and a Python/Flask backend with GPT-4o, Beautiful Soup, and Pandas for real-time nutrition guidance.

Notifications You must be signed in to change notification settings

androodo/HighlanderHealth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐻 Highlander Health

UCR Bear Logo

AI-Powered Personalized Meal Plans for UCR Students

UCR Highlanders Python Flask OpenAI


📸 Screenshot

Highlander Health Screenshot


🎯 Overview

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.

✨ Features

  • 🍽️ 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

🛠️ Tech Stack

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

🚀 Quick Start

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/androodo/HighlanderHealth.git
    cd HighlanderHealth
  2. Create virtual environment

    python -m venv venv
    
    # Windows
    venv\Scripts\activate
    
    # macOS/Linux
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. 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
  5. Run the application

    python app.py
  6. Open in browser

    http://127.0.0.1:5000
    

📁 Project Structure

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

🔧 Configuration

Environment Variables

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

🎨 UCR Branding

This app is designed with official UCR colors:

  • UCR Blue: #003DA5
  • UCR Gold: #FFB81C

📝 API Endpoints

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

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is open source and available under the MIT License.


🙏 Acknowledgements

  • 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

About

Highlander Health is a full-stack web app that generates personalized meal plans for UCR students based on their metrics and the dining hall menu. It features a modern HTML/CSS/JavaScript frontend and a Python/Flask backend with GPT-4o, Beautiful Soup, and Pandas for real-time nutrition guidance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors