This project is built on a relational database schema, utilizing advanced SQL query techniques and extensive preprocessing to adapt tables for various use cases. The backend and frontend work seamlessly together to present statistics to users in a visually appealing and interactive manner.
For more details about the project, including in-depth explanations and user interface designs, check out our project report.
If you want to run the project on your local machine, follow the instructions below.
- MySQL (9.1 recomended): Ensure MySQL is installed on your machine. If not, download and install it from the official website.
- Node.js and npm: Required for the frontend setup. Download and install them from the official Node.js website.
- Python (3.12 recomended): Required for the backend setup. Download and install it from the official Python website.
-
You can download the required CSV files from the following link: Google Drive - CSV Files. Put these CSV files in the folder specified in the
table_initialization/load_tables.sql
file. If you are using a different version of MySQL, update the file paths in the SQL file accordingly. -
Create a database in MySQL with the following command:
CREATE DATABASE BASKETBALL;
-
Run the SQL scripts in the following order:
backend/table_initialization/create_tables.sql
backend/table_initialization/load_tables.sql
backend/table_initialization/prepare_for_foreign_keys.sql
backend/table_initialization/foreign_keys.sql
-
Navigate to the
backend
directory:cd backend
-
Change
app/config.py
according to your mysql username and password. -
Install the required Python packages:
pip install -r requirements.txt
-
Start the backend server:
waitress-serve --port=5000 run:app
-
Open a new terminal and navigate to the
frontend/basketball-stats
directory:cd frontend/basketball-stats
-
Install the required npm packages:
npm install
-
Build the frontend:
npm run build
-
Start the frontend in release mode:
npm run start
With these steps completed, both the backend and frontend should be running, and the project will be fully operational!