- This project provides the OpenDota API for consumption.
- This API powers the OpenDota UI.
- Raw data comes from the WebAPI provided by Valve and fully automated parsing of match replays (.dem files).
- A public deployment of this code is maintained by The OpenDota Project.
- Microservices: Node.js
- Databases: PostgreSQL/Redis/Cassandra
- Parser: Java (powered by clarity)
- Install Docker:
curl -sSL https://get.docker.com/ | sh. If you are on Windows, make sure you shared the working drive with Docker. - Create .env file with required config values in KEY=VALUE format (see config.js for a full listing of options)
cp .env_example .envSTEAM_API_KEYYou need this in order to access the Steam Web API, which is used to fetch basic match data, player profile data, and cosmetic item data. You can use your main account to obtain the API key; it does not have to match the account used for theSTEAM_USERandSTEAM_PASSoptions.STEAM_USER, STEAM_PASSA Steam account is required to fetch replay salts. It is recommended to use a new account for this purpose (you won't be able to use the account on two different hosts at the same time, and the account must not have SteamGuard). This is not required if you don't need to download/parse replays.
- Start containers and initialize databases:
docker-compose up - Make some changes and commit them.
- Submit a pull request. Wait for it to be reviewed and merged.
- Congratulations! You're a contributor.
- The API runs on port 5000 by default.
- File changes made in the host directory get mirrored into the container.
- Get a terminal into the running container:
docker exec -it odota-core bash - The process manager
pm2is used to manage the individual services. Each is run as a single Node.js process. Services get restarted when file changes are detected (watch mode).pm2 listSee the currently running services.pm2 start manifest.jsonStart all the services.pm2 start svc/web.js --watchThis starts a specific service and enables watch mode on it.pm2 logs webInspect the output of a service.pm2 delete allStop and remove all the services.
- Tests are written using the
mochaframework.npm testruns the full test suite.- Use
mochaCLI for more fine-grained control over the tests you want to run.
- Starter data
- You can request some parses by ID to get some parsed data.
- You can also run
scannerto get some matches from the API.
- Join us on Discord (https://discord.gg/0o5SQGbXuWCNDcaF)! We're always happy to help and answer questions.
- The following blog posts may help you understand the codebase/architecture:
- Architecture: https://odota.github.io/blog/2016/05/15/architecture/
- Deployment/Infrastructure: https://odota.github.io/blog/2016/08/10/deployment/
- General Learnings: https://odota.github.io/blog/2016/05/13/learnings/
- Project started in August 2014
- Forked from https://github.com/RJacksonm1/matchurls