How bitflowcode/webln-boost-widget works
Project type and purpose
• This is a front-end Next.js (React + TypeScript) application whose primary goal is twofold:
• Host a small site (routes under app/) to configure and preview a Lightning-Network “boost” widget.
• Produce a standalone embeddable widget bundle (public/widget.bundle.js + CSS) that developers can drop into any site to accept WebLN donations.
File structure
• Top‐level “app” directory uses Next.js 13’s file‐based routing (pages for create, widget-params, and dynamic widget views).
• app/components/ holds reusable UI pieces (buttons, avatars, tooltips, the core webln-boost-button).
• lib/utils.ts contains shared helper functions.
• scripts/ hosts build scripts (Babel config + build-widget.js) to generate the standalone widget bundle.
• public/ contains static assets served by the Next.js server or CDN, including the final widget files.
• Config files: next.config.js, tsconfig.json, PostCSS/Tailwind, ESLint, Vercel deployment config.
README for additional insights
• Confirms the feature set (responsive UI, preset/custom sats, hold-to-boost, WebLN integration).
• Highlights the development workflow (npm run dev) and embed usage (import WebLNBoostButton …).
• Specifies environment requirements (Node 18+, WebLN wallet).