Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

jerkeeler/aoestats-frontend

Repository files navigation

aoestats.io is relaunched! Head over to the other repo to report any issues and see project planning.

aoestats-frontend

This is the frontend for aoestats.io. The entire site is a single page app written using React and GatsbyJS. This allows for the ultimate flexibility in user performance and SEO. I've also opt'd to make this a client only application in order to reduce hosting cost and provide a better experience for overseas users by distributing all static files on a CDN. Right now host is done on Netlify, however I've thought about switching to Vercel for unlimited bandwidth.

Developing

In order to develop this application you will need a postgres database setup. View the Database Schema section for what the DB should like.

To set up your dev environment:

  1. Ensure that you have NodeJS at least version 12
    • I would recommend using nvm to manage your node versions
  2. Clone this repo
  3. Copy .env.example to .env and fill in the values appropriately for your DB
  4. Run npm i
  5. Run npm run develop
  6. Visit http://localhost:8001 to view the

Database Schema

Your postgres database must have the following tables:

  • de_civilizationstats
  • de_filter
  • de_mapstats
  • de_match
  • de_matchplayer
  • de_playerprofile

The schemas for these tables are still private, but will be released in due order, when I have APIs to expose this data directly.

Deploying

To deploy this:

  1. Install the netlify cli and set it up
  2. Link your local repo with your netlify project
  3. Run npm run deploy to make a test deploy, verify everything looks good
  4. Run npm run deploy:prod to deploy to production