create-fedi-app

Getting Started

Overview of create-fedi-app — scaffold a Fedi mini app with WebLN, Nostr, and optional Lightning modules in minutes.

create-fedi-app scaffolds a production-ready Next.js 16 mini app that runs inside the Fedi mobile wallet. The generated project includes WebLN payment hooks, Nostr identity, ecash balance reads, mock providers for local development, and optional modules you select at scaffold time.

What you get

Every scaffold includes:

LayerWhat it does
WebLNwindow.webln provider wrapper, React hooks, mock wallet for dev
NostrNIP-07 identity layer with getPublicKey, signEvent, relay access
Fedi internalVersioned window.fediInternal hook for mini app discovery
UI kit@create-fedi-app/ui — SatsAmount, ConnectionBadge, MiniAppLayout
Dev toolbarToggle mock WebLN/Nostr, simulate payment failures, set mock npub

Optional modules add demo pages under /demo/* — payment gates, LNURL flows, AI chat, Nostr feed, multispend UI, and database CRUD.

Quick path

npx create-fedi-app@latest
cd my-fedi-app
cp .env.example .env.local
bun dev

Open http://localhost:3000 in a browser for layout work. Open the same URL as a custom Mini App inside Fedi to get real window.webln and window.nostr injection.

Docs map

Test federation

Use Mutinynet for test sats. Join a test federation in Fedi, add your localhost URL as a custom mini app, and payments use test Lightning — no mainnet risk.

External references

On this page