Shopify/shopify_app is a Ruby on Rails engine gem (v23.0.3, MIT) that provides the foundational integration layer for building Shopify Apps. It handles OAuth 2.0 authentication with both legacy and new embedded-API token exchange flows, session management (online/offline with access scopes), webhook registration and verification, script tag management, billing, and App Bridge support. The gem ships with dozens of Rails generators to scaffold models, controllers, jobs, views, and routes tailored to embedded and non-embedded app patterns. Architecture is a mounted engine with mixin-based controller concerns (e.g., LoginProtection, EnsureHasSession, WebhookVerification) and configurable session storage backends (default ActiveRecord via host app models, with in-memory stores for development). Key data flows: the app directs users through Shopify OAuth, stores session tokens (with automatic refresh for expiring tokens), then uses the Shopify API (via shopify_api gem) for authenticated calls. The codebase demonstrates disciplined Rails engine design, robust security practices (HMAC verification, CSP, CSRF protection, sanitized redirects), and strong test coverage with 300+ test files. Notable craftsmanship includes the session storage mixins (ShopSessionStorage, UserSessionStorage) that separate concerns via method injection, the access-scope verification strategies, and the full-page redirect pattern for embedded apps. Maintenance is activeβdespite some doc-coverage inconsistencies (e.g., deprecated modules still tested) and two coexisting auth strategies that add conditional complexity, the gem tracks modern Shopify API versions and Ruby/Rails requirements (>= 3.2 / >= 7.1). The large generator surface and i18n support (20 locales) show attention to developer experience.
This is a Ruby gem that integrates Bootstrap 5.3.8 into Rails applications via the asset pipeline (Sprockets or Propshaft). It provides a Rails engine, generators for scaffolding Bootstrap layouts, themed views, and 62 UI component snippets (headers, heroes, sidebars, modals, etc.), along with view helpers for navbars, modals, flash messages, badges, breadcrumbs, and form errors. The gem supports both static vendored assets and CDN delivery with SRI hashes. Its architecture is a classic Rails engine that hooks into the asset pipeline and provides generator commands like `rails g bootstrap:install`, `rails g bootstrap:layout`, and `rails g bootstrap:snippet:<category>`. Despite being updated to vendor Bootstrap 5.3.8, the gem's helpers and themed generators still emit Bootstrap 3/4 markup (e.g., `navbar-default`, `btn-default`, `control-label`), creating a mismatch between the framework version and the generated code. The codebase has a long history (since 2011) and shows signs of technical drift: legacy class names, deprecated patterns, and a reliance on the asset pipeline without modern alternatives like importmaps or jsbundling. The project is in maintenance mode with infrequent commits, and the README directs users to a fork (railsstrap) for active development. Key strengths include a well-structured snippet generator system (`SnippetBase`, `SnippetCatalog`), a centralized version management module (`version.rb`), and a CDN tag helper that avoids hardcoded URLs. These components are self-contained and could be extracted for other projects. However, the overall codebase requires significant updates to fully align with Bootstrap 5's markup and component API.