Website · Docs · Try it on your phone · Template builder
Hansho (半鐘, the fire-watch bell) lets any backend reach a specific person's iPhone and Apple Watch: notifications at five urgency levels, pages that ring like an alarm until someone acknowledges them, Live Activities and home screen widgets, end-to-end encrypted. Site and docs: hansho.app.
This repository holds the parts you run and call yourself:
| License | ||
|---|---|---|
hub/ |
The self-hosted server your backend talks to: pairs your users with the app, stores channels, templates and sounds, and delivers messages through Hansho's relay. Image: ghcr.io/recodive/hansho-hub |
AGPL-3.0 |
sdk/ |
Clients for the hub's API in Go, Node/TypeScript, Python, Ruby, PHP, Java/Kotlin, .NET and Rust, plus webhook verification | MIT |
The iPhone and Apple Watch app is in public beta on TestFlight. The relay
that forwards encrypted pushes to Apple is run by Hansho at relay.hansho.app; it only ever sees sealed tokens and
ciphertext.
In Edo, the watchman told the town how close a fire was by how he struck the bell. Hansho's five levels work the same way, and the sender's channel caps how loud a message may get:
| Level | Strikes | On the phone |
|---|---|---|
passive |
○ | Lands in the inbox, no sound |
active |
● | A normal notification |
time-sensitive |
● ● ● | Breaks through Focus |
critical |
●● ●● ● | Sounds even on silent |
page |
●● ●● ━ | Rings like an alarm until someone acknowledges it, on any of their devices |
Run a hub (it needs a public HTTPS domain), pair your phone and send a page in about ten minutes: hub/README.md, or the docs.
npm install @recodive/hansho
go get github.com/recodive/hansho/sdk/go
The other SDKs and their install lines: sdk/README.md.
The hub is licensed under the GNU Affero General Public License v3.0: you can run, change and share it, and if you offer a changed hub to others over a network, you share those changes under the same license. The SDKs are MIT, so they can go into any codebase, open or closed. Each SDK directory carries its own copy.
See CONTRIBUTING.md and the code of conduct. Please report vulnerabilities privately, as described in SECURITY.md, not in public issues.
