Open-source primitives
The building blocks we run on — auth, reliability, and data patterns extracted from real production Rails work, released as focused Ruby gems. No frameworks, no lock-in.
Authentication & Identity

StandardId
A comprehensive authentication engine for Rails 8.
A complete, secure-by-default auth solution built on Rails' own security primitives. Dual-engine architecture cleanly separates cookie-based web auth (/) from JWT-based API auth (/api), with OAuth 2.0 / OpenID Connect, passwordless email & SMS OTP, and STI-backed session management.
Full OAuth 2.0 + OIDC with PKCE enforcement and client-secret rotation
Hardened passwordless OTP with enumeration defense and atomic attempt tracking
Polymorphic multi-tenant OAuth clients with audit trail
Decoupled event system via ActiveSupport::Notifications
Optional Inertia.js integration for React/Vue/Svelte SPAs
gem install standard_id
StandardSingpass
Singpass MyInfo (FAPI 2.0) client for Rails.
A library-only gem packaging the hard parts of integrating with Singapore's national digital identity service — including native ECDH-ES JWE decryption that the upstream jwt gem does not support. Deliberately owns no routes, models, or UI; the host app keeps full control of persistence and presentation.
FAPI 2.0 OAuth with PKCE, DPoP, and private_key_jwt
JWS verification with JWKS caching and one-shot rotation retry
Person-data parser covering 40+ fields across identity, income, employment, housing, and assets
Optional circuit-breaker integration for network resilience
gem install standard_singpassReliability & Observability

StandardCircuit
Circuit breaker primitives for Rails, built on stoplight.
Wraps stoplight with an opinionated error taxonomy that distinguishes tracked network failures from caller/config errors, plus SDK-specific adapter bundles for Stripe, AWS, Faraday, and SMTP.
Built-in Logger, Sentry, and Metrics subscribers
ActiveStorage per-S3-bucket keying and ActionMailer wrappers
Controller concern returning standardized 503s for orchestrator probes
RSpec helpers force_open and force_closed with auto-cleanup
gem install standard_circuit
StandardHealth
Drop-in health checks and environment auditing for Rails 8.
A mountable engine exposing /health/alive, /health/ready, and /health/diagnostics/env. Ships checks for ActiveRecord, SolidQueue, and SolidCache, with a DSL for declaring required/recommended env vars.
Pluggable custom checks via inheritance
Per-check criticality flips overall readiness status
EnvSpec DSL with predicates, mode aliases, and consumed-by pointers
HTTP 503/200 semantics matching standard probe conventions
gem install standard_health
StandardAudit
Database-backed audit logging via Rails events.
Captures audit events into a dedicated table using GlobalID polymorphic references — no foreign keys, no schema coupling. Subscribes to Rails.event on Rails 8.1+ with an ActiveSupport::Notifications fallback, and wires to StandardId with zero direct references between the gems.
Composable scope queries for_actor, for_target, by_event_type
Async processing with retry caps
GDPR anonymization and data export
Automatic stripping of sensitive keys including passwords and tokens
gem install standard_auditData Patterns

StandardLedger
Immutable journal entries with declarative aggregate projections.
Captures the recurring append-only entry → N projection updates pattern as a DSL on host ActiveRecord models, with idempotency enforced by unique index and deterministic log replay.
Five projection modes: inline, async, sql, matview, trigger
rebuild! replays the entry log; refresh! handles ad-hoc matview refresh
Pure SQL projections using UPDATE ... FROM with no Ruby-side handler
doctor rake task validates host-owned Postgres triggers
gem install standard_ledger