The Network Nervous System Dapp
The Network Nervous System (NNS) is the autonomous tokenized governance system that controls the Internet Computer blockchain. It is completely open, permissionless, and decentralized.
The NNS allows anyone holding a neuron to submit and vote on proposals to the network. If adopted, a proposal is executed immediately and automatically, enabling the network to adapt and evolve in real-time.
The NNS Dapp is the web app that gives access to all the functionalities of the NNS. In this web, the user can, for example, stake ICPs into neurons and then vote for the proposals regarding the Internet Computer network.
Svelte Rewrite
The current focus is to rewrite the frontend of the NNS dapp in another frontend framework. Currently, the dapp is written in Flutter, but it was decided to switch to Svelte for the reasons that we point out below. We will keep the same design and UX. We are refactoring page by page and substituting the Flutter page with the Svelte ones as they are developed.
Svelte will bring a few improvements to the NNS Frontend
- The most important improvement is performance, especially with mobile and scrolling, where we have seen problems with Flutter.
- Compilation to vanilla Javascript which doesn’t need runtime dependencies, which might be a security risk.
- End-to-end testing with Flutter has proven very cumbersome and moving back to a normal DOM will help us build a better test suite.
- We didn’t find that working with Flutter was increasing the developer experience, rather the opposite. We hope to develop faster with Svelte.
- It will be easier to find good frontend developers and get contributions from the community with a technology that is growing in popularity.
- Last but not least is consistency: the DFINITY Foundation as a whole believes that Svelte is the future of frontend dapp development.
In the end, we will have the same functionality but built in Svelte with additional improvements that we are adding along the way:
- A framework to perform end-to-end testing.
- Minor bugs that we have found in edge cases will be solved during the rewrite.
- UX improvements with notifications of errors and successful actions.
- More unit tests. This is because the team has grown, and we are taking more time to bring the testing coverage to a high percentage of the project.
- A separate package (nns-js) to interact with the Canisters that the NNS dapp needs. We are building this as a separate project so that the community will be able to use it directly.
- The rewrite will also come with a few performance enhancements. For example, the scrolling in mobile is not smooth at the moment.
At the time of this writing, we have already started the development and are on a good track. As some of you may have noticed, we swapped the login page (check the /v2
at the URL) with the Svelte one already and will proceed with other pages.
More to come
We know that the best way to improve is by listening to the users and the community. That’s why we are always open to feedback and believe in transparency regarding our current dapps and technology.
We have many more projects in the pipeline and we’ll share them as we go, stay tuned.