btcpayserver icon indicating copy to clipboard operation
btcpayserver copied to clipboard

Plugins can now build apps

Open Kukks opened this issue 2 years ago • 4 comments

See usage from an app here: https://github.com/Kukks/BTCPayServerPlugins/tree/tt-app

Kukks avatar Feb 08 '23 10:02 Kukks

Can you write up the gist of how to make an app (Kukks/BTCPayServerPlugins@eac0cfe734286d1f27c8c9737e4a0d317921c7bb) on the plugins doc?

dennisreimann avatar Feb 08 '23 18:02 dennisreimann

Sure, once we merge

Kukks avatar Feb 10 '23 09:02 Kukks

This is really cool and I'm looking forward to use it for e.g. PodServer, which I also tried to convert to an app in order to review and test this …

grafik

The basics work well already, but there are some areas that require additional changes:

  • The dashboard tiles refer to controllers/actions and we should allow for using Razor Pages as well.
  • The IApp interface should be fleshed out with some more use cases and also allow for omitting features like the dashboard display. Migrating the existing plugins for which it makes sense to be an app will help with that.

In my Wabisabi Plugin, I used a UI extension to extend the dashboard, we can do the same for apps that want to show more than the standard item/sale stats

IApp should maybe have a bool SupportDashboardStats {get;} and hide the elements in dashboard if false

LNURl also has hardcoded elements which I could not easily abstract and pluginify

Kukks avatar Feb 15 '23 12:02 Kukks

IApp should maybe have a bool SupportDashboardStats {get;} and hide the elements in dashboard if false

Why even go down that road when we can simply use the more generic UI extension method you described above? :)

LNURl also has hardcoded elements which I could not easily abstract and pluginify

Yes, let's take some time after v1.8 and polish those things before getting a first version of it out there.

dennisreimann avatar Feb 15 '23 12:02 dennisreimann

will adapt stuff in different PR

NicolasDorier avatar Mar 17 '23 02:03 NicolasDorier