USSD CBS Walkthroughs and Assignments
USSD CBS Walkthroughs and Assignments
Overview
This section combines guided walkthroughs and hands-on assignments to help learners progressively build a USSD-based Community-Based Surveillance (CBS) system using Africa’s Talking, Flask or Express, and ngrok.
Each walkthrough introduces new technical concepts, immediately followed by an assignment that reinforces learning through practical implementation.
Learning Flow
The module follows a learn–build–test approach:
- Understand USSD concepts and session flow
- Implement features step by step
- Test locally using ngrok and the USSD simulator
- Apply concepts to real CBS use cases
Walkthrough 1: USSD Fundamentals and Session Flow
Concepts Covered
- What USSD is and how it works
- Session-based communication
- Role of
sessionId - Use of
CONandEND - Africa’s Talking USSD request lifecycle
Walkthrough
- Inspect the USSD HTTP POST payload
- Identify
text == ""as session start - Send a simple menu response
- Terminate a session correctly
Assignment 1: Basic USSD Menu
Task:
Create a USSD endpoint that:
- Displays a menu on first request
- Continues and ends sessions correctly
Outcome:
Learner understands basic USSD interaction and response rules.
Walkthrough 2: Multi-Level Menu Navigation
Concepts Covered
- Understanding the
textfield *-concatenated user input- Menu depth and navigation logic
- Stateless USSD design
Walkthrough
- Trace
textvalues ("1","1*2","1*2*1") - Map input paths to menus
- Implement branching logic
Assignment 2: Hierarchical Menus
Task:
Build a two-level USSD menu with:
- Valid input handling
- Invalid input fallback
Outcome:
Learner can design and control multi-step USSD flows.
Walkthrough 3: Local Development with ngrok
Concepts Covered
- Why public HTTPS endpoints are required
- ngrok tunneling architecture
- Debugging USSD callbacks
Walkthrough
- Run the local server
- Expose it using ngrok
- Configure Africa’s Talking callback URL
- Inspect requests via ngrok dashboard
Assignment 3: ngrok Integration
Task:
Expose your local USSD app with ngrok and test it using the Africa’s Talking simulator.
Outcome:
Learner can develop and debug USSD apps locally.
Walkthrough 4: Designing CBS USSD Menus
Concepts Covered
- CBS reporting requirements
- User-centered USSD menu design
- Avoiding deep navigation
- Telco rendering constraints
Walkthrough
- Design a CBS menu for:
- Illness reporting
- Death reporting
- Animal health events
- Validate menu clarity and flow
Assignment 4: CBS Menu Design
Task:
Design and document a CBS USSD menu suitable for community use.
Outcome:
Learner understands how to translate public health needs into USSD menus.
Walkthrough 5: Implementing CBS Reporting Logic
Concepts Covered
- Mapping USSD input to CBS events
- Capturing and confirming reports
- Ending sessions with acknowledgment
Walkthrough
- Implement illness and death reporting flows
- Simulate report submission
- Return confirmation messages
Assignment 5: CBS Report Capture
Task:
Implement backend logic to capture CBS reports and acknowledge users.
Outcome:
Learner can build functional CBS reporting workflows.
Walkthrough 6: Error Handling and User Experience
Concepts Covered
- Graceful handling of invalid input
- Preventing session crashes
- User-friendly termination messages
Walkthrough
- Simulate incorrect inputs
- Implement fallback responses
- Ensure session stability
Assignment 6: Robustness Improvements
Task:
Add error handling and improve UX across all menus.
Outcome:
Learner builds resilient USSD applications.
Walkthrough 7: Performance and Best Practices
Concepts Covered
- USSD timing constraints
- Logging and monitoring
- Stateless vs cached session design
Walkthrough
- Measure response times
- Add basic logging
- Identify production risks
Assignment 7: Optimization
Task:
Optimize your USSD application for speed, clarity, and maintainability.
Outcome:
Learner prepares USSD systems for real-world deployment.
Final Project: CBS USSD Mini System
Objective
Integrate all concepts into a working CBS USSD prototype.
Requirements
- Multi-level CBS menu
- Illness and death reporting
- ngrok-enabled testing
- Simulator-tested flows
Deliverables
- Source code
- Menu flow diagram
- Short technical documentation
Outcome
Learner demonstrates full competency in building a USSD-based CBS system.
Expected Competencies After Completion
By completing these walkthroughs and assignments, learners will be able to:
- Build end-to-end USSD applications
- Integrate Africa’s Talking USSD APIs
- Test and debug locally using ngrok
- Design and implement CBS reporting systems
- Apply USSD best practices for public health solutions
Conclusion
This combined walkthrough-and-assignment approach ensures learners not only understand USSD concepts, but can apply them to real Community-Based Surveillance challenges, resulting in practical, deployable solutions suitable for real-world environments.