Inspiration
A Bitcoin balance is easy to read. Understanding how that balance becomes a payment takes practice: which outputs are spent, where change goes, why a fee exists, and when a transaction is confirmed.
We built Bitcoin Sandbox for beginners, developer workshops, and Bitcoin study groups in Nigeria and West Africa. The goal is a repeatable learning environment where someone can perform each step and explain the result.
What it does
Bitcoin Sandbox is a browser laboratory backed by Bitcoin Core regtest, a private testing network whose coins have no monetary value.
A learner creates Alpha and Beta learning wallets, inspects real unspent outputs, builds a transaction, and reviews its payment, change, fee, and size. Broadcast requires a separate confirmation. Explorer shows the transaction before mining, then a mined regtest block makes its confirmations visible.
Three guided experiments verify a first transaction, an actual change output with value conservation, and a confirmed transaction. The server checks Core before saving completion. Settings and learning records persist; a reset creates new wallets while preserving previous achievements and receipts.
If a browser response is lost during broadcast, the app retains the original review and checks the original transaction. This recovery does not sign or send another payment.
How we built it
The interface uses React, TypeScript, Vite, locally bundled IBM Plex fonts, and an ink-and-amber visual system. Readable transaction diagrams, horizontal navigation, and a focused payment review carry the experience across desktop and 360px phones.
Bitcoin Core creates and funds the learning wallets, constructs partially signed transactions, signs them, broadcasts them, and generates regtest blocks. Nostr signatures authenticate the learner independently of those Bitcoin wallets.
The local API uses Node.js, Express, SQLite, and Zod validation. The public app uses Convex for authenticated preferences, progress, and receipts, with a private Core runner and durable protocol journal. HMACs bind each runner request and response; the browser never receives Core credentials or PSBT signing material.
What we learned
A transaction is a useful explanation of Bitcoin's accounting: input value equals payment plus change plus fee. Letting learners inspect real outputs makes that relationship concrete.
Prepared, broadcast, and confirmed are different states. Keeping those states clear improves teaching and also makes retry and recovery behavior safer.
Challenges we faced
We needed convenient workshop setup while protecting other learners' wallets and the runner's resources. We addressed account isolation, bounded operations, stale previews, concurrent requests, and uncertain broadcast outcomes. Core's default address look-ahead also made lab creation too slow for the existing request budget. A Sandbox-only smaller pool keeps normal descriptor wallets and automatic replenishment; fresh and hosted checks confirmed creation and reset within the unchanged budget.
Phone layouts also needed to make long identifiers and several transaction outputs readable without hiding the payment review. We tested the actual lab, builder, Explorer, experiments, settings, reload, and recovery flows in the browser.
Accomplishments and next steps
The public Core and Convex flow passed 36 checks covering real wallet funding, reviewed broadcast, output conservation, mining, all three verified experiments, owner boundaries, replay protection, persistent records, reset, export, and sign-out. A fresh one-command setup installed dependencies and Core in a new directory, ran 32 real Core checks, and stopped its disposable services afterward.
The public browser flow passed 63 checks with 21 captures across 360px and 390px phones, a 1024px tablet, and a 1440px desktop. It had no page errors or horizontal overflow, and a separate lost-response recovery restored its original 10,000-sat transaction with no extra broadcasts. Local UI acceptance separately passed 58 checks.
The shared repository suite passed 445 tests, including 56 Sandbox regressions. The supervisor recovered an expired free tunnel and a stopped private runner while preserving the original verified transaction and Core data. The release record links each accepted run and its source hashes.
Our next step is a small consented workshop with at least five independent learners. We will measure time to a first verified transaction, correct identification of payment/change/fee, and understanding of broadcast versus confirmation.
The runner controls these educational wallet keys. Account wallets share its regtest chain, and mining advances that shared chain. The free demo requires the builder's computer and private runner to remain online. Builder-controlled tests demonstrate protocol behavior; independent learner outcomes and mainnet use remain outside the current evidence.
Built With
- bitcoin-core
- bitcoin-regtest
- bitcoin-rpc
- cloudflare
- convex
- css
- docker
- express.js
- ibm-plex
- node.js
- nostr
- nostr-tools
- phosphor-icons
- playwright
- psbt
- react
- sqlite
- typescript
- vite
- zod
