TapGives – Clean Water Subscription Service
We Make Impact is an organization that creates and manages potable water sites in rural Kenya and Uganda, in regions where drinking water is scarce or unsafe. To manage water distribution to communities in need, We Make Impact, in collaboration with the UBC Cloud Innovation Centre (CIC), has developed a solution, TapGives, to easily connect villagers to a nearby water site for a nominal monthly fee, using only a cellular device. The solution uses Unstructured Supplementary Service Data (USSD) technology, a Global System For Mobile Communications (GSM) protocol that enables cellular telephones to communicate with mobile network operators.
Approach
The solution empowers three users involved in the potable water distribution cycle in Kenya: (i) Villagers: any individual from a village who subscribes to obtain water from a specific water filtration site, (ii) Site Managers: individuals who work at, and manage, the water filtration site and, (iii) TapGives Administrators (admins): individuals responsible for administering the TapGives subscription service, granting permission to users, creating the filtration sites/stations in the system, and managing the financials.
To develop the TapGives system for villagers in rural Kenya, several factors required consideration, such as accessibility to Wi-Fi in remote regions of Africa, subscription validation, limited smartphone accessibility and language needs. With this in mind, UBC CIC developed a USSD solution utilizing the USSD gateway aggregation service, Africa’s Talking. The TapGives solution enables villagers to purchase a subscription to a water filtration site, allowing them to collect jerry cans of filtered water from the water site nearest to them.
For TapGives admins, UBC CIC developed a web interface to provide admins with the infrastructure to manage and operate rural water sites. The web interface enables admins to assign site managers to specific water sites and the ability to authorize villager collections. Admins can also edit filtration site details such as the estimated number of jerrycans available/remaining on a subscription and communicate site information to all, or specific, site villagers and site managers with a broadcast messaging feature.
The web interface and USSD application have been developed in two languages, English and Kiswahili, with the ability to add more languages to increase user accessibility.
Supporting Artifacts
Architecture Diagram

User Interface: Web Admin Application Dashboard



Technical Details
The solution is divided into two major sections: i) web admin application and ii) the villager and site manager USSD interaction.
Web Admin Application Details:
Both TapGives admins and Site Managers can use the web admin application. It enables TapGives admins to create and update water filtration sites and grant permissions to site managers regarding which sites they can view and manage. In addition, the web admin application allows TapGives admins to update the language preferences for both the mobile and website interfaces. The application also provides data on customer activity, such as time and frequency of visits, to inform admins of peak times.
The TapGives admin and site manager can connect to the webpage using any device capable of displaying a modern browser. Once connected, users are then authenticated by AWS Cognito and requests are routed through AWS AppSync. Upon logging in, each user’s selected language is loaded from an S3 bucket. Through AppSync and Cognito, the solution retrieves information about the filtration sites and a corresponding map using DynamoDB and Amazon Locations. The DynamoDB contains information such as each site’s name, shortcode, and physical coordinates, while Amazon Locations provides a map using those coordinates. When a villager’s transaction is made, the transaction is passed to DynamoDB streams followed by a Lambda function which invokes Kinesis Data Firehose. The request aggregates and converts data in the correct format and stores it in S3. The web portal analytics capabilities, such as the number of site visits by the hour per month, are processed through AppSync, which calls a Lambda function that converts the request to an SQL query for Athena. AppSync allows TapGives admins to broadcast messages by calling a Lambda function which retrieves the relevant phone numbers and uses Amazon Pinpoint to message the selected villagers and site managers.
USSD Interaction Details:
The villager and site manager’s interaction with the solution utilizes USSD technology, making the solution compatible with any cellular device. As a result, villagers can conveniently register with the TapGives project, purchase a subscription with access to a water site and view personal account information. In addition, the USSD interaction allows site managers to verify a villager’s subscription and process their water collections.
The villager dials the TapGives USSD shortcode for the solution, requesting communication with the system. The Mobile Network Operator forwards the request to the USSD aggregation service, Africa’s Talking, forwarding it to the Amazon API Gateway endpoint listed for the TapGives USSD shortcode. This connection opens the bridge of communication that will last until the session is terminated or times out. Amazon API Gateway modifies the contents received and sent to match the formats required by Africa’s Talking and the USSD Menu lambda function, which directs the entire interaction. The USSD Menu lambda function invokes additional lambda functions to perform tasks such as villager role creation, modification of villager information, recording villager transactions, and retrieving villager, site and site manager information. These lambda functions utilize AppSync to read and write to Amazon DynamoDB, storing villager and transaction information. When a villager purchases a subscription, the USSD Menu Lambda function invokes an AWS Step Function that automates the payment process with a series of lambda functions and states. The transfer of funds from the villager to TapGives is facilitated using Safaricom’s M-PESA payment API. In addition to processing this transaction, the step function updates the villager’s subscription status (valid vs invalid), records the transaction and sends a message to the villager indicating the success of the transaction and the change in their subscription status.
Both interfaces are designed and built to work together to deliver the developed solution to each of the three users identified above.
Link to solution on GitHub: https://github.com/UBC-CIC/TapGives
Visuals


Acknowledgements
We Make Impact: A not-for-profit Water Filtration Empowerment Group
Photo by We Make Impact at wemakeimpact.org
About the University of British Columbia Cloud Innovation Centre (UBC CIC)
UBC’s CIC is a public-private collaboration between UBC and Amazon. A CIC identifies digital transformation challenges, the problems or opportunities that matter to the community, and provides subject matter expertise and CIC leadership.
Using Amazon’s innovation methodology, dedicated UBC and Amazon CIC staff will work with students, staff and faculty, as well as community, government or not-for-profit organizations to define challenges, to engage with subject matter experts, to identify a solution, and to build a Proof of Concept (PoC). Through co-op and work-integrated learning, students also have an opportunity to learn new skills which they will later be able to apply in the workforce.
UBC’s CIC focuses on Community Health and Wellbeing.
