ussdframework · Rust · live demo
Dial *384# for a loan.
USSD is how much of Africa banks: no app, no data, just a feature phone and a two-second budget per screen. This phone talks to a real ussdframework server running QuickLoan, a fictional mobile-loan product built the way I built one for 16 million customers. Any 4-digit PIN works except 0000. 0 goes back, 00 goes home.
Dial *384# and the framework's view of your session shows up here: which screen you're on, the path you took, and the data your inputs and function calls left behind.
Path
Session data
Gateway response
Requests
This is the whole QuickLoan app: screens, menus, input validation, routing and function calls, declared in JSON. Edit it, switch on Run my menu, then dial again. Try changing the main menu's text, adding a menu item, or loosening a validation_regex.
Function screens call Rust functions registered with the app. Each one reads session data and returns a value stored under its service's data_key. Screens show it with {{key.field}}, and routers test it with {{key.status == 'ok'}}.
The framework can also call functions over HTTP (webhooks) so any language can implement them. That's switched off here, since a public demo would otherwise be an open proxy.
The phone above uses a JSON endpoint so this page can show the session. The same app also speaks Africa's Talking's gateway format: form fields in, CON … or END … out. Paste this in a terminal:
Repeat with text=1, then text=1*1: the gateway sends the whole input chain and the framework takes the last part.