Inspiration
What it doesInspiration
Across Dakar, Lagos, and Nairobi, millions of micro-merchants deal with cash change shortages, high mobile-money fees, and slow 2G/3G networks. A street vendor selling rice and oil should not need expensive POS hardware, a bank account, or fast internet to accept digital payments. SokoSats was built for that vendor.
What it does SokoSats is a lightweight, mobile-first Point-of-Sale web app:
AI order parser: the merchant types or dictates a natural order in French, English, or Wolof — for example 2kg riz 1300 CFA, 1 huile 1100 CFA. The parser extracts each line item and converts the total from local currency (XOF, NGN, KES) into satoshis at the live Bitcoin spot rate from Coinbase. A Gemini AI call is used when available; a deterministic offline parser takes over if the network drops, so the till never stops working. Real Lightning invoices: with one tap, SokoSats resolves the merchant's Lightning Address via standard LNURL-pay (LUD-06 / LUD-16) and generates a real, verifiable BOLT11 invoice with a lightweight SVG QR code. Customers pay instantly from any Lightning wallet (Phoenix, Zeus, Wallet of Satoshi, WebLN) and funds settle directly to the merchant. Non-custodial backup wallet: the merchant gets a BIP84 Native SegWit wallet (BIP39/BIP32 via bitcoinjs-lib, derivation path m/84'/1'/0'/0/0), generated on the server with no custodial middleman. The demo deployment runs on Bitcoin testnet/signet. Built for low-end phones: the homepage is about 10 KB, with zero heavy JS frameworks, and works over Slow 3G. A seed catalog of common goods (Riz parfumé 650 XOF, Huile végétale 1100 XOF, Thé Attaya 500 XOF, Pain Tapalapa 200 XOF, Recharge téléphone solaire 300 XOF) lets a vendor ring up a sale with one tap. How we built it Backend: Node.js 20 + Express (serverless on Vercel, with a Docker image for one-command local setup: docker compose up). Bitcoin: bitcoinjs-lib + bip32 + bip39 for the BIP84 wallet; lnurl-pay for real BOLT11 invoices; qrcode for SVG QR codes. AI: Gemini API for order parsing, with a deterministic offline fallback parser so the POS keeps working without connectivity. Live price: Coinbase BTC/USD spot, paired with estimated fiat reference rates (XOF, NGN, KES). Testing: npm test runs a smoke test covering wallet derivation, the parser, and a real BOLT11 invoice from a real Lightning Address. Challenges we ran into The first Vercel deployment returned HTTP 500 on every route because the tiny-secp256k1 WebAssembly file was missing from the serverless bundle. We fixed it by adding the .wasm file to the function includeFiles in vercel.json and redeploying — the app is now live and healthy. Keeping the frontend under ~10 KB while still showing a QR code and a full order flow, so it stays usable on 2G/3G connections. What's next Mainnet-ready merchant onboarding: let each merchant connect their own Lightning Address and keep their own keys. Offline-first order queue: cache orders on the phone and settle invoices when connectivity returns. More local catalogs and languages, starting with the markets the demo already covers (Dakar, Lagos, Nairobi
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for SokoSats
Built With
- bip32
- bip39
- bitcoin
- docker
- express.js
- gemini-api
- lnurl-pay
- node.js
- qrcode
- vercel