HealthBud is a comprehensive sports injury prediction system that leverages machine learning to predict potential injuries based on athlete data. The system uses a microservices architecture with Kafka for real-time data processing and Flask for the web interface.
- Real-time injury prediction using machine learning models
- RESTful API endpoints for data management
- Kafka-based event streaming for data processing
- MySQL database for persistent storage
- Interactive web interface for data visualization
- Coach and athlete management system
- Python 3.8 or higher
- MySQL Server
- Apache Kafka
- Virtual environment (recommended)
- Clone the repository:
git clone https://github.com/yourusername/healthbud.git
cd healthbud- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up the database:
mysql -u your_username -p < coachdatabase.sql- Configure environment variables:
Create a
.envfile in the root directory with the following variables:
DB_HOST=localhost
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=healthbud
KAFKA_BOOTSTRAP_SERVERS=localhost:9092
- Start the Kafka consumer:
python kafka_consumer.py- Start the Flask application:
python flask_app.py- Start the Kafka producer (in a separate terminal):
python kafka_producer.pyThe application will be available at http://localhost:5000