RelaySMS Publisher
Publishes to online platforms, such as Gmail, from content people send by SMS, so they can post without an internet connection.
How it works
---
config:
flowchart:
curve: linear
---
flowchart TB
app["RelaySMS app"]
gateway["Gateway client"]
mailbox["Mailbox"]
platform["Online platforms"]
subgraph publisher["Publisher"]
grpc["gRPC API"]
rest["REST API"]
smtp["Email listener"]
db[("Database")]
worker["Celery worker"]
adapter["Platform adapter"]
%% Keeps the title clear of the arrows entering the box.
spacer[" "]:::hidden
spacer ~~~ worker
end
app -- "link an account, online" --> grpc
app -- "encrypted SMS" --> gateway
gateway -- "HTTPS" --> rest
gateway -- "email" --> mailbox
mailbox -- "IMAP" --> smtp
grpc -- "token, keys" --> db
db --> worker
rest --> worker
smtp --> worker
grpc --> adapter
worker --> adapter
adapter --> platform
classDef hidden fill:none,stroke:none
- While online, a user links an account through the gRPC API. The Publisher stores its token encrypted.
- Offline, the app encrypts the content and sends it by SMS to a gateway client, a phone number that relays SMS.
- The gateway client posts the payload to the REST API, or emails it to a mailbox the Publisher reads.
- A Celery worker decrypts the payload and publishes it through the platform’s adapter.
Key terms
- Gateway client: a phone number that relays SMS to the Publisher, such as an Android phone running Deku SMS. See Connecting a relay.
- Adapter (platform adapter): the plugin that publishes to one platform, such as Gmail, installed from its own repository. See Managing adapters.
- Linked account: a user’s account on a platform, authorized once while online. The Publisher stores its token encrypted.
- OAuth2 and PNBA: how accounts link. OAuth2 goes through the platform’s consent page, as for Gmail. Phone number-based authentication (PNBA) uses a code sent to the user’s phone, as for Telegram. The provider guides give each platform’s protocol.
- Offline payload: content sent without a linked account, published through RelaySMS Mail. See Offline publishing.
The glossary defines the rest, and Architecture shows every component.
Where to start
| To | Read |
|---|---|
| Try the Publisher on your machine | Quick start |
| Run it in production | Requirements, then Install on a server |
| Offer a platform | Managing adapters |
| Relay SMS to the Publisher | Managing gateway clients |
| Build a client | gRPC API and REST API |
| Understand the protocol | Security model and the RelaySMS whitepaper |
Getting help
- Ask questions and report bugs in the issue tracker; CONTRIBUTING.md says what a useful report has.
- Report vulnerabilities privately, as SECURITY.md describes.