Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend refactor to API-based model and NodeJS GUI implementation #956

Draft
wants to merge 58 commits into
base: ucp2-development
Choose a base branch
from

Conversation

patel-nikhil
Copy link
Collaborator

  • Refactors backend:
  • to create a generic API that is exposed to frontend implementation
  • to use a configuration-based model as opposed to a source-based configuration model
    • [WIP] currently the Startup class deserializes to object, the intention is to define the contract for the schema using the UCP.Model.ModUIConfig class (where a Mod represents a top-level (potentially grouped) selection that can be made by the user) and a ModUIConfig instance represents all the information needed by the frontend (and passed from the backend) in order to present the user with a visual way to select option(s) for the given Mod.

Note: the Startup class and Invoke method will be ideally be renamed in upcoming commits. Returning a Task<object> delegate is required to expose a non-blocking implementation to a callee (ie. NodeJS) however with current implementation the config retrieval is synchronous

Note: GUI uses NodeJS, TypeScript, Electron, Webpack. Entry (startup) file is the unofficialcrusaderpatch-gui\index.ts. Can be started via Visual Studio or simply using npm run build or (identical) npm start (from unofficialcrusaderpatch-gui directory)

  • Requires NodeJS support to be installed if using Visual Studio (VS 2019)

  • Requires npm and NodeJS to be installed if using npm commands directly. Use npm ci over npm install to ensure you are using the same versions of dependencies as specified in the package-lock.json file

  • Note: webpack integration is mostly working however sometimes there is a dev tools disconnect on load & reload. If after running the project you get a blank screen and/or message in dev tools saying disconnected, then close dev tools and force reload the app (Ctrl + R, same command as if refreshing a web page)

@patel-nikhil
Copy link
Collaborator Author

patel-nikhil commented Dec 24, 2021

Note:

  • force push was to clean up git history
  • PR is work in progress, some projects have a few broken references and implementation overall needs a refactor to match the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant