Go packages
Eleven Go packages for SaaS backends.
The pieces every multi-tenant product needs and nobody wants to write twice — tenancy, permissions, approvals, audit, settings, flags, translations, files, notifications, backups and an admin panel — as small, separate modules. Each is MIT-licensed, needs Go 1.26 or later, and those that store data do it in PostgreSQL through pgx v5. All are at v0.2.0: usable today, with the API still free to change before 1.0. Read the launch post.
go-tenancy
Tenants, memberships and invitations, isolated in Postgres.
Tenants with slugs and custom domains, memberships with a concurrency-safe last-owner guard, single-use invitations stored only as hashes, middleware that resolves each request’s tenant, and row-level security inside shared tables.
go get github.com/byteminus/go-tenancy
go-permission
Roles, wildcard permissions and typed policies.
Ask Can(ctx, user, "invoices.create", tenant). Roles per tenant or team, typed policy functions for rules that depend on the resource, and cached checks kept coherent across instances with LISTEN/NOTIFY.
go get github.com/byteminus/go-permission
go-approvals
Multi-step approvals with separation of duties.
Any, all or quorum steps, role-based approvers, deadlines and hooks. Requests snapshot their steps so a deploy never breaks work in flight, decisions are serialised with row locks, and hooks run in the same transaction.
go get github.com/byteminus/go-approvals
go-activitylog
Who changed what, in the same transaction as the change.
Tag the fields you care about and every create, update and delete is recorded with its actor, tenant, request and field diff — secrets marked as changed without their values. Read it back as a feed, a record’s history or an actor’s trail.
go get github.com/byteminus/go-activitylog
go-settings
Typed settings at global, tenant and user scope.
Declare a Key[T] with a default and a rule; the most specific override wins. Secrets are encrypted at rest with rotating AES-256-GCM keys, and an in-process cache stays coherent across instances.
go get github.com/byteminus/go-settings
go-featureflags
Flags, targeting and sticky percentage rollouts.
Evaluated against an immutable in-memory snapshot, so a request never waits on the database: kill switches, user and tenant targeting, attribute rules and weighted variants, refreshed by polling or pushed from Postgres.
go get github.com/byteminus/go-featureflags
go-translatable
Multilingual jsonb fields with locale fallback.
Translations live in your own tables as jsonb, with no extra tables or joins. BCP 47 fallback chains, request locale from the URL, a cookie or Accept-Language, and the same fallback applied inside SQL for sorting and filtering.
go get github.com/byteminus/go-translatable
go-medialibrary
Attach validated uploads to models, with conversions.
Uploads checked by their real content type, stored on a local disk or any S3-compatible bucket (S3, R2, MinIO), recorded in Postgres, with thumbnails made inline or through your own job queue. A record never points at a missing file.
go get github.com/byteminus/go-medialibrary
go-notifications
Email, SMS, push and an in-app inbox, one dispatcher.
A notification is a Go type that says how it renders per channel. The dispatcher respects opt-outs and reports what happened per recipient and channel. SMTP, Twilio and FCM are built in; the inbox is stored in Postgres.
go get github.com/byteminus/go-notifications
go-backup
Postgres and file backups, encrypted, verified, restorable.
pg_dump and upload archives, encrypted with age, streamed to a local volume and S3-compatible storage at once, checksums verified, pruned grandfather-father-son. A backup is complete only once every byte and its manifest are stored.
go get github.com/byteminus/go-backup
go-admin
A server-rendered admin panel from Go definitions.
Lists with search, filters and bulk actions, detail pages, validated forms and a dashboard, as a plain http.Handler with no code generation. It asks your authoriser before every page and write, and ships a strict Content-Security-Policy.
go get github.com/byteminus/go-admin