Code structure

It is worth getting familiar with the code structure.

PlutoFramework Solution structure

Generated folder

Everything in the Generated folder was generated by some other code generators. It is not worth changing this code manually, because it is going to get regenerated anyways.

Why do we generate these codes? It significantly helps with code sustainability and reliability.

If you do not understand this, I recommend watching the following Sub0 presentation: https://youtu.be/qVm0a63JOjY?si=PSsfcokQzeDlaAcM

PlutoFramework

PlutoFramework utilises MVVM architecture. Learn more: https://learn.microsoft.com/en-us/dotnet/architecture/maui/mvvm

In this .csproj folder, you will mostly find the UI elements, and the mobile application logic itself. Occasionally, you will also find some model logic as well, but usually it is tied to one or more UI elements.

This folder is further split into a few more subfolders:

PlutoFramework.csproj subfolders

If you have ever developed a .net MAUI application, the subfolder structure will be quite familiar to you.

Platform specific code is in Platforms folder.

Images, fonts and more can be found in Resources folder.

Main Pages and main ViewModels are found in View and ViewModel folders.

UI specific functions are in Model folder. Mostly used for managing on-chain state queries and SubstrateClients (web socket clients that connect to substrate-based chains).

Component folder has a few other subfolders that sort the corresponding UI components. This folder is most commonly used for developing new UI elements.

PlutoFramework.Model

Contains all of the standalone shared functions.

PlutoFrameworkTests

Unit tests for PlutoFramework.Model.

UniqueryPlus

Standalone functions related to NFTs.

UniqueryPlusTests

Unit tests for UniqueryPlus.

Last updated