jerkeeler / aoestats-frontend

GatsbyJS repo for the aoestats frontend
MIT License
15 stars 3 forks source link
ageofempires2 aoe2

DEPRECATED REPO SEE https://github.com/jerkeeler/aoestats-redux-issues

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:

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