Turn your tasks into timely SMS updates.
Task2SMS is a web-based automation tool that lets users create and manage tasks which automatically send SMS updates based on schedules or conditions. It provides reliable, offline-capable notifications so users receive vital updates even with intermittent internet.
- ✅ Task Management: Create, edit, and manage automated tasks
- 📅 Flexible Scheduling: Cron expressions or human-readable schedules (e.g., "every 1 hour")
- 🎯 Conditional Notifications: Send SMS based on rules (e.g., "if total > 140")
- 📱 Multi-Provider SMS: Support for Africa's Talking, Twilio, and GSM modems
- 🔄 Offline Queue: Automatic retry for failed messages
- 🌐 Modern UI: React dashboard with Tailwind CSS
- 🔐 User Authentication: Secure login and registration
- 📊 Notification History: Track all sent messages and delivery status
- FastAPI: Modern Python web framework
- SQLAlchemy: Database ORM
- PostgreSQL/SQLite: Database
- APScheduler: Task scheduling
- Africa's Talking/Twilio: SMS providers
- pySerial: GSM modem support
- React: UI library
- Vite: Build tool
- Tailwind CSS: Styling
- React Router: Navigation
- Axios: HTTP client
- Python 3.12
- Node.js 18+
- PostgreSQL (optional, SQLite works for development)
If you need to install or update Rust on Windows (PowerShell), for example when a dependency requires Rust toolchain, use the steps below.
- Install Rust (PowerShell):
Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile rustup-init.exe
.\rustup-init.exe -y-
After installation, close and reopen PowerShell.
-
Verify Rust and Cargo are available:
rustc --version
cargo --version- Reinstall Python requirements (from the project root or
backendfolder whererequirements.txtlives):
pip install -r requirements.txtNotes:
- The
Invoke-WebRequeststep downloads the Rust installer and runs it non-interactively (-y). - If you prefer a GUI installer or need a different architecture, visit https://www.rust-lang.org/tools/install.
Add to User PATH:
[Environment]::SetEnvironmentVariable(
"Path",
[Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\.cargo\bin",
"User"
)Add to System PATH (Requires Admin):
[Environment]::SetEnvironmentVariable(
"Path",
[Environment]::GetEnvironmentVariable("Path", "Machine") + ";$env:USERPROFILE\.cargo\bin",
"Machine"
)Add to User PATH:
setx PATH "%PATH%;%USERPROFILE%\.cargo\bin"Add to System PATH (Requires Admin):
setx /M PATH "%PATH%;%USERPROFILE%\.cargo\bin"After setting the environment variable, refresh the current session:
PowerShell:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")Command Prompt:
set PATH=%PATH%;%USERPROFILE%\.cargo\binIf you're on Linux or Mac, add to ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.cargo/bin:$PATH"Then reload:
source ~/.bashrc # or ~/.zshrcAfter running any of the above, verify with:
rustc --version
cargo --version- Clone the repository
git clone https://github.com/TisoneK/Task2SMS.git
cd Task2SMS- Backend Setup
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create .env file
cp .env.example .env
# Edit .env with your configuration
# For development, uncomment the SQLite line in .env:
# DATABASE_URL=sqlite:///./task2sms.db
# Run the backend
python main.pyThe backend will be available at http://localhost:8000
- Frontend Setup
cd frontend
# Install dependencies
npm install
# Run the development server
npm run devThe frontend will be available at http://localhost:3000
# Create .env file in the root directory with your SMS provider credentials
cp backend/.env.example .env
# Build and run with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -fAccess the application at http://localhost
Create a .env file in the backend directory:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/task2sms
# Or use SQLite for development:
# DATABASE_URL=sqlite:///./task2sms.db
# Security
SECRET_KEY=your-secret-key-here
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Africa's Talking
AFRICASTALKING_USERNAME=your-username
AFRICASTALKING_API_KEY=your-api-key
# Twilio
TWILIO_ACCOUNT_SID=your-account-sid
TWILIO_AUTH_TOKEN=your-auth-token
TWILIO_PHONE_NUMBER=+1234567890
# GSM Modem (optional)
GSM_MODEM_PORT=/dev/ttyUSB0
GSM_MODEM_BAUDRATE=115200-
Register/Login to your account
-
Click "New Task" on the dashboard
-
Fill in the task details:
- Name: Task identifier (e.g., "Lakers vs Bulls")
- Description: Optional details
- Source Link: API endpoint to fetch data from
- Schedule: "every 1 hour" or cron expression "0 * * * *"
- Recipients: Phone numbers (e.g., +254712345678)
- Condition: When to send SMS (always, total over, field equals, etc.)
- Message Template: Use
{field_name}for dynamic values
-
Click "Create Task"
Task: Basketball Game Updates
- Name: Lakers vs Bulls
- Schedule: every 30 minutes
- Condition: Total score over 140
- Recipients: +254712345678
- Message:
{home_team} {home_score} - {away_team} {away_score}. Total: {total}
The system will check the data source every 30 minutes and send an SMS when the total score exceeds 140.
Once the backend is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
POST /api/auth/register- Register new userPOST /api/auth/login- LoginGET /api/tasks/- Get all tasksPOST /api/tasks/- Create taskPUT /api/tasks/{id}- Update taskDELETE /api/tasks/{id}- Delete taskGET /api/notifications/- Get notification history
- Sign up at africastalking.com
- Get your API key from the dashboard
- Add credentials to
.env
- Sign up at twilio.com
- Get your Account SID and Auth Token
- Purchase a phone number
- Add credentials to
.env
- Connect a GSM modem to your server
- Set
GSM_MODEM_PORTin.env(e.g.,/dev/ttyUSB0on Linux,COM3on Windows) - The system will automatically use the modem as a fallback
- Create a new project on Railway
- Add PostgreSQL database
- Deploy from GitHub
- Set environment variables
- Deploy!
- Create a new Web Service on Render
- Connect your repository
- Add PostgreSQL database
- Set environment variables
- Deploy!
- Create a Droplet
- Install Docker and Docker Compose
- Clone the repository
- Set up environment variables
- Run
docker-compose up -d
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to all the contributors who have helped make Task2SMS better!
For issues and questions, please open an issue on GitHub.
⭐ If you find Task2SMS useful, please consider giving it a star on GitHub!
- Multi-user accounts with role-based access
- Advanced analytics and reporting
- WhatsApp integration
- Email notifications
- Mobile app (React Native)
- Webhook support
- Custom data source integrations
- AI-powered message generation
Built with ❤️ for reliable SMS notifications anywhere, anytime.