Automating healthcare communication across Africa—helping medical professionals deliver lab results instantly and reliably through SMS.
- 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
- FastAPI - Modern Python web framework
- SQLAlchemy - SQL ORM
- SQLite/PostgreSQL - Database
- JWT - Authentication
- Africa's Talking API - SMS delivery
- React 18 - UI library
- Tailwind CSS - Styling
- Axios - HTTP client
- Vite - Build tool
- Docker - Containerization
- GitLab CI/CD - Automated deployment
- Render.com - Hosting
# 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/docscd 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 --reloadcd frontend
npm install
npm run dev# 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 --buildOnce running, visit:
- Interactive Docs: http://localhost:8000/docs
- Alternative Docs: http://localhost:8000/redoc
| 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 |
SECRET_KEY=your-secret-key-here
AFRICASTALKING_USERNAME=sandbox
AFRICASTALKING_API_KEY=your-api-key-here
DATABASE_URL=sqlite:///./medlink.dbGet your Africa's Talking credentials at: https://account.africastalking.com/
Every push to main branch:
- Runs tests
- Builds Docker images
- Deploys to production (manual trigger)
- Connect GitLab repository to Render
- Set environment variables
- Deploy automatically on push
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
cd backend
pytest # Coming sooncd frontend
npm test # Coming soon- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Merge Request
MIT License - see LICENSE file for details
- Africa's Talking - SMS API
- FastAPI - Web framework
- Healthcare workers across Africa who inspired this project
- Project Link: https://gitlab.com/AlAfiz/medlink-sms
- Live Demo: https://medlink-sms.onrender.com
- API Docs: https://medlink-api.onrender.com/docs
Made with for African Healthcare