better-push
Start here

Comparison

How a library inside your stack differs from a hosted notification service.

Novu, Knock, and OneSignal are notification services. better-push is a library inside your application. The important choice is not a checklist of push APIs; it is where subscriber identity, preferences, content, endpoints, and operations live.

better-pushNovu / Knock / OneSignalBuild it yourself
User and device source of truthyour Postgressynced to a vendorwhatever you design
Endpoint and sessionmounted in your appvendor API and SDKyours
Notification contentyour database and providervendor service and provideryours
Push and in-app feedincludedincludedbuild both
Email, SMS, Slacknocommonly includedbuild or integrate
Campaign and template UInohosted productbuild it
Non-engineer dashboardno hosted dashboardyesbuild and operate it
DatabasesPostgres onlyvendor-managedyour choice
Operations and on-callyoushared with vendoryou
Hosting feeinfrastructure you runusage or contract pricinginfrastructure and engineering

The subscriber-sync problem

A hosted service needs a second representation of your users. Your application must create subscribers, update profile fields, rotate device tokens, reconcile preferences, and delete data in both systems. That can be a good trade when a marketing or support team needs a hosted workflow product.

better-push removes that category of integration. session() returns the user already authenticated by your app, bp_device.user_id uses the same id, and a send queries that user's devices and preferences in the same database. There is no subscriber API to keep synchronized because there is no second subscriber store.

When a hosted service is the better fit

Choose a service when non-engineers need campaigns, visual workflows, templating, analytics, or channels such as email and SMS; when vendor support and an external team on call are worth the data boundary; or when Postgres and Node do not fit the application.

When better-push is the better fit

Choose better-push when push and an in-app feed belong inside a TypeScript app, subscriber data should not be synchronized elsewhere, notification history needs to join directly to application data, and your team is prepared to run the database, worker, provider credentials, and operational response.

When to build it yourself

Build from scratch when the provider or workflow model is fundamentally different, another database is mandatory, or owning every protocol detail is a product requirement. The cost includes token lifecycle, retries, idempotency, preferences, cross-user query safety, provider receipts, observability, admin authorization, and years of edge cases—not only the first successful push.

On this page