Tollbooth DPYC
@tollbooth-dpyc/web
@tollbooth-dpyc/web
Every operator front end in this collection is this package with its own features laid over the top.
Install the package. Wrap your app in the shell. Sign-in, the wallet, the account page and the client that talks to your MCP all arrive working, so the only code you write is the part that makes your site yours.
What comes in the box: AppShell and SiteNav for the frame, NpubGate and SessionKeyClaim for Nostr DM challenge sign-in backed by an in-browser session key, WalletCard, WalletPage, CouponsPanel and UsageSummary for balances and top-ups, PatronFundingStatus and OperatorFundingStatus for the two sides of the ledger, NostrProfilePanel and AvatarPicker for identity, TableShell with TableFilter, SortHeader and PageControls for every data view a service needs, and ThemeToggle, TimezonePicker, ErrorBoundary, BuildInfoPanel and DebugPanel for the housekeeping nobody wants to write twice.
The hooks carry the state: useSession, useTopUp, useTheme, useTimezone and useDebugLog. Underneath them, callTool and callToolWithContent are typed wrappers over the standard DPYC tools — balance, top-up, statement, price preview, profile — so every front end in the fleet asks its operator the same questions in the same way, and makeMcpProxy hands you the Cloudflare Pages Function to sit in front of it.
Two of the pieces exist because they are the ones a site would otherwise get subtly wrong. Time zones convert with daylight saving handled properly rather than by offset arithmetic, and the debug log scrubs sensitive values before anything reaches a console a patron could open.
At a glance
🔓 Apache 2.0 top to bottom — no open core, no paid tier
📦 Zero runtime dependencies. Peers are React 19, nostr-tools, lucide-react and the Model Context Protocol SDK
🎨 Ships theme.css design tokens, with Tailwind styled through CSS variables so a site can retheme without forking
🤝 Implements the patron half of the DPYC Social Contract — the server half is the Python wheel
🔑 No password and no account anywhere in the flow. A patron signs in as an npub and nothing else
📜 Patent pending, US Prov. App. No. 64/045,999
Links
📦 npm: npm i @tollbooth-dpyc/web
GitHub: lonniev/tollbooth-web
👀 tollbooth-dpyc.com
Share
Pairs with
-
tollbooth-dpyc Open source

-
Tollbooth Sample Open source

-
Pricing Studio Open source

-
MCP Monetization Advisory Session $100.00




