Each time: JWT validation, refresh rotation, session revoke, tenant context, RBAC checks, SQL filters for tenant_id. Same patterns, different codebases.
So I extracted it into a modular library. You pick what you need: auth, tenant, permission, storage, cache, lock, billing, etc. Each module has interfaces; you plug in MySQL, Postgres, MongoDB, or Redis. No framework lock-in—works with net/http, chi, gin, echo, fiber, GraphQL.
What’s included:
Auth: JWT, OAuth2, SAML, LDAP, API keys, WebAuthn, magic link Multi-tenant: lifecycle, feature flags, SQL filters Permission: RBAC, ABAC, cached checks Storage adapters: memory, Postgres, MySQL, MongoDB, Redis Extras: cache, lock, health, job queue, billing, GDPR export I’d love feedback—especially on the module boundaries and what’s missing for real-world SaaS.
GitHub: https://github.com/parevo/core Docs: https://parevo.github.io/core/