MLB Stats Central is a web application that provides comprehensive statistics, player profiles, and game analyses for Major League Baseball. Users can view leaderboards, upcoming games, and the latest news in the baseball world. The application leverages the Langraph framework for efficient tool invocation and workflow management.
Below is the workflow diagram of our MLB agent system built with Langraph:
- Player Statistics: View detailed statistics for players, including batting averages, home runs, and more.
- Team Rankings: Check the rankings of MLB teams based on various metrics.
- Game Analysis: Analyze game highlights and player performances.
- Latest News: Stay updated with the latest news in the MLB.
- User-Friendly Interface: An intuitive and responsive design for a seamless user experience.
- Frontend: React, TypeScript, Tailwind CSS
- Backend: Python, Flask, Langraph
- Database: PostgreSQL
- APIs: MLB API for real-time data
- Agent Framework: Langraph for tool orchestration and workflow management
- Node.js (v14 or higher)
- Python (v3.7 or higher)
- PostgreSQL
- Langraph
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
npm start
- Navigate to the backend directory:
cd backend - Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt pip install langraph
- Set up the database (make sure PostgreSQL is running):
python manage.py db init python manage.py db migrate python manage.py db upgrade
- Start the backend server:
python app.py
- Open your browser and navigate to
http://localhost:3000for the frontend. - The backend API will be available at
http://localhost:5000/api.
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Make your changes and commit them (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the contributors and the open-source community for their support.
- Special thanks to the MLB API for providing real-time data.
For any inquiries, please reach out to [email protected]
