Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 3.25 KB

File metadata and controls

78 lines (52 loc) · 3.25 KB
LNbits

License: MIT Built for LNbits

LNbits Extension Starter Template

A starter template for developers to build new LNbits extensions with a clean, well-structured foundation.

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.

Watch the video

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

Powered by LNbits

LNbits is a free and open-source Lightning accounts system.

Visit LNbits Shop Try myLNbits SaaS