Skip to content
Nicholas de Paola edited this page Jun 23, 2024 · 9 revisions

Welcome to the mpc-autofill wiki!

Each component of the project - desktop tool, frontend, and backend - has its own documentation. Links are below:

Component Root Directory Description Link to Docs
Desktop tool /desktop-tool The tool that auto-fills your project into MakePlayingCards.com. Docs
Frontend /frontend The standalone (static) frontend which facilitates MPC project creation. Docs
Backend /MPCAutofill The web backend that MPC Autofill servers run on. Docs

Contributing

  • Please ensure that you install the pre-commit Python package and run pre-commit install before committing any code to your branch / PR - this will run various linting, code styling, and static type checking tools to validate your code.
  • GitHub Actions is configured in this repository to run the backend and desktop tool's test suites. To run these, it needs to access the Google Drive API, and does so through a repository secret named GOOGLE_DRIVE_API_KEY. If you fork this project, you'll need to set this repository secret for GitHub Actions to run these tests for you.
    • Note: If you create a pull request to this repository from your fork and you don't follow this step, your CI build will fail! Don't worry about it unless you're modifying backend or desktop tool code with test coverage.

Monorepo Structure

This section of the docs only discusses each project component at a high level. See their individual wiki pages (linked above) for more detail.

Backend

  • Note: The frontend in this section of the codebase is considered deprecated and no new features will be added to it.
  • Located in /MPCAutofill.
    • See /frontend for the successor to this part of the project.
  • Images stored in the Google Drives connected to the project are indexed in Elasticsearch.
  • The backend server is decoupled from /frontend and the frontend allows users to configure which backend to retrieve data from.
  • Stack:
    • Backend:
      • Django 4, the database of your choosing (sqlite is fine), Elasticsearch 7.x, and Google Drive API integration.
    • Frontend (deprecated):
      • jQuery + jQuery UI, Bootstrap 5, Webpack + Babel for compilation and bundling.
  • Facilitates the generation of XML orders for use with the desktop client.
  • Intended to be deployed natively in a Linux VM but can also be spun up locally with Docker.

Frontend

  • Located in /frontend.
  • A web app that communicates with a specified MPC Autofill backend (hosted somewhere on the Internet) and facilitates the creation, customisation, and exporting of projects with drives linked to that backend.
  • Stack:
    • Static Next.js web app built with Typescript, React-Bootstrap, and Redux.
    • Automatically deployed on GitHub Pages to https://mpcautofill.github.io whenever changes are made to the frontend-release branch.

Desktop Client

  • Located in /desktop-tool.
  • Responsible for parsing XML orders, downloading images from Google Drive, and automating MPC's order creation interface.
  • Stack:
    • A Click CLI which is compiled and distributed (in GitHub Releases) as an executable with Pyinstaller.
Clone this wiki locally