Skip to content

Automating healthcare communication across Africa helping medical professionals deliver lab results instantly and reliably through SMS.

Notifications You must be signed in to change notification settings

BETAIL-BOYS/medlink-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MedLink SMS - Healthcare Communication Platform

Pipeline Status Docker License

Automating healthcare communication across Africa—helping medical professionals deliver lab results instantly and reliably through SMS.

Features

  • User Authentication - Secure JWT-based login
  • Patient Management - Add and manage patient contacts
  • SMS Delivery - Automated SMS via Africa's Talking API
  • Real-time Tracking - Monitor delivery status
  • Analytics Dashboard - Delivery rates and insights
  • Webhook Support - Delivery confirmation callbacks

Tech Stack

Backend

  • FastAPI - Modern Python web framework
  • SQLAlchemy - SQL ORM
  • SQLite/PostgreSQL - Database
  • JWT - Authentication
  • Africa's Talking API - SMS delivery

Frontend

  • React 18 - UI library
  • Tailwind CSS - Styling
  • Axios - HTTP client
  • Vite - Build tool

DevOps

  • Docker - Containerization
  • GitLab CI/CD - Automated deployment
  • Render.com - Hosting

Quick Start

Using Docker (Recommended)

# Clone repository
git clone https://gitlab.com/YOUR_USERNAME/medlink-sms.git
cd medlink-sms

# Create .env file
cp backend/.env.example backend/.env
# Edit backend/.env with your credentials

# Run with Docker Compose
docker-compose up -d

# Access API
curl http://localhost:8000
# API Docs: http://localhost:8000/docs

Manual Setup

Backend

cd backend
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your credentials
uvicorn main:app --reload

Frontend

cd frontend
npm install
npm run dev

Docker Commands

# Build images
docker-compose build

# Start services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

# Rebuild and restart
docker-compose up -d --build

API Documentation

Once running, visit:

Key Endpoints

Method Endpoint Description
POST /register Register new user
POST /login User login
POST /patients Add patient
GET /patients Get all patients
POST /send_sms Send SMS
GET /get_logs View message logs
GET /analytics Get statistics

Configuration

Environment Variables

SECRET_KEY=your-secret-key-here
AFRICASTALKING_USERNAME=sandbox
AFRICASTALKING_API_KEY=your-api-key-here
DATABASE_URL=sqlite:///./medlink.db

Get your Africa's Talking credentials at: https://account.africastalking.com/

Deployment

Automated Deployment (GitLab CI/CD)

Every push to main branch:

  1. Runs tests
  2. Builds Docker images
  3. Deploys to production (manual trigger)

Manual Deployment to Render.com

  1. Connect GitLab repository to Render
  2. Set environment variables
  3. Deploy automatically on push

Project Structure

medlink-sms/
├── backend/
│   ├── main.py              # FastAPI application
│   ├── requirements.txt     # Python dependencies
│   ├── Dockerfile          # Docker configuration
│   ├── .env.example        # Environment template
│   └── data/               # SQLite database
├── frontend/
│   ├── src/                # React source code
│   ├── package.json        # Node dependencies
│   └── Dockerfile          # Docker configuration
├── .gitlab-ci.yml          # CI/CD pipeline
├── docker-compose.yml      # Multi-container setup
└── README.md               # This file

Testing

Backend Tests

cd backend
pytest  # Coming soon

Frontend Tests

cd frontend
npm test  # Coming soon

Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Merge Request

License

MIT License - see LICENSE file for details

Acknowledgments

Contact


Made with for African Healthcare

About

Automating healthcare communication across Africa helping medical professionals deliver lab results instantly and reliably through SMS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors