How binwiederhier/ntfy works
ntfy is an HTTP publish-subscribe notification service. Publishers send a message to a topic; the server authenticates and authorizes the request, dispatches it to topic subscribers, persists it for polling/replay, and triggers optional delivery side effects. Web and mobile-oriented clients subscribe, store notifications locally, and display them. The sampled source confirms server routing, topic subscription, user ACLs, persistence, attachments, web push, payments, and maintenance; several integrations are represented at their enclosing paths because their internals were not sampled.
Main entry points: server.go HTTP Server · store.go Attachment Store · db.go SQL Database · SubscriptionManager.js Subscription Manager
Components 22
Notification Runtime
- HTTP Server
server/server.go - Topic Router
server/topic.go
Domain Services
- User Access Manager
user/manager.go - Attachment Store
attachment/store.go - Web Push Store
webpush/store.go
Persistence
- Message Cache
message/cache.go - SQL Database
db/db.go - File Backend
attachment/backend_file.go
Client Application
- Web Application
web/src/components/App.jsx - Subscription Manager
web/src/app/SubscriptionManager.js - Browser Database
web/src/app/db.js - Client Notifier
web/src/app/Notifier.js
External Integrations
- S3 Client
s3/client.go - Payment Service
payments/payments.go - Mail Sender
mail/sender.go - Metrics Exporter
metrics/metrics.go
Other components
- Publisher
- Subscriber
- Object Storage
- Stripe
- SMTP Service
- Firebase
Connections 27
- Publisher → HTTP Server: publishes to
- Subscriber → HTTP Server: subscribes via
- Web Application → Subscription Manager: manages subscriptions
- Web Application → HTTP Server: calls API
- HTTP Server → User Access Manager: checks access
- HTTP Server → Topic Router: dispatches topic
- Topic Router → Subscriber: delivers messages
- HTTP Server → Message Cache: caches messages
- HTTP Server → Attachment Store: handles attachments
- HTTP Server → Web Push Store: manages subscriptions
- HTTP Server → Payment Service: checks plans
- HTTP Server → Mail Sender: sends email
- HTTP Server → Metrics Exporter: updates metrics
- User Access Manager → SQL Database: reads and writes
- Message Cache → SQL Database: reads and writes
- Web Push Store → SQL Database: reads and writes
- Attachment Store → SQL Database: tracks metadata
- Attachment Store → File Backend: stores files
- Attachment Store → S3 Client: uploads objects
- File Backend → Object Storage: writes files
- S3 Client → Object Storage: reads and writes
- Payment Service → Stripe: charges plans
- Mail Sender → SMTP Service: relays mail
- HTTP Server → Firebase: pushes keepalive
- Subscription Manager → Browser Database: stores notifications
- Subscription Manager → Client Notifier: triggers alerts
- HTTP Server → Web Application: streams notifications