Skip to content

diw1/yasp

 
 

Repository files navigation

YASP (Yet Another Stats Page)

Discord

Overview

  • This project provides an open platform 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).
  • Processed data is accessible through a REST API.

Funding

  • Servers for a public deployment of this code are funded by contributions from community members and corporate sponsors.
  • Community developers maintain the codebase without compensation, reducing operating costs.

Tech Stack

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

Quickstart (Docker)

  • Install Docker: curl -sSL https://get.docker.com/ | sh
  • Clone the repo: git clone https://github.com/odota/yasp
  • Go into the directory: cd yasp
  • Start containers and initialize databases: sudo bash scripts/dev.sh
  • 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.
  • Get a terminal into the running container: sudo docker exec -it yasp bash
  • Rebuild inside the container (your local directory hides the built files): npm run build
  • Start the services you want to run:
    • pm2 start profiles/basic.json This starts all the basic services to be able to read the API and request parses (which is a useful end-to-end test). The profiles directory contains common sets of services to be started together.
    • Useful PM2 commands:
      • pm2 start svc/web.js --watch This starts a specific service and watches it for changes.
      • pm2 logs web You can use this command to 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.
  • 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.

Docker Compose

  • Alternatively, if you have Docker Compose installed you can just run docker-compose up.
  • Databases are set up and tables are created automatically.
  • By default, minimal configuration necessary to open the site in a browser and request parses by ID is started. This can be overridden via docker-compose.override.yml.
  • sudo docker exec -it yasp_web_1 bash will give you a terminal into the running web container.

Getting Help

History

About

Open source Dota data platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.2%
  • HTML 24.0%
  • CSS 2.9%
  • Shell 1.9%