Skip to content

Overview

vendors holds optional production backends for SAF abstract packages — thin adapters around third-party SDKs. Products opt in at bootstrap (configure* helpers); local dev and tests use in-memory or env-backed implementations from the abstract layer.

Each vendor package is a direct npm workspace under saflib/vendors/{name}/ and imports as @saflib/vendors-{name}.

By abstract package

Abstract packageVendor packages
@saflib/secret-storeInfisical
@saflib/object-storeGCS, Azure
@saflib/emailBrevo
@saflib/analyticsPostHog (server), PostHog (client)
@saflib/errorsSentry (Node), Sentry (client)
@saflib/node (logging)Loki

Integration pattern

If you'd like to make your own, use integrations/init and use an instance of the abstract class as the client. Declare any required secrets (see secret store). Then instantiate and use the class; by using SAF abstract interfaces, it becomes trivial to duplicate or swap conventional services, and mocks and debugging tools work for free.