- ⚡ FastAPI for the Python backend API.
- 🧰 SQLModel for the Python SQL database interactions (ORM).
- 🔍 Pydantic, used by FastAPI, for the data validation and settings management.
- 💾 PostgreSQL as the SQL database.
- 🚀 React for the frontend.
- 💃 Using TypeScript, hooks, Vite, and other parts of a modern frontend stack.
- 🎨 Chakra UI for the frontend components.
- 🤖 An automatically generated frontend client.
- 🦇 Dark mode support.
- 🐋 Docker Compose for development and production.
- 💻 Jupyter for ML develoment
- 🔒 Secure password hashing by default.
- 🔑 JWT token authentication.
- ✅ Tests with Pytest.
- 📞 Traefik as a reverse proxy / load balancer.
You can just fork or clone this repository and use it as is.
✨ It just works. ✨
Tip
docker-compose up -d --build
- First, yo need to create a virtual environment by running
make create_environment
on the root directory of this project please make sure you havemake
installed on your machine before running this command or you can create a virtual environment by runningpython3 -m venv venv
and activate the virtual environment by runningsource venv/bin/activate
- Then, you need to install the dependecies by running
make requirements
on the same directory whererequirements.txt
located - Create
.env
file at the root directory of this project/repo or copy the.env.example
and rename it to.env
- Dota Key is required to run this project. You can get the key by registering at OpenDota and get the key from the profile page.
Important
Crucial please add the make coomand when you create a new command. It will help you to understand the command that you want to run. For example, if you want to get data process you can run make data
all this project is create with Makefile. Thus, you can run the command by using make
command. Here are the list of command that you can use:
-
make data
: This command will run the scrapping process. It will get the data from OpenDota website and store the result to CSV -
make requirements
: This command will install all the dependencies that listed atrequirements.txt
-
make create_environment
: This command will create a virtual environment for this project -
make clean
: This command will remove the virtual environment and all the dependencies that installed on the virtual environment
Important
Crucial please add the make coomand when you create a new command. It will help you to understand the command that you want to run. For example, if you want to get data process you can run make data
.env.example
-> .env
You can then update configs in the .env
files to customize your configurations.
SECRET_KEY
FIRST_SUPERUSER_PASSWORD
POSTGRES_PASSWORD
OPEN_DOTA_KEY
You can (and should) pass these as environment variables from secrets.
Some environment variables in the .env
file have a default value of changethis
.
You have to change them with a secret key, to generate secret keys you can run the following command:
python -c "import secrets; print(secrets.token_urlsafe(32))"
Copy the content and use that as password / secret key. And run that again to generate another secure key.
Backend docs: backend/README.md.
Frontend docs: frontend/README.md.
General development docs: development.md.
This includes using Docker Compose, custom local domains, .env
configurations, etc.
The Dota 2 Analytics is open-sourced software licensed under the MIT license.