Skip to content
The future is handmade

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

Ruby gem
v0.38.0 · 32.8K downloads
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
View on GitHub
Ruby gem
v0.3.0 · 2.6K downloads
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_singpass
View on GitHub

Reliability & Observability

Ruby gem
v0.3.0 · 6.2K downloads
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
View on GitHub
Ruby gem
v0.5.0 · 6.3K downloads
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
View on GitHub
Ruby gem
v0.11.0 · 10K downloads
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_audit
View on GitHub

Data Patterns

Ruby gem
v0.4.0 · 2.9K downloads
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
View on GitHub
© 2026 RAREBIT ONE (UEN 53503079K)
60 Paya Lebar Road, #06-28, Paya Lebar Square, Singapore 409051
Built by the farm · 7 Aug 2026, 23:24 SGT ·Privacy