<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dioufmounirou on Medium]]></title>
        <description><![CDATA[Stories by Dioufmounirou on Medium]]></description>
        <link>https://medium.com/@dioufmounirou76?source=rss-b1dc79dfde8e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lAaILNfFjzuRq4vC</url>
            <title>Stories by Dioufmounirou on Medium</title>
            <link>https://medium.com/@dioufmounirou76?source=rss-b1dc79dfde8e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:28:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dioufmounirou76/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why Bitcoin Needs Its Own ShadCN]]></title>
            <link>https://medium.com/@dioufmounirou76/why-bitcoin-needs-its-own-shadcn-055993140bf1?source=rss-b1dc79dfde8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/055993140bf1</guid>
            <dc:creator><![CDATA[Dioufmounirou]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 17:02:01 GMT</pubDate>
            <atom:updated>2026-06-26T21:46:11.767Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The frontend layer of the Bitcoin ecosystem is duct tape. Here’s how we fix it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_Nxwg1fIC9aeD_HJ.jpg" /><figcaption>Daily usage design</figcaption></figure><p>I have seen the same “send” screen ten times this year. Ten different Bitcoin apps. Ten developers who each spent an afternoon writing the same address validator, the same sat/BTC toggle, the same QR code generator, the same fee selector. Two of those ten apps quietly used JavaScript Number for satoshi math ,which is to say, two of those ten apps could silently lose your funds at scale.</p><p>This is not because Bitcoin developers are bad. It is because the frontend layer of Bitcoin is duct tape. There is no shared UI vocabulary, no agreed-upon primitive, no community catalog you can pull from. So every team rebuilds from scratch ,and every team rebuilds <em>the same bugs</em> from scratch.</p><p>The fix is borrowed from the React world, and it is sitting in plain sight: <strong>ShadCN for Bitcoin</strong>.</p><h3>The thing we copy</h3><p>If you’ve shipped a React app in the last two years, you’ve used or considered <a href="https://ui.shadcn.com/">shadcn/ui</a>. The trick is deceptively simple: it isn’t a package. It’s a <em>registry</em>. You run a CLI:</p><pre>npx shadcn@latest add button</pre><p>…and the source code of the Button is copied into your repo. You own it. You audit it. You restyle it. You delete the parts you don’t need. There is no node_modules/shadcn/Button.js to fight with, no peer dependency resolution, no upgrade dance.</p><p>This model works because <em>components are not libraries</em>. A button is a small, opinionated piece of code. You should be able to read it, edit it, and ship it without asking anyone’s permission. ShadCN treats components like recipes: here’s a good one, paste it in, season to taste.</p><p>Bitcoin needs the same thing. Not Bitcoin-themed buttons, Bitcoin-native primitives. The kind that know that a satoshi is a bigint, that a Lightning invoice expires, that a P2TR address is valid on testnet but not mainnet, that a fee rate is in sat/vB and rounds <em>up</em>. The kind that bake those facts into the type system so the next junior dev cannot accidentally rebuild the bug.</p><h3>What’s missing today</h3><p>There are good projects in this space already. <a href="https://www.bitcoin-ui-kit.com/">Bitcoin UI Kit</a> ships React components for things like PasswordInput, CurrencyInput, QRCode. <a href="https://bitcoin-connect.com/">BitcoinConnect</a> standardizes the wallet-connection flow. Individual wallet teams (Alby, Mutiny, Phoenix, Breez) build excellent in-house components.</p><p>What’s missing:</p><ul><li><strong>A community catalog.</strong> There is no ui.shadcn.com for Bitcoin. No place where a dev can browse 50 components, preview them, copy one, and ship.</li><li><strong>A consistent BigInt-safe core.</strong> Most existing libraries cheerfully accept number for amounts. This is a footgun the Bitcoin space cannot afford.</li><li><strong>Headless primitives.</strong> Components today come pre-styled, usually in someone else’s brand. Adapting them to a new design system means rewriting them.</li><li><strong>Multi-protocol wallet abstraction.</strong> WebLN, NWC (Nostr Wallet Connect), BitcoinConnect, three increasingly-important protocols, each implemented from scratch in every app.</li><li><strong>First-class network awareness.</strong> Mainnet, testnet, signet, regtest , validation and formatting must accept all four. Most libraries silently assume mainnet.</li></ul><h3>Introducing Rafetal Bitcoin UI Kit</h3><p><a href="https://btc-ui.dev/">Rafetal Bitcoin UI Kit</a> is a community-driven catalog of UI components for Bitcoin and Lightning apps, built on the ShadCN model.</p><p><strong>The pitch in one sentence.</strong> Run npx bitcoin-ui add balance and a BigInt-safe, network-aware, accessible Balance component lands in your repo, written in whatever framework you use, ready to be styled in whatever design system you ship.</p><p>The model has two layers:</p><ol><li><strong>A copy-paste registry</strong> for the visual components (Balance, AddressInput, FeeSelector, SendForm, WalletConnector, …). You own the source. You can fork it, restyle it, audit it.</li><li><strong>A set of npm packages</strong> for the parts that don’t make sense to copy-paste: the BigInt sat math, the BOLT11 decoder, the address validator, the wallet provider abstraction. These are in @btc-ui/core and @btc-ui/react. They&#39;re tiny, ESM-only, tree-shakeable, and have zero telemetry.</li></ol><p>The combination matters. ShadCN’s pure-registry model is great for buttons but breaks down for cryptographic logic you don’t want every project to fork its own BOLT11 decoder. Rafetal keeps the <em>security-sensitive logic</em> in audited npm packages, and lets the <em>visual layer</em> live in your codebase, where you can shape it freely.</p><h3>What we mean by “headless first”</h3><p>Bitcoin apps span an enormous design surface. Mutiny is a dark mobile wallet. Strike is a clean fintech UI. Sparrow is a desktop dev tool. A self-custody hardware-wallet companion looks nothing like a Lightning tipping plugin.</p><p>A single styled component cannot serve all of them. So Rafetal ships components in two flavors:</p><ul><li><strong>Headless primitives</strong> (@btc-ui/react/primitives) , Radix-style compound components with asChild, slots, render-props. They handle the <em>logic</em> (state, validation, formatting, accessibility) and emit raw data. You bring the styles.</li><li><strong>A Tailwind reference implementation</strong> (@btc-ui/react-tailwind) , opinionated, themable via CSS variables. It is <em>the default style</em>, not <em>the only style</em>. You can copy it, fork it, replace it.</li></ul><p>Think of the headless layer as the engine and the reference implementation as one body. If you drive a Strike-shaped car, you keep the engine and swap the body.</p><h3>Bitcoin-native by default</h3><p>A few things Rafetal takes seriously, that off-the-shelf component libraries typically don’t:</p><ul><li><strong>BigInt sat math.</strong> Every amount in the API is a bigint. We refuse number at the type level. A custom lint rule catches accidental float arithmetic in PRs. This is not a stylistic choice , it is the difference between an app that loses money and one that doesn&#39;t.</li><li><strong>Network awareness.</strong> Every validator accepts a network: &quot;mainnet&quot; | &quot;testnet&quot; | &quot;signet&quot; | &quot;regtest&quot; parameter. You will not accidentally accept a testnet address into a mainnet flow.</li><li><strong>Multi-protocol wallet abstraction.</strong> A single WalletProvider interface over WebLN, NWC, and BitcoinConnect. Capability discovery (canMakeInvoice, canSignMessage) lets apps branch on what the connected wallet supports rather than try/catch around feature detection.</li><li><strong>Hardware wallet flows treated as first-class.</strong> SeedBackupWizard, HardwareWalletPrompt, PSBTInput (with file drop, QR animation, and clipboard paste in one component). These aren’t afterthoughts.</li><li><strong>Errors as data.</strong> Bitcoin parsers don’t throw. They return { ok: true, value } or { ok: false, reason }. Exceptions are reserved for true bugs, not user input.</li><li><strong>Zero telemetry, zero analytics, zero remote calls</strong> outside what the user explicitly opts into. This is non-negotiable. Self-custody users do not trust software that phones home, and they’re right not to.</li></ul><h3>What ships, and when</h3><p>The catalog covers roughly <strong>38 atomic components, 15 composed blocks, 20 hooks</strong>, about 73 distinct units. Phased rollout:</p><p>PhaseFocus0Monorepo scaffolding, core BigInt math, mempool client, registry CLI skeleton1Display MVP, Balance, Address, BlockHeight, FiatAmount, ConfirmationsBadge, ExchangeRate2Inputs, AddressInput, AmountInput, InvoiceInput, SeedPhraseInput, PasswordInput, ScanQR3Wallet connectors , WebLN, NWC, BitcoinConnect, plus all the action buttons4Composed flows , SendForm, ReceiveScreen, TransactionList, PaymentRequest , and data viz5Education, advanced (UTXOSelector, ChannelsList, SwapInterface), community RFC process</p><p>The full inventory and variant strategy live in <a href="https://github.com/Cheikh-Nakamoto/Rafetal-Bitcoin-UI-Kit/blob/main/todo.md">todo.md</a> in the repo.</p><h3>Variants without the variant explosion</h3><p>A common failure mode of component libraries is the variant explosion: &lt;Balance variant=&quot;compact&quot; /&gt;, &lt;Balance variant=&quot;expanded&quot; /&gt;, &lt;Balance variant=&quot;inline&quot; /&gt;, &lt;Balance variant=&quot;compact-with-fiat&quot; /&gt;, … until you have thirty props and a maintenance nightmare.</p><p>Rafetal sidesteps this by leaning on four patterns:</p><ol><li><strong>Compound components.</strong> &lt;Balance.Root&gt;, &lt;Balance.Value&gt;, &lt;Balance.Unit&gt;, &lt;Balance.Toggle&gt; , the user reorders, omits, or styles each slot independently.</li><li><strong>asChild.</strong> Delegate the rendering to the user&#39;s design-system primitives. We keep the logic, they keep the look.</li><li><strong>Render props for data.</strong> &lt;TransactionList&gt;{tx =&gt; &lt;MyRow tx={tx} /&gt;}&lt;/TransactionList&gt;. We fetch and virtualize; you render.</li><li><strong>CSS variables for theming.</strong> No recompilation needed. Override --btc-orange and you&#39;ve rebranded.</li></ol><p>The result: <strong>one implementation per component</strong>. Two CVA variants at most (size, tone). Everything else is composition.</p><h3>A coordination problem</h3><p>Bitcoin has a UX problem, but it’s not really a design problem. It’s a coordination problem.</p><p>Every team that has shipped a Bitcoin app has solved the same primitives, with the same bugs, in private. The work doesn’t compound. A senior wallet engineer at one company solves sat/BTC rounding correctly; a junior engineer at another company solves it incorrectly six months later. The ecosystem does not learn.</p><p>ShadCN proved that a registry-shaped catalog <em>does</em> let work compound, because the unit of sharing is small (a single component), the unit of ownership is small (the user owns the file), and the unit of contribution is small (one PR adds one component to the registry).</p><p>Rafetal bets that the same shape works for Bitcoin , and that solving the UI layer once, in public, removes one of the biggest sources of friction in the ecosystem.</p><h3>How to help</h3><ul><li><strong>Star </strong><a href="https://github.com/Cheikh-Nakamoto/Rafetal-Bitcoin-UI-Kit"><strong>the repo</strong></a><strong>.</strong> It is more useful than you think, it tells maintainers and contributors the project is alive.</li><li><strong>Open an issue</strong> describing what your team has rebuilt three times. That’s the signal for what belongs in the catalog.</li><li><strong>Pick a component from </strong><a href="https://github.com/Cheikh-Nakamoto/Rafetal-Bitcoin-UI-Kit/blob/main/todo.md"><strong>todo.md</strong></a><strong> and ship it.</strong> Each one is a self-contained PR. Contribution guidelines are in <a href="https://github.com/Cheikh-Nakamoto/Rafetal-Bitcoin-UI-Kit/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a>.</li><li><strong>Run an RFC</strong> if you want to propose a deeper change ,a new wallet protocol, a new framework adapter, a new design token system.</li><li><strong>Sponsor</strong> if you ship a Bitcoin product and want this work to move faster. The roadmap is public; the line items are clear.</li></ul><h3>What’s next</h3><p>This is Article 1,the vision.Next : Article 2 (<a href="https://medium.com/02-building-rafetal.md"><em>“Building Rafetal: Headless Components for Bitcoin”</em></a>) will be the technical deep-dive: how we implement BigInt sat math without losing precision, how we decode BOLT11 without dragging 200kB of crypto into your bundle, how the registry CLI resolves a dependency graph and merges your Tailwind config idempotently, how a single WalletProvider interface unifies WebLN, NWC, and BitcoinConnect.</p><p>Bitcoin’s UX problem is a coordination problem. Let’s solve it once.</p><p><em>Rafetal Bitcoin UI Kit is MIT-licensed. The code lives at </em><a href="https://github.com/Cheikh-Nakamoto/Rafetal-Bitcoin-UI-Kit"><em>github.com/Cheikh-Nakamoto/Rafetal-Bitcoin-UI-Kit</em></a><em>. The docs and component catalog live at </em><a href="https://btc-ui.dev/"><em>btc-ui.dev</em></a><em>.</em></p><p><em>If you build Bitcoin apps and want to chat about the roadmap, my inbox is open.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=055993140bf1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>