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

Modernizing MPW codebase #32

Open
weoka opened this issue Oct 21, 2022 · 2 comments
Open

Modernizing MPW codebase #32

weoka opened this issue Oct 21, 2022 · 2 comments
Labels
RFC A proposal or change which is best discussed with a variety of developers for consensus.

Comments

@weoka
Copy link

weoka commented Oct 21, 2022

I was going to create an issue to bring masternodes support, but then I realized we need HD wallet support to make that happen.

I was then going to create an issue to bring HD support to the wallet, then I thought probably the quickest way of doing this would be using bip39.js to generate and validate seed phrases and then using elliptic/crypto to get private keys.

Then I realized there is no node/building support at the moment, which gives us two options:

  • Reinvent the wheel for every future feature
  • Pile physical libs into the repository

I'm not a fan of either, so I'd say there is a need to modernize the codebase to current web standards.

And I do not only mean for dependencies management but as a whole. For example, as features get added, the frontend will also gain new tabs and sections, and piling them all into a single index.html will not be an option for maintenance's sake.

I suggest applying MVC standards where we can separate components from a logical and visual perspective, making it more comprehensive for new developers and easier to maintain in general.

There are several options for this, but I think using VUE would be the best fit compared to applying the pattern ourselves or using any other frontend framework/library.

The main reason is that VUE syntax and architecture is probably the easiest to incorporate, and it works out of the box with Vite, a module bundler 10x faster and better optimized than Webpack.

VUE will allow us to avoid this kind of unnecessary boilerplate:
image

This way will also make it super easy to create web-based mobile builds.

Of course, this can't just be merged into the current codebase, so the idea would be to start over on a new repo, MPW v2, or something like that.

@Duddino
Copy link
Member

Duddino commented Oct 22, 2022

I know jskitty has been working on rewriting parts of the code in rust, which would solve some of these issues (We can use rust libraries compiled to wASM).

@JSKitty JSKitty added the RFC A proposal or change which is best discussed with a variety of developers for consensus. label Oct 29, 2022
@JSKitty
Copy link
Member

JSKitty commented Nov 25, 2022

As of today we've completed the full implementations of BIP32 (HD), BIP39 (Seed Phrases), Masternodes and Governance.

Now that there shouldn't be "as-substantial" PRs in the near future, we'll start working on plans to standardise the codebase, with full style guides, slowly port over to modern web standards, CI automation (enforcement and assistance), and well, make the codebase as auditable and maintainable as possible. Yay! 🚀 💜

Wen DogeCash fork? 🐶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC A proposal or change which is best discussed with a variety of developers for consensus.
Projects
None yet
Development

No branches or pull requests

3 participants