Skip to main content

Solutions for Communities

"We win by making the bitcoin ecosystem win"

Obi Nwosu, 2023 - What Bitcoin Did - WBD657 - How Fedimint Scales Bitcoin


Every community is unique, each has its own particular problems that require unique solutions. We believe in taking a decentralised approach to solving these problems, so we've made Fedi easy for developers to modify.

As a user of Fedi, you'll have access right from the homepage to launch custom Fedi Mods that interact with your money and data through open standards like WebLN and Nostr.

We've assembled a collection of Fedi Mods that already work great with Fedi, which you can find in the Fedi Mods Catalog.

As a developer, we can make distribution easy. You no longer have to worry about finding an audience, funny urls or spending all your time on look and feel. Simply figure out the best way to solve the problem, keep it simple and deploy in Fedi.

Does Fedi act as a gatekeeper to Fedi Mods? No. Fedi Mods are independent apps and can be deployed by guardians when configuring the Federation, your community, your mods, your homepage. With Fedi Mods, you have the power to customise and create a tailored experience for your local Federation members, putting control right back in the community.

How it works

Fedi Mods functionality will be released over three phases.

Phase 1 - Open Lightning Standards (WebLN / LNURL / NIP-07 Nostr)

The simplest and most straightforward Fedi Mod is a WebLN or Nostr enabled website. Fedi Mods run in Fedi's in-app browser to inject WebLN and Nostr and give a native payments / auth integration with Fedi's balances. When you connect to a Fedimint, Fedi looks in the Federation Meta Configuration for a key called "sites", which MUST have an array of objects structured as follows:. Easy peasy.

[
{
id: "chatbot",
title: "Chatbot-UI",
url: "https://10.0.2.2:3000", // E.g. to run a localhost:3000 app as a fedimod for testing
description: "Use an Open Source AI Chatbot paid with eCash!",
},
{
id: "hrf",
title: "Donate to HRF",
url: "https://geyser.fund/project/supporthrf",
description:
"Donate directly to the Human Rights Foundation on Geyser Fund",
},
{
id: "newmod",
title: "New Fedi Mod",
url: "http://fedi-dev-release-mod.com",
description: "Try my new Fedi Mod!!",
},
]

The site opens in Fedi's in-app browser to inject WebLN and handle any lnurl pay, withdraw, or auth request. Fedi will soon support handling more complex WebLN interactions like using macaroons or runes via L402 'payment required' errors.

However, designing a GREAT Fedi mod involves a number of other design decisions, ensuring your app looks great in Fedi's in-browser mobile environment is tricky, but we'd love to help - for this join us in the Bitcoin Design Community.

Fedi Mod Boilerplate

IroncladDev, an engineer at Fedi, made a boilerplate library for those interested in building Fedi Mods that follow our UI and design, and comes out of the box with some webln and nostr integration examples you can use when developing your mod.

You can find the code here to reference or immediately get started on Replit here.

We've also included a couple videos to help you get started in the following documentation pages.

Phase 2 - Federation hosted Fedi Mod sites

Websites are quick and easy, but can be shutdown. Internet connectivity can be an issue or sometimes you don't want to rely on anyone else to run your app.

For phase 2 Fedi Mods will be moved to use the local infrastructure of Fedimint servers to seamlessly bring your mods to the Federation. By running mods locally within the community, they remain under their control.

We'll also be adding support for ecash 402s to allow for better, faster, and more secure payments: the federation hosting your mod will accept its ecash payment directly without needing to route through the lightning network.

This grants Federations the ability to utilize additional mods within a local network, ensuring complete control over their data. On the other hand, it eliminates devs’ hassle of searching for hosting options.

Phase 3 - Federation native APIs

As we move hosting towards the Federation this will open up Federation native integrations. Fedimint's 0.2 release involved a significant refactor to allow for 3rd party Fedimint modules and to express the module's api through the Fedimint Rust client.

This will allow you to natively access functionality running on the Federation infrastructure such as the core Fedimint modules, chat bots, AI models and custom Fedimint modules all from within your Fedi Mod.

This will provide highly extensible federated smart contract applications, served directly from communities, in a platform accessible to every web developer on the planet.

FAQs

What is WebLN?

It’s a library and set of specifications for lightning apps and client providers to facilitate communication between apps and users, lightning wallets, nodes in a secure way. As a fully lightning compatible application, Fedi supports deep lightning integrations via the WebLN protocol.

For details on the protocols and implementation see the official webln docs

Are there design guidelines?

Fedi is a mobile application and loads your mods through a webview component so Fedi Sites should be designed to look and feel good on mobile and should avoid too much superfluous navitgation. Over time we will work on guidelines with the open source design community on discord.

How will we know what mods to build?

We love connecting developers and designers with communities around the world. To get insights to develop apps that meet real-world needs, keep posted for our upcoming workshops, webinars or connect with our team at the Fedi Telegram group.