MLB StatHub is a full-stack web application where users can sign up, log in, and follow their favorite MLB players. Users will receive personalized highlights of the games they select in text, audio, or video formats. The application uses Flask for the backend API and React for the frontend UI.
The app supports multiple languages (English, Spanish, Japanese) and allows users to follow players, view player profiles, and manage their own preferences.
- Flask: Micro web framework for Python.
- PostgreSQL: Relational database for storing user and player data.
- JWT (JSON Web Tokens): For user authentication and authorization.
- Flask-CORS: To enable Cross-Origin Resource Sharing.
- Flask-Bcrypt: For password hashing and verification.
- Axios: For making HTTP requests to external APIs.
- Google Cloud API: For accessing MLB data through Google's cloud services and data feeds.
- Cloud Translation API: For translating webpages
- React Context API (or Redux): For managing application state across components.
- React Router: For navigating between pages in the React app.
- User Authentication: Sign up, log in, and JWT token-based authentication.
- Player Management: Add/remove MLB players to follow.
- Personalized Highlights: Get personalized content (text, audio, video) based on followed players.
- Multi-Language Support: English, Spanish, and Japanese.
- Modern UI: Built with React and Tailwind CSS for a responsive and attractive design.
This application uses data from the Google Cloud x MLB API, which provides live MLB game data and player statistics.
To access live MLB data, the project integrates the MLB StatsAPI. Here's how to use it:
- Get Game Information:
https://statsapi.mlb.com/api/v1.1/game/{game_pk}/feed/live
For more information, visit: https://github.com/MajorLeagueBaseball/google-cloud-mlb-hackathon
Before running the project, ensure you have the following installed:
- Node.js (Recommended version: >=14.x)
- npm or yarn (Package managers)
- Python 3.x
- PostgreSQL (or another preferred database)
- pip (for installing Python dependencies)
- Clone the repository to your local machine:
git clone git@github.com:Rachel-XMR/MLB-StatHub.git cd Google-Cloud-x-MLB-Project/app - Install the required dependencies:
pip install -r requirements.txt
- Run the Flask Application:
python server.py
- Navigate to the main directory
cd Google-Cloud-x-MLB-Project - Install the required dependencies:
npm install
- Start the React development server:
npm start
This project is licensed under the MIT License - see the LICENSE file for details.
- Deploying PostgreSQL & Flask backend to Render
- Integrating MLB content (footage & audio) with YouTube API and Vertex AI