Giter VIP home page Giter VIP logo

server's Introduction

WoWAnalyzer

WoWAnalyzer is a tool to help you analyze and improve your World of Warcraft raiding performance through various relevant metrics and gameplay suggestions.

https://wowanalyzer.com

New to Open Source?

This guide is an excellent introduction and explains all the jargon we may use: https://medium.com/clarifai-champions/99-pr-oblems-a-beginners-guide-to-open-source-abc1b867385a

If you ever get stuck or want to have a chat, join us on our Discord server. We love to hear what you're (going to be) working on!

Our docs aren't very good, but we have a really fun and helpful developer community on Discord. So please consider joining and reaching out if you need help. Be bold!

Getting started

First make sure you have the following:

Now you need to pull a copy of the codebase onto your computer. Make a fork of the repo by clicking the Fork button at the top of this page. Next, click the green button Clone or download and copy your Clone with HTTPS URL, and then run the command git clone <paste link>. This will take a minute.

When cloning finishes, open a command window to the source and run the command yarn. This will take a minute or two the first time. While it's running, copy the .env.local.example file in the project root, and name it .env.local. Now you need to fill the WCL API key. To get your key, login to Warcraft Logs and go to your profile. Scroll to the bottom, enter the V1 Client Name "WoWAnalyzer (development)" (this is required) and copy the V1 Client Key, then replace INSERT_YOUR_OWN_API_KEY_HERE in .env.local with this key.

Optionally if you're on a bash compatible machine, you can run scripts/setup for an interactive setup of this application.

Once all that's done you're ready to fire up the development server! Just run the command yarn start in the project root. The first start may take a few minutes as it has to compile everything. This does get cached, so that any code changes while the server is already running will be compiled much quicker.

Docker Alternatively there's a Docker container available so you don't have to install any software other than Git (and your IDE with its dependencies which likely includes Node.js). Follow the above steps, skipping all `yarn` commands, and then fire up the Docker container with docker-compose up dev (first start might take a few minutes). Just like the regular development environment it will automatically recompile your code and refresh your browser whenever you make changes to the code so long as it is running. The app will be available at http://localhost:3000/.

Troubleshooting

If you are getting Error: Invalid key specified, ensure your key is correct in .env.local and restart yarn start after changing the file so the new value is loaded (.env files are cached).

If you are getting an error about a missing module or library you might have to update your dependencies. Run yarn install or docker-compose build dev if you're using the Docker container. Make sure there's no running yarn start or yarn test when you do as they might lock files.

Contributing

See the contributing guidelines for further information.

server's People

Contributors

cheezburgirl avatar dependabot[bot] avatar emallson avatar jazminite avatar martijnhols avatar pewtro avatar scottymcraig avatar testaccount9393 avatar warcraftyax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

server's Issues

Launch PR preview containers to preview changes

I dislike that the time between being excited about an idea, followed by being excited about finishing development of it and then being able to share it with the world is so long due to the PR step. This is not an issue with the reviewers as they're better than anyone could wish for, but any delay more than instant is a bummer. While I'd like to drop the need for PRs, I don't think this is feasible as a broken spec could mean every spec no longer builds. Not to forget the complexity of trust.

We could solve the broken spec issue by splitting the repository up into a separate repository for each spec and one for the core, with the core being a npm package, but this would introduce new challenges with all the content being super distributed. Hard to see what PRs need to be reviewed, and harder to change things simultaneously in core when working on a spec.

My idea is to launch a test server for each PR that built successfully. This would be ready almost immediately (as soon as the build passes) and allows anyone to immediately share their cool new things, ask for feedback, and makes reviewing things easier.

Database backups

The database isn't being backed up right now. This isn't really a big issue since we're only using it to cache WCL API responses to reduce API requests and losing it wouldn't be a huge deal, but plans are to put more interesting and valuable data in there. Need to figure out backups prior to that. I was thinking of making a Docker container that runs mysqldump and stores it to a webdav, shouldn't even be that hard.

Add server side rendering

Analysis could stay client side for the time being if it proves to be hard to implement/resource intensive. Most important is the frontpage.

Automatically unset character data received from Blizzard API to comply with new ToS

  • add blizzardUpdatedAt (nullable datetime) column to Character table using a migration script as per Sequelize best practices
  • add index for blizzardUpdatedAt
  • implement blizzardUpdatedAt in the API
  • figure out what columns are filled with Blizzard data by our character API. See https://github.com/WoWAnalyzer/server/blob/master/src/modules/character/index.js#L47
  • Add a script to this project that sets all data we pulled exclusively from Blizzard back to NULL
    • I think all columns are already nullable, but you need to verify and maybe fix this.
    • The filter is probably something similar to blizzardUpdatedAt>'2020-01-01' AND blizzardUpdatedAt<DATE_SUB(NOW(), INTERVAL 30 DAYS) (2020-01-01 is when they broke their old API).
    • Make a scripts folder in the repo root.
  • Send me a docker run CLI command that I can use to execute the data reset

Timeout API calls to Blizzard (and possibly WCL) after a long time

Right now the Blizzard API is down, but it only times out after 13ish seconds which leads to slow log parses. We should probably force-give up after 5 seconds.

In combination with #2471, timing out requests should eventually (once that's implemented too) be no problem.

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.