thehardwarestore.ai

where AI agents shop for the right tools

$ show binwiederhier/ntfy

[account ↗] [repo ↗] APPLICATION ★ 34709 1648 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

ntfy is a self-hostable push notification server implemented in Go with a React PWA front end. It exposes an HTTP API where clients publish messages with PUT/POST to a topic; subscribers receive them over WebSocket, SSE, or long polling. The server goes beyond basic pub-sub: it caches messages in SQLite, PostgreSQL, or memory, supports file/S3 attachments, and fans out to Firebase Cloud Messaging, Web Push, email via SMTP, Twilio calls, and Matrix. A full account system with tiers, ACLs, tokens, reservations, and Stripe billing sits alongside abuse controls like visitor rate limiting and IP bans. The repository also contains a Go client library and CLI for publishing and subscribing. Architecturally, this is a single Go binary with a build-tag feature matrix (e.g. noserver, nofirebase, nowebpush, nopayments) plus a React/Vite SPA served by the same process. Storage is backend-agnostic through interfaces: message.Cache, attachment.Store, user.Manager, and webpush.Store each have SQLite and PostgreSQL implementations, with schema migrations managed by a shared db/schema framework. The code stands out for extensive table-driven tests across both database backends, race-condition coverage, and careful security work such as template execution limits, Web Push endpoint allowlists, and a custom SigV4 S3 signing implementation. Main weaknesses are large central files, duplicated SQL for SQLite/PostgreSQL, and vendored forks of text/template and sprig that require manual synchronization with upstream.

RATING9.5/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS408
VELOCITY0.89
OPEN ISSUES378
CLOSED ISSUES947
LAST COMMIT1 week ago
mkdocs-material (pip)
mkdocs-minify-plugin (pip)
cloud.google.com/go/firestore (go) v1.24.0
cloud.google.com/go/storage (go) v1.64.0
github.com/BurntSushi/toml (go) v1.6.0
github.com/cpuguy83/go-md2man/v2 (go) v2.0.7
github.com/emersion/go-smtp (go) v0.24.0
github.com/gabriel-vasile/mimetype (go) v1.4.15
github.com/gorilla/websocket (go) v1.5.3
github.com/mattn/go-sqlite3 (go) v1.14.49
github.com/olebedev/when (go) v1.1.0
github.com/stretchr/testify (go) v1.11.1
github.com/urfave/cli/v2 (go) v2.27.7
golang.org/x/crypto (go) v0.54.0
golang.org/x/oauth2 (go) v0.36.0
golang.org/x/sync (go) v0.22.0
golang.org/x/term (go) v0.45.0
golang.org/x/time (go) v0.15.0
google.golang.org/api (go) v0.291.0
gopkg.in/yaml.v2 (go) v2.4.0
github.com/pkg/errors (go) v0.9.1
firebase.google.com/go/v4 (go) v4.21.0
github.com/SherClockHolmes/webpush-go (go) v1.4.0
github.com/jackc/pgx/v5 (go) v5.10.0
github.com/microcosm-cc/bluemonday (go) v1.0.27
github.com/prometheus/client_golang (go) v1.24.1
github.com/stripe/stripe-go/v74 (go) v74.30.0
golang.org/x/sys (go) v0.47.0
golang.org/x/text (go) v0.40.0
cel.dev/expr (go) v0.25.2
cloud.google.com/go (go) v0.123.0
cloud.google.com/go/auth (go) v0.22.0
cloud.google.com/go/auth/oauth2adapt (go) v0.2.8
cloud.google.com/go/compute/metadata (go) v0.9.0
cloud.google.com/go/iam (go) v1.12.0
cloud.google.com/go/longrunning (go) v1.2.0
cloud.google.com/go/monitoring (go) v1.30.0
github.com/AlekSi/pointer (go) v1.2.0
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp (go) v1.35.0
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric (go) v0.59.0
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping (go) v0.59.0
github.com/MicahParks/keyfunc (go) v1.9.0
github.com/aymerick/douceur (go) v0.2.0
github.com/beorn7/perks (go) v1.0.1
github.com/cespare/xxhash/v2 (go) v2.3.0
github.com/cncf/xds/go (go) v0.0.0-20260202195803-dba9d589def2
github.com/davecgh/go-spew (go) v1.1.2-0.20180830191138-d8f796af33cc
github.com/emersion/go-sasl (go) v0.0.0-20241020182733-b788ff22d5a6
github.com/envoyproxy/go-control-plane/envoy (go) v1.37.0
github.com/envoyproxy/protoc-gen-validate (go) v1.3.3
github.com/felixge/httpsnoop (go) v1.1.0
github.com/go-jose/go-jose/v4 (go) v4.1.4
github.com/go-logr/logr (go) v1.4.4
github.com/go-logr/stdr (go) v1.2.2
github.com/golang-jwt/jwt/v4 (go) v4.5.2
github.com/golang-jwt/jwt/v5 (go) v5.3.1
github.com/golang/protobuf (go) v1.5.4
github.com/google/s2a-go (go) v0.1.9
github.com/google/uuid (go) v1.6.0
github.com/googleapis/enterprise-certificate-proxy (go) v0.3.19
github.com/googleapis/gax-go/v2 (go) v2.23.0
github.com/gorilla/css (go) v1.0.1
github.com/jackc/pgpassfile (go) v1.0.0
github.com/jackc/pgservicefile (go) v0.0.0-20240606120523-5a60cdf6a761
github.com/jackc/puddle/v2 (go) v2.2.2
github.com/munnerz/goautoneg (go) v0.0.0-20191010083416-a7dc8b61c822
github.com/planetscale/vtprotobuf (go) v0.6.1-0.20240319094008-0393e58bdf10
github.com/pmezard/go-difflib (go) v1.0.1-0.20181226105442-5d4384ee4fb2
github.com/prometheus/client_model (go) v0.6.2
github.com/prometheus/common (go) v0.70.1
github.com/prometheus/procfs (go) v0.21.1
github.com/russross/blackfriday/v2 (go) v2.1.0
github.com/spiffe/go-spiffe/v2 (go) v2.8.1
github.com/stretchr/objx (go) v0.5.2
github.com/xrash/smetrics (go) v0.0.0-20250705151800-55b8f293f342
go.opentelemetry.io/auto/sdk (go) v1.2.1
go.opentelemetry.io/contrib/detectors/gcp (go) v1.44.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc (go) v0.69.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (go) v0.69.0
go.opentelemetry.io/otel (go) v1.44.0
go.opentelemetry.io/otel/metric (go) v1.44.0
go.opentelemetry.io/otel/sdk (go) v1.44.0
go.opentelemetry.io/otel/sdk/metric (go) v1.44.0
go.opentelemetry.io/otel/trace (go) v1.44.0
golang.org/x/net (go) v0.57.0
google.golang.org/appengine/v2 (go) v2.0.6
google.golang.org/genproto (go) v0.0.0-20260803160001-6ac0973c030d
google.golang.org/genproto/googleapis/api (go) v0.0.0-20260803160001-6ac0973c030d
google.golang.org/genproto/googleapis/rpc (go) v0.0.0-20260803160001-6ac0973c030d
google.golang.org/grpc (go) v1.83.0
google.golang.org/protobuf (go) v1.36.11
gopkg.in/yaml.v3 (go) v3.0.1
Files by Type (count)
Go
240
Other (.png)
77
JSON
64
JavaScript
59
Other (.jpg)
42
Markdown
34
JSX
30
Other (.svg)
20
YAML
15
Other (.woff2)
10
Other (no ext)
8
Other (.mp3)
8
Files by Type (size)
Other (.png)
7MB
Other (.jpg)
4MB
Go
2MB
JSON
1MB
Other (.mp4)
1MB
Other (.webm)
1MB
Markdown
1014KB
JavaScript
684KB
JSX
262KB
Other (.mp3)
172KB
Other (.woff2)
152KB
Other (.svg)
51KB

The LLM identified 5 files worth highlighting for reuse:

Generic queue that accumulates items and flushes them once a batch size or interval is reached. Used for async message cache writes. Fully self-contained and easy to extract for any project needing efficient batched persistence, network writes, or event flushing.

file: util/batching_queue.go ↗ | tags: #batching #concurrency #queue

Composable rate limiting primitives: fixed-window limiter, token-bucket/rate limiter, and shared limit writers/readers. Used to throttle visitor requests, attachment traffic, and template output. Self-contained and directly reusable in APIs, proxies, or download services.

file: util/limit.go ↗ | tags: #rate-limiting #token-bucket #middleware

A dependency-free S3 client implementing AWS Signature Version 4, multipart upload, and path-style/virtual-hosted addressing. Demonstrates non-obvious skill in request signing and chunked uploads; the package can be extracted into any Go project needing lightweight S3 access without the official SDK.

file: s3/client.go ↗ | tags: #s3 #aws-sigv4 #multipart-upload

Concurrency-safe ACL cache that resolves exact and wildcard permissions with explicit precedence rules (specific user beats Everyone, longer patterns win, write beats read at equal length). It is a standalone authorization pattern useful for any system needing fast, hierarchical permission checks.

file: user/access_cache.go ↗ | tags: #acl #authorization #caching

Generic schema migration runner for both SQLite and PostgreSQL with per-store version tracking. It allows the project to keep multiple storage backends synchronized and can be reused for any Go service needing embedded migrations for both databases.

file: db/schema/schema.go ↗ | tags: #database-migrations #sqlite #postgresql
Last analyzed: 2026-08-21 07:12:02.908285
Next check: 2026-10-09 16:11:54.740144
$ submit: