Code Monkey home page Code Monkey logo

opendota-core's Introduction

core

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

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

Quickstart (Docker)

  • 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, which is used to fetch basic match data, player profile data, and cosmetic item data.
    • STEAM_USER, STEAM_PASS A 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). 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.

Notes

  • 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 pm2 is 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 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 enables watch mode on it.
    • pm2 logs web Inspect the output of a service.
    • pm2 delete all Stop and remove all the services.
  • Tests are written using the mocha framework.
    • npm test runs the full test suite.
    • Use mocha CLI 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 scanner to get some matches from the API.

Resources

History

opendota-core's People

Contributors

howardchung avatar albertcui avatar paralin avatar greenkeeperio-bot avatar nicholashh avatar wtfkr0 avatar mvthen avatar rjackson avatar daerdemandt avatar kennsippell avatar vramana avatar mbax avatar aehrraid avatar coreymaher avatar ahockersten avatar mysrt avatar lemongod avatar fhoffa avatar teuneboon avatar onelivesleft avatar promisedlandt avatar michael-the1 avatar mchearty avatar mhartkorn avatar lomash avatar dancek avatar likered avatar wickedplayer494 avatar giller avatar pascalsancho avatar

Watchers

Milan avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.