create-ln-app

Create LN App

Built with ❤️ ☕️ & ₿ in ATL by the ATL BitLab team. This is an open-source effort. Feel free to steal like an artist to make your life eaier. If you find issues, pls submit them to the repo. If you’re feelin’ froggy 🐸 and want a feature now, feel free to fork, build and submit a PR.

What? 🧐

Lapp: aka Lightning App; in contrast to a dApp. The term dApp was popularized by the web 3.0 / defi / crypto community. Much like the term web 3.0, the term dApp has become overused, subsequently losing its meaning. We fundamentally believe that, in time, the Lapp will supercede the dApp as the go-to framework to build applications that use a blockchain for native currency. Lapps are software applications that run on top of the Bitcoin Lightning Network: (L)igtning(app).

Why? 🤷🏼‍♂️

The idea of this repo is to enable developers to build Lapps faster and easier, so as a community, we can “move fast and break things” on L2 increasing the rate of innovation in and adoption of Bitcoin. create-ln-app is meant to simplify the local dev env setup, so Lapp developers can stop fussing with the dev tooling and start building the future!

How? 🛠

Setup is easy as 0-1-2!

  1. Click here to fork this repo. Then, run the following command replacing <USERNAME> with your github username.
git clone git@github.com:<USERNAME>/create-ln-app.git my_Lapp && cd my_Lapp

Or, you can simply clone this repo if you prefer.

git clone https://github.com/ATLBitLab/create-ln-app.git && cd create-ln-app
  1. npm run install:all
  2. npm start

We recommend using this template as a starting point for your local lightning development env. Over time, we plan to evolve this template to include more customizations and features for advanced developers.

Prerequisites

Below is a list of required and optional software packages for running this software.

Required

The software below is required to be able to properly run this code. Click the links for install instructions.

Or if you’re on a mac, you can install node & npm, docker and docker-compose with homebrew, and then install npx using npm.

brew install node docker docker-compose
npm install -g npx

If you install docker desktop, make sure you open it and get the docker engine running.

Optional

Homebrew is optional for mac, but it is very handy to have when you need to install packages.

n and nvm are also optionL, but again, they are handy node version management packages.

Useful Information

Once the npm start command is executed, you’ll see a new .env file placed at frontend/js/.env and frontend/ts/.env as well as frontend/js/src/.env.js and frontend/ts/src/.env.js. These env files with have all the env variables that you need to run the example app. These also provide you options with for how you want to access env vars (i.e. process.env vs import { ... } from ../.env). In the event that fails, find the relevant info below.

LND

bitcoind