Sandbox

Isolated, resettable test environment

Developer sandbox

An isolated consent engine that behaves exactly like production but forgets everything. In-memory database, auto-seeded demo actors, daily reset — perfect for building and testing integrations.

Run it locally

# from the repository root
npm run sandbox            # -> http://localhost:4100

# or with an explicit port / reset hour
SANDBOX=1 PORT=4200 SANDBOX_RESET_HOUR=4 node src/server.js

The sandbox uses an in-memory database: restart the process and everything is gone. Every day at the reset hour (default 03:00 local), data is wiped and re-seeded automatically.

Demo credentials (printed on boot)

admin      [email protected]      / Sandbox!Passw0rd   (admin console)
farmer     [email protected]  / Farmer!Passw0rd     (user dashboard)
source     esk_sandbox-telebirr-source                    (institution)
consumer   esk_sandbox-addis-mfi-consumer                 (institution)
verify-only esk_sandbox-mfi-verify-only                   (RBAC demo)
portal     esk_sandbox-mfi-portal                         (key management)

A demo consent request is pre-seeded: the sandbox MFI asks the sandbox farmer for transaction_history + mobile_money (with an automation disclosure) — approve it to get a real signed consent token.

Manual reset

curl -X POST http://localhost:4100/api/sandbox/reset \
  -H "Cookie: consent_session=$ADMIN_SESSION"
# => { ok:true, reset_at:"...", seeded:{ admin_email:..., api_keys:... } }