LNbits API is built using FastAPI, a high-performance, easy to code API framework.
FastAPI auto-generates swagger UI docs for testing endpoints /docs
LNbits uses Quasar for frontend deisgn elements. Quasar Framework is an open-source Vue.js based framework for building apps.
TIP: Look through /template
files in other extensions for examples.
In the below example we make a dialogue popup box (box can be triggered
Quasar is built on Vue-JS, so LNbits uses Vue-JS for rendering page elements, organising JS functions and declaring modles and elements.
v-if
can be used to render elements:
Typical example of a frontend page JS:
A magical "g" (ie this.g.user.wallets[0].inkey
) is always available, with info about the user, wallets and
extensions:
{% raw %}{{ g }}{% endraw %}