https://github.com/cntm-labs/chorus
Open-source Communications Platform as a Service (CPaaS) — SMS, Email, OTP delivery with smart routing, multi-provider failover, and cost optimization. Built in Rust.
https://github.com/cntm-labs/chorus
api communication cpaas email failover multi-provider open-source otp rust sms telnyx twilio
Last synced: about 2 months ago
JSON representation
Open-source Communications Platform as a Service (CPaaS) — SMS, Email, OTP delivery with smart routing, multi-provider failover, and cost optimization. Built in Rust.
- Host: GitHub
- URL: https://github.com/cntm-labs/chorus
- Owner: cntm-labs
- License: mit
- Created: 2026-04-01T14:45:36.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-06T13:32:46.000Z (2 months ago)
- Last Synced: 2026-04-08T21:34:13.296Z (2 months ago)
- Topics: api, communication, cpaas, email, failover, multi-provider, open-source, otp, rust, sms, telnyx, twilio
- Language: Rust
- Size: 188 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# chorus
**Open-source Communications Platform as a Service (CPaaS) — SMS, Email, OTP with smart routing and multi-provider failover.**
[](https://github.com/cntm-labs/chorus/actions/workflows/ci.yml)
[](https://github.com/cntm-labs/chorus/actions/workflows/security.yml)
[](https://github.com/cntm-labs/chorus/actions/workflows/release-please.yml)
[](https://codecov.io/gh/cntm-labs/chorus)
[](https://crates.io/crates/chorus-rs)
[](https://crates.io/crates/chorus-core)
[](https://crates.io/crates/chorus-providers)
[](https://www.npmjs.com/package/@cntm-labs/chorus)
[](https://central.sonatype.com/artifact/io.github.cntm-labs/chorus)
[](https://docs.rs/chorus-rs)
[](crates/)
[](./)
[](https://www.rust-lang.org/)
[](https://github.com/tokio-rs/axum)
[](https://www.postgresql.org/)
[](https://redis.io/)
[](https://www.docker.com/)
[](https://stripe.com/)
---
Rust backend (Axum) with waterfall routing — OTP and notifications via email first (cheap/free), SMS fallback only when needed (paid) — saving 60-80% cost. Supports 7 providers with automatic failover.
## Features
- **Waterfall routing** — send OTP/notifications via email first (Resend, free tier), fall back to SMS only when no email available — saving 60-80% cost
- **Multi-provider failover** — auto-retry with next provider on failure
- **7 providers** — Telnyx, Twilio, Plivo (SMS) + Resend, AWS SES, Mailgun, SMTP (Email)
- **Batch send** — send SMS or Email to multiple recipients in one call
- **Webhooks** — real-time delivery status notifications with HMAC-SHA256 signatures
- **Template engine** — `{{variable}}` syntax with OTP generation
- **SDKs** — Rust, TypeScript, Java (Go, Python, C coming soon)
- **Test mode** — `ch_test_` API keys log only, never send real messages
- **Self-hosted free** — MIT license, no billing when self-hosted
## Quick Start
```rust
use chorus::client::Chorus;
use chorus::types::SmsMessage;
use std::sync::Arc;
let chorus = Chorus::builder()
.add_sms_provider(Arc::new(telnyx))
.add_email_provider(Arc::new(resend))
.default_from_sms("+1234567890".into())
.build();
// Send SMS
let msg = SmsMessage {
to: "+0987654321".into(),
body: "Hello from Chorus!".into(),
from: None,
};
chorus.send_sms(&msg).await?;
// Send OTP via email with SMS fallback
chorus.send_otp("user@example.com", "123456", "MyApp").await?;
```
## Architecture
```
crates/ # Publishable libraries
├── chorus-core # Traits, routing engine, types, errors (leaf crate)
└── chorus-providers # Telnyx, Twilio, Plivo, Resend, SES, Mailgun, SMTP adapters
services/ # Internal binaries (not published)
└── chorus-server # Axum REST API, billing, dashboard
sdks/
├── rust/ # Native SDK (chorus-rs, re-exports chorus-core + providers)
├── typescript/ # Node.js + Browser (@cntm-labs/chorus)
├── java/ # Java 11+ (com.cntm-labs:chorus)
├── go/ # Coming soon
├── python/ # Coming soon
└── c/ # Coming soon
```
## Development
```sh
cargo check --workspace # Type check
cargo test --workspace # Run all tests
cargo clippy --workspace -- -D warnings # Lint
cargo fmt --all # Format
# Setup pre-commit hook
git config core.hooksPath .githooks
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## License
[MIT](LICENSE)