A simple USSD application built with Python 3, FastAPI Web Framework and Africa’s Talking for USSD and mNotify for callback SMS.
-
Install Python (Minimum version: 3.10).
-
Clone this repository with the command:
git clone https://github.com/Owiredu/revna-bio-coding-test-ussd-app.git
-
Navigate to the root directory of the clone repository and run the command to create a virtual environment:
python -m venv venv
-
Activate the virtual environment created on Step 3 with follow command:
-
Bash
source ./venv/Scripts/activate
-
PowerShell
& ./venv/Scripts/Activate.ps1
-
-
Install the required dependencies with the command:
pip install -r requirements.txt
-
Run the application on
localhost
or127.0.0.1
and port3000
with the command:uvicorn main:app --reload --port 3000
- Access the API documentation page hosted at https://revna-bio-coding-test-ussd-app.onrender.com/docs. This provides basic utilities for managing users.
- Add a user with a functional phone number.
- Create an account at https://account.africastalking.com/ and access the sandbox app.
- Using a shared service code, create a channel and set the callback URL to https://revna-bio-coding-test-ussd-app.onrender.com/ussd
- Provide the phone number specified for the user on Step 2 to the simulator. Make sure to use the phone number format accepted by the simulator for the user as well.
NB: If you have issues setting up the Africa's Talking sandbox for testing, refer to their tutorial at Documentation | Africa's Talking (africastalking.com)