Skip to content

Commit f962911

Browse files
authored
Revise README for LNbits extension starter template
Updated the README to provide a clearer description of the LNbits extension starter template, including its purpose, features
1 parent 8f33edb commit f962911

1 file changed

Lines changed: 59 additions & 11 deletions

File tree

README.md

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,71 @@
88
[![License: MIT](https://img.shields.io/badge/License-MIT-success?logo=open-source-initiative&logoColor=white)](./LICENSE)
99
[![Built for LNbits](https://img.shields.io/badge/Built%20for-LNbits-4D4DFF?logo=lightning&logoColor=white)](https://github.com/lnbits/lnbits)
1010

11-
# Example Extension - <small>[LNbits](https://github.com/lnbits/lnbits) extension</small>
11+
# LNbits Extension Starter Template
1212

13-
<small>For more about LNBits extension check [this tutorial](https://github.com/lnbits/lnbits/wiki/LNbits-Extensions)</small>
13+
A **starter template for developers** to build new LNbits extensions with a clean, well-structured foundation.
1414

15-
<h2>*tagline*</h2>
16-
This is an example extension to help you organise and build you own.
15+
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.
1716

18-
Try to include an image
19-
<img src="https://i.imgur.com/9i4xcQB.png">
17+
[![Watch the video](https://img.youtube.com/vi/aRTRYcNwqj0/maxresdefault.jpg)](https://www.youtube.com/watch?v=aRTRYcNwqj0)
2018

21-
<h2>If your extension has API endpoints, include useful ones here</h2>
19+
## Purpose
2220

23-
<code>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"</code>
21+
This template is designed to:
22+
23+
- Serve as a **clonable base structure** for new LNbits extensions
24+
- Demonstrate **recommended LNbits extension patterns**
25+
- Reduce setup time for new extension projects
26+
- Encourage consistency across the LNbits extension ecosystem
27+
28+
It is the **recommended starting point** if you want to develop your own LNbits extension with proper structure and conventions.
29+
30+
## Features
31+
32+
The template includes:
33+
34+
- Example extension layout (backend + frontend)
35+
- Sample database models
36+
- Example API endpoints
37+
- Configuration and metadata files
38+
- Support for **symbolic linking** to simplify local development
39+
- Clear separation of logic, views, and API routes
40+
41+
All components are intentionally minimal and meant to be adapted or extended.
42+
43+
## API Example
44+
45+
If your extension exposes API endpoints, document them clearly.
46+
Below is a simple example request pattern:
47+
48+
```
49+
curl -H "Content-type: application/json" \
50+
-H "X-Api-Key: YOUR_WALLET_ADMIN_OR_INVOICE_KEY" \
51+
-X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/example \
52+
-d '{"amount": 100, "memo": "example"}'
53+
```
54+
55+
Replace the endpoint, payload, and permissions according to your extension logic.
56+
57+
## Development Notes
58+
59+
* This template supports **symbolic linking** for local LNbits development setups
60+
* Intended for developers familiar with LNbits and its extension system
61+
* You are expected to modify, remove, or extend all example logic
62+
63+
### Important
64+
65+
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.
66+
67+
## Learn More
68+
69+
* LNbits core repository: [https://github.com/lnbits/lnbits](https://github.com/lnbits/lnbits)
70+
* Extension documentation: [https://github.com/lnbits/lnbits/wiki/LNbits-Extensions](https://github.com/lnbits/lnbits/wiki/LNbits-Extensions)
71+
* Official website: [https://lnbits.com](https://lnbits.com)
2472

2573
## Powered by LNbits
2674

27-
[LNbits](https://lnbits.com) is a free and open-source lightning accounts system.
75+
LNbits is a free and open-source Lightning accounts system.
2876

29-
[![Visit LNbits Shop](https://img.shields.io/badge/Visit-LNbits%20Shop-7C3AED?logo=shopping-cart&logoColor=white&labelColor=5B21B6)](https://shop.lnbits.com/)
30-
[![Try myLNbits SaaS](https://img.shields.io/badge/Try-myLNbits%20SaaS-2563EB?logo=lightning&logoColor=white&labelColor=1E40AF)](https://my.lnbits.com/login)
77+
[![Visit LNbits Shop](https://img.shields.io/badge/Visit-LNbits%20Shop-7C3AED?logo=shopping-cart\&logoColor=white\&labelColor=5B21B6)](https://shop.lnbits.com/)
78+
[![Try myLNbits SaaS](https://img.shields.io/badge/Try-myLNbits%20SaaS-2563EB?logo=lightning\&logoColor=white\&labelColor=1E40AF)](https://my.lnbits.com/login)

0 commit comments

Comments
 (0)