Skip to content

mercie-ux/sms-btcTutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bitcoin Academy – USSD Learning System

A simple and interactive USSD-powered Bitcoin learning platform built with Flask, Africa’s Talking API, and Gemini AI. Users can dial a USSD shortcode (e.g. *2140#) and access beginner-friendly Bitcoin education through menu options or ask AI questions.

Features

USSD Menu

  1. What is Bitcoin?
  2. How Bitcoin Works
  3. Bitcoin vs Traditional Currencies
  4. Ask AI Assistant

AI Assistant

Users can ask Bitcoin-related questions, and responses are generated using Gemini Flash 1.5.

Backend Stack

  • Python (Flask)
  • Africa's Talking USSD API
  • Google Gemini AI (gemini-flash-1.5)
  • Ngrok for public URL tunneling
  • dotenv for private API keys

πŸ“‚Project Structure

sms-bot/
│── ussd.py
│── .env
│── requirements.txt
└── README.md

Environment Variables

Your .env file should contain:

GOOGLE_API_KEY=your_gemini_key
AT_API_KEY=your_africastalking_api_key
AT_USERNAME=sandbox
SHORTCODE=*2140#

Installation & Setup

1.Create Virtual Environment

python -m venv venv
source venv/Scripts/activate  

2.Install Dependencies

pip install -r requirements.txt

3.Run the Backend

python sms.py
  1. Expose with Ngrok
ngrok http 5000

Copy the generated public URL (e.g., https://abcd.ngrok-free.app).

Configure Africa's Talking Sandbox

USSD Callback URLs

In Africa’s Talking Dashboard β†’ Simulator β†’ Settings:

Type URL USSD Callback URL https://your-ngrok-url.ngrok-free.app/ussd

Testing the USSD App Using Africa’s Talking Simulator

Open the simulator: https://simulator.africastalking.com

Enter Kenyan phone number (e.g., 0700000000)

Enter your shortcode:

*2140#

Navigate the menu.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages