Skip to content
/ core Public
forked from odota/core

OpenDota Core: An open source Dota 2 data platform

License

Notifications You must be signed in to change notification settings

vamo89/core

 
 

Repository files navigation

core

Discord

Overview

  • This project provides an open platform (backend) with Dota-related data (matches, players, etc.)
  • 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.

Tech Stack

  • Web/Microservices: Node.js
  • Storage: PostgreSQL/Redis/Cassandra
  • Parser: Java (powered by clarity)

Quickstart (Docker)

Running the server

  • 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 .env
    • STEAM_API_KEY You need this in order to access the Steam Web API.
    • STEAM_USER, STEAM_PASS The retriever requires a Steam account in order to fetch replay salts. It is recommended to use a new account for this purpose (you won't be able to log into the account while the retriever is using it). If you don't care about getting replay salts/downloading replays then you can skip this step.
  • Start containers and initialize databases: docker-compose up.
  • You can now access the website at http://localhost:5000 (or the hostname of the instance running the code)

Developing the server

  • File changes you make outside the container should be automatically mirrored to the container.
  • Make some changes and commit them: git add --all; git commit -m "My first commit!"
  • Submit a pull request. Wait for it to be reviewed and merged.
  • Congratulations! You're a contributor.

Other information

  • Get a terminal into the running container: docker exec -it odota-core bash
  • The process manager pm2 is used to manage the individual services. Each is run as a single Node.js process.
    • pm2 list See the currently running services.
    • pm2 start manifest.json Start all the services.
    • pm2 start svc/web.js --watch This starts a specific service and watches it for changes.
    • pm2 logs web Inspect the output of a service.
    • pm2 delete all Stop and remove all the services.
  • Tests
    • npm test runs the full test suite. Use mocha for more fine-grained control over the tests you want to run.
  • Get some starter data
    • You can request some parses by ID to get some parsed data.
    • You can also run scanner to get some matches from the API.

Getting Help

History

About

OpenDota Core: An open source Dota 2 data platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.8%
  • HTML 26.7%
  • CSS 3.2%
  • Shell 2.3%