diff --git a/README.md b/README.md index 4576ded..1748f6f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,78 @@ -# Example Extension - [LNbits](https://github.com/lnbits/lnbits) extension + + + + LNbits + + -For more about LNBits extension check [this tutorial](https://github.com/lnbits/lnbits/wiki/LNbits-Extensions) +[![License: MIT](https://img.shields.io/badge/License-MIT-success?logo=open-source-initiative&logoColor=white)](./LICENSE) +[![Built for LNbits](https://img.shields.io/badge/Built%20for-LNbits-4D4DFF?logo=lightning&logoColor=white)](https://github.com/lnbits/lnbits) -

*tagline*

-This is an example extension to help you organise and build you own. +# LNbits Extension Starter Template -Try to include an image - +A **starter template for developers** to build new LNbits extensions with a clean, well-structured foundation. -

If your extension has API endpoints, include useful ones here

+This repository provides a ready-to-use extension skeleton that follows LNbits conventions and best practices, making it easier to build, test, and maintain custom extensions. -curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"example"}' -H "X-Api-Key: YOUR_WALLET-ADMIN/INVOICE-KEY" +[![Watch the video](https://img.youtube.com/vi/aRTRYcNwqj0/maxresdefault.jpg)](https://www.youtube.com/watch?v=aRTRYcNwqj0) + +## Purpose + +This template is designed to: + +- Serve as a **clonable base structure** for new LNbits extensions +- Demonstrate **recommended LNbits extension patterns** +- Reduce setup time for new extension projects +- Encourage consistency across the LNbits extension ecosystem + +It is the **recommended starting point** if you want to develop your own LNbits extension with proper structure and conventions. + +## Features + +The template includes: + +- Example extension layout (backend + frontend) +- Sample database models +- Example API endpoints +- Configuration and metadata files +- Support for **symbolic linking** to simplify local development +- Clear separation of logic, views, and API routes + +All components are intentionally minimal and meant to be adapted or extended. + +## API Example + +If your extension exposes API endpoints, document them clearly. +Below is a simple example request pattern: + +``` +curl -H "Content-type: application/json" \ + -H "X-Api-Key: YOUR_WALLET_ADMIN_OR_INVOICE_KEY" \ + -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/example \ + -d '{"amount": 100, "memo": "example"}' +``` + +Replace the endpoint, payload, and permissions according to your extension logic. + +## Development Notes + +* This template supports **symbolic linking** for local LNbits development setups +* Intended for developers familiar with LNbits and its extension system +* You are expected to modify, remove, or extend all example logic + +### Important + +If you are using **LLMs to generate code**, please make sure to follow the official LNbits instructions when configuring your model to avoid insecure or incompatible output. + +## Learn More + +* LNbits core repository: [https://github.com/lnbits/lnbits](https://github.com/lnbits/lnbits) +* Extension documentation: [https://github.com/lnbits/lnbits/wiki/LNbits-Extensions](https://github.com/lnbits/lnbits/wiki/LNbits-Extensions) +* Official website: [https://lnbits.com](https://lnbits.com) + +## Powered by LNbits + +LNbits is a free and open-source Lightning accounts system. + +[![Visit LNbits Shop](https://img.shields.io/badge/Visit-LNbits%20Shop-7C3AED?logo=shopping-cart\&logoColor=white\&labelColor=5B21B6)](https://shop.lnbits.com/) +[![Try myLNbits SaaS](https://img.shields.io/badge/Try-myLNbits%20SaaS-2563EB?logo=lightning\&logoColor=white\&labelColor=1E40AF)](https://my.lnbits.com/login) diff --git a/config.json b/config.json index ee20315..5ffde7f 100644 --- a/config.json +++ b/config.json @@ -1,9 +1,12 @@ { + "id": "example", + "version": "1.0.6", "name": "Build your own!", + "repo": "https://github.com/lnbits/example", "short_description": "Extension building guide", + "description": "", "tile": "/example/static/bitcoin-extension.png", "min_lnbits_version": "1.0.0", - "donate": "donate@legend.lnbits.com", "contributors": [ { "name": "Ben Arc", @@ -29,5 +32,9 @@ ], "description_md": "https://raw.githubusercontent.com/lnbits/example/main/description.md", "terms_and_conditions_md": "https://raw.githubusercontent.com/lnbits/example/main/toc.md", - "license": "MIT" + "license": "MIT", + "paid_features": "", + "tags": ["Utilities", "Developer"], + "donate": "", + "hidden": false } diff --git a/description.md b/description.md index fec4196..fca3301 100644 --- a/description.md +++ b/description.md @@ -1,9 +1,12 @@ -An easily clonable extension that can be used a base for building a new extension. +A starter template for developers to build new LNbits extensions. -THe usual development enviroment is: +Its functions include: -- Clone the myextension repo to your own repo -- Edit the cloned repos manifest to your details -- Install into LNbits -- Delete the cloned extensions folder in your LNbits install -- Create a symbolic link to the extensions folder, from the where you have pulled your extension `ln -s /where/you/cloned/myextension /your/lnbits/installl/lnbits/lnbits/extensions/` +- Providing a clonable base structure for new extensions +- Demonstrating LNbits extension patterns and best practices +- Including example API endpoints and database models +- Supporting symbolic linking for local development + +The recommended starting point for developers who want to create custom LNbits extensions with proper structure and conventions. + +Note: If you are using LLMs to generate Code, please use our Instructions to feed your Modal.