Giter Site home page Giter Site logo

siegeengineers / aocrecs.com Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 620 KB

Recorded games database website

Home Page: https://aocrecs.com

License: MIT License

HTML 0.56% JavaScript 51.31% Dockerfile 0.16% Python 47.15% CSS 0.82%
python react js graphql async age-of-empires

aocrecs.com's Introduction

aocrecs.com

Code for the website aocrecs.com. Includes both the server component and website interface.

Setup

Define the following environmental variables:

Variable Purpose Example
MGZ_DB URL to MGZ database. postgresql://username:password@localhost:5432/mgzdb
MGZ_GTM Google Tag Manager ID. UA-10051774-7
AWS_ACCESS_KEY_ID AWS access key ID.
AWS_SECRET_ACCESS_KEY AWS secret access key.
VOOBLY_USERNAME Voobly username (to access metadata while uploading).
VOOBLY_PASSWORD Voobly password.

The AWS keys provide access to the S3 bucket storing the compressed recorded games. The Voobly credentials are used to fetch account metadata when adding uploaded matches.

SSL certificate data must exist at data/. Follow the guide here. docker-compose.yaml is pre-configured.

docker-compose build will build all required images.

Deploy

docker-compose up -d will launch three containers:

  • Python server
  • nginx (reverse proxy in front of server; host for static Javascript assets)
  • certbot (for SSL certificate renewal)

Development

Server (python/)

Create a Python virtual environment (Python 3.6+) and enter it: python3 -m venv venv && venv/bin/activate

Install dependencies: pip install -e .

Launch the Python server:

uvicorn aocrecs.main:APP (specify --host and --port as necessary)

UI (js/)

Ensure that node and yarn are installed.

Install dependencies: yarn

Launch the create-react-app development server (from js/):

REACT_APP_API="http://<server_host>:<server_port>/api" REACT_APP_GTM="<gtm_id>" yarn start (set HOSTNAME and PORT as necessary)

Contributions

Pull requests are welcome. If you want to add a feature that requires access to the data, contact me on Discord (happyleaves#4133) to arrange read-only database access.

aocrecs.com's People

Contributors

happyleavesaoc avatar rotzbua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aocrecs.com's Issues

API gateway seems to be down

The API server seems to be down atm.

  • Getting 502 Bad Gateway if I try access: https://aocrecs.com/api
  • The aocrecs website also shows Network error: JSON.parse: ..... on landing page.

Is this a build issue or something else. Let me know if I can help.

Upload multiple files

Implement multi-file uploading for the Upload Page.

It would be easier to populate the DE dataset if we could provide a lot of matches at once.

Map image uses http url

The map preview image is loaded from http instead of https. This leads to a "not secure" indicator in the web browser due to mixed content.

The http url is already present in the api response and seems to stem from here.

I would have provided a pull request, but I could not find out where to fix it ๐Ÿ™โ€โ™‚๏ธ

Add percentages on Most Wins per Map

Hello! First of all I love this project, I'm a web developer and a huge fan of aoe2, thank you for all your work!

It would be great to add percentages to the "Civilizations: Most Wins" in the map page.

I will do some suggestions and maybe do a PR myself, I'm not sure yet ;P

Thanks.

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.