USSD/IVR Maternal Health Platform for Northern Nigeria
# Lafiyar-Uwa
A scalable USSD-based maternal health platform for Nigeria, built with Node.js, TypeScript, Express, Prisma, PostgreSQL, Redis, and Docker.
## Table of Contents
- Project Overview
- Features
- Tech Stack
- Folder Structure
- Setup & Installation
- Environment Variables
- Database & Migrations
- Running the Project
- USSD State Machine
- Session Management with Redis
- Testing
- Contributing
- License
---
## Project Overview
Lafiyar-Uwa is a digital health platform that enables mothers to register, receive weekly health tips, and get risk assessments via USSD. It supports multi-language, risk scoring, and integrates with health workers and facilities.
## Features
- USSD registration and menu navigation
- Maternal risk assessment and scoring
- Weekly health tips via IVR/SMS
- Integration with health workers (CHW)
- PostgreSQL for persistent data
- Redis for session management
- Dockerized for easy deployment
- Prisma ORM for type-safe database access
## Tech Stack
- Node.js & TypeScript
- Express.js
- Prisma ORM
- PostgreSQL
- Redis
- Docker & Docker Compose
- USSD-Builder library
## Folder Structure
```
├── src/
│ ├── core/
│ │ ├── config/ # App, DB, Redis, logger configs
│ │ ├── middleware/ # Global middlewares
│ │ ├── services/ # Shared services (Redis, AT, etc.)
│ │ ├── utils/ # Helper utilities
│ ├── modules/
│ │ ├── ussd/ # USSD controllers, menus, routes
│ │ ├── users/ # User logic, services
│ │ ├── risk-assessment/ # Risk scoring
│ │ ├── ... # Other modules
│ ├── server.ts # App entry point
├── prisma/
│ ├── schema.prisma # Prisma schema
├── docker-compose.yml # Docker services
├── .env.example # Example environment variables
├── README.md # Project documentation
```
## Setup & Installation
1. **Clone the repository:**
```sh
git clone
github.com
cd lafiyar-uwa
```
2. …