This app enables USSD menus to be created in Avo admin and for these menus to be served via a callback API. The callback API is designed to work with Africa's Talking USSD callback API but should be easily updatable to work with other providers.
Input can be requested from your USSD users and persisted as JSON and this data can then be downloaded as a CSV file.
-
Install a ruby version manager e.g. rbenv
-
Install the ruby version specified in
.ruby-version, for instance
$ rbenv install 3.4.2Assuming a MacOS or linux OS:
$ brew install postgresql
$ brew services start postgresql$ bundle installYou can now set up your local DBs:
$ bin/rails db:create
$ bin/rails db:create RAILS_ENV=test
$ bin/rails db:migrateCreate an admin user for sign in and test service codes and accounts:
bin/rails db:seedRun the local server with:
bin/rails sThe app should now be available at http://localhost:3000
Use ngrok to view and navigate the app in Africa's Talking simulator. To use the simulator you first need to setup a USSD app in Africa's Talking sandbox environment and set the callback API URL.
To run tests run rspec:
$ bin/rspecTo run system tests with a visible Chrome browser run:
HEADLESS=false bin/rspecTests are run automatically when code is pushed to GitHub.
To app requires a rails cache store and for development and production this is set to Solid Cache.