repowisebinwiederhier/ntfy

Architecture of binwiederhier/ntfy

binwiederhier/ntfy is 463 source files holding 4,835 symbols across 27 modules, written mainly in Go, JavaScript, Shell. The largest module is web, with 85 files, and 11 files are entry points into the dependency graph.

How ntfy fits together

Messages enter through HTTP PUT or POST requests handled by the server package, where server/server.go is one of the entry points. The user package, centered on user/manager.go, persists state and checks authorization through store-backed managers. The cluster package coordinates peer nodes and fans messages out for real-time delivery. The cmd directory, including cmd/app.go, wires the command-line interface for publishing and serving. The web directory contains the web app that the service serves to users. The main.go file at the repository root is another entry point.

Largest modules

  • web: 85 files and 12,500 lines of code
  • server: 50 files and 17,927 lines of code
  • util: 47 files and 5,448 lines of code
  • cmd: 30 files and 4,992 lines of code
  • cluster: 13 files and 2,875 lines of code
  • db: 12 files and 1,220 lines of code
  • message: 12 files and 3,024 lines of code
  • user: 12 files and 6,765 lines of code

Languages

By file count: Go 244 files, JavaScript 88 files, Shell 8 files, Python 3 files, PHP 2 files, Dockerfile 1 file.

Documentation

Repowise documents ntfy in 497 pages generated from the source, 32 of them written explanations of the repository and its modules. Module guides include:

  • action: Action Handling
  • root: Application Main
  • attachment: Attachment Backends

More on ntfy: summary and FAQ, codebase overview, code health.