How reneaaron/lightning-widget works
Project type and purpose
• This is a front-end widget library built with Vue.js that exposes a <lightning-widget> custom element.
File structure
• Top-level config and build files:
• .eslintrc.js, babel.config.js, vue.config.js, package.json → Vue CLI project, custom bundling and linting
• public/index.html → development HTML host page
• src/main.js → entry for mounting & registering the custom element / widget on the client
• src/components/Widget.ce.vue → the Vue single-file component defining the widget UI & logic
• src/components/utils/helpers.js → shared helper functions (e.g. formatting, validation)
• src/server/main.js → a small Node.js/Express (or similar) server to serve app.js and possibly proxy or handle invoice-creation calls during development
• package-lock.json → snapshot of installed dependencies
README for additional insights
• Confirms that end users embed <script src="https://embed.twentyuno.net/js/app.js"> → this script is the bundled output of the Vue widget and registers the custom element
• Widget interacts client-side with Lightning Addresses or LNURL endpoints to generate invoices and complete payments
• No heavy backend API; relies on client-side calls or external payment endpoints