Skip to main content

SDK Reference

backend/pkg/sdk is the contract every module — core or a fork's addon — programs against. It defines:

  • The Module lifecycle interface (Init, RegisterRoutes, Start, Stop, HealthCheck).
  • The ServiceRegistry — a typed key-value store for cross-module service sharing.
  • The ConfigService — DB-backed + Redis-cached config with AES-256-GCM-encrypted secrets.
  • The pkg/sdk/iface consumer-facing interfaces (UserProvider, NotificationSender, TenantProvider, AuthzProvider, AuditSink, …) that prevent direct cross-module imports.
  • Object storage — the presigned-upload seam a module uses to store user-uploaded blobs.

It is in-tree, not a published module

ADR-0006 (D2) reverted an earlier multi-repo SDK split. The backend is a single Go module: pkg/sdk ships inside it, and there is no satellite go.mod, no go.work, no replace directive, and nothing published to the Go proxy. A fork's addons live in-tree alongside the core modules and import the SDK by its in-repo path.

Re-introducing a satellite module is a forbidden pattern, not a preference — the split cost more in version-skew and release choreography than the decoupling was worth.

Build your first addon

See Build your first addon.