-
Notifications
You must be signed in to change notification settings - Fork 99
Home
Nicholas de Paola edited this page May 31, 2023
·
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 |
- Please ensure that you install the
pre-commit
Python package and runpre-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 Django project's end-to-end tests. 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 code with test coverage.
This section of the docs only discusses each project component. See their individual README's (linked above) for more detail.
- 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.
- See
- 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.
- Backend:
- 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.
-
Note: At time of writing, this component of the project is not yet stable. Please continue to use the legacy frontend in
/MPCAutofill
for a stable frontend experience. - 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.
- 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.
This repository is configured with a few secrets and environment variables which are required for some GitHub Action workflows as documented below.
Secret Name | Description |
---|---|
GOOGLE_DRIVE_API_KEY |
Your Google Drive API key. Used by GitHub Actions when running backend tests. |
API_TOKEN_GITHUB |
A GitHub API token configured with repo permissions.Used by copy_file_to_another_repo_action when deploying the frontend. |
NEXT_PUBLIC_GA_MEASUREMENT_ID |
Your Google Analytics measurement id. Used by the nextjs-google-analytics package when deploying the frontend. |
Made with