Skip to content

jpawlyn/ussd-menu-star

Repository files navigation

USSD menu star

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.

Local development

Install Ruby

  1. Install a ruby version manager e.g. rbenv

  2. Install the ruby version specified in .ruby-version, for instance

$ rbenv install 3.4.2

Setup and Run Postgres

Assuming a MacOS or linux OS:

$ brew install postgresql
$ brew services start postgresql

Install dependencies

$ bundle install

Start using your local dev environment

You can now set up your local DBs:

$ bin/rails db:create
$ bin/rails db:create RAILS_ENV=test
$ bin/rails db:migrate

Create an admin user for sign in and test service codes and accounts:

bin/rails db:seed

Run the local server with:

  bin/rails s

The 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.

💯 Tests

To run tests run rspec:

$ bin/rspec

To run system tests with a visible Chrome browser run:

  HEADLESS=false bin/rspec

Tests are run automatically when code is pushed to GitHub.

Rails cache store

To app requires a rails cache store and for development and production this is set to Solid Cache.

About

Admin for static USSD menus and callback API to serve these menus

Resources

License

Stars

Watchers

Forks