Back to Source Monitor

Dependencies

.vbw-planning/codebase/DEPENDENCIES.md

0.13.04.2 KB
Original Source

Dependencies

Runtime Dependencies (gemspec)

These are declared in source_monitor.gemspec and required by any host app using the engine.

GemConstraintPurposeRisk
rails>= 8.0.3, < 9.0Core frameworkMajor version lock
cssbundling-rails~> 1.4CSS asset bundling bridgeLow
jsbundling-rails~> 1.3JS asset bundling bridgeLow
turbo-rails~> 2.0Hotwire Turbo for real-time updatesMedium - optional but recommended
feedjira>= 3.2, < 5.0Feed parsing (RSS/Atom)Core functionality
faraday~> 2.9HTTP clientCore functionality
faraday-retry~> 2.2Retry middlewareLow
faraday-follow_redirects~> 0.4Redirect handlingLow
faraday-gzip~> 3.0Compression supportLow
nokolexbor~> 0.5Fast HTML parsing (lexbor engine)Medium - native extension
ruby-readability~> 0.7Article content extractionMedium - older gem
solid_queue>= 0.3, < 3.0Background job processingCore functionality
solid_cable>= 3.0, < 4.0Action Cable adapterReal-time features
ransack~> 4.2Search/filter form builderMedium

Optional Runtime Dependencies

Loaded with rescue from LoadError in lib/source_monitor.rb:

  • solid_queue -- optional if host uses different Active Job backend
  • solid_cable -- optional if host uses Redis or another Action Cable adapter
  • turbo-rails -- optional but recommended for real-time updates
  • ransack -- powers search forms when available

Development Dependencies (Gemfile)

GemPurpose
pumaDevelopment web server
pgPostgreSQL adapter
propshaftAsset pipeline
rubocop-rails-omakaseLinting (Rails omakase style)
brakemanSecurity scanning

Test Dependencies (Gemfile)

GemPurpose
simplecovCode coverage reporting
test-profTest profiling toolkit
stackprofStack sampling profiler
capybaraSystem test framework
webmockHTTP stubbing
vcrHTTP recording/playback
selenium-webdriverBrowser driver for system tests

JavaScript Dependencies (package.json)

Runtime

PackageVersionPurpose
@hotwired/stimulus^3.2.2Stimulus JS framework
stimulus-use^0.52.0Composable Stimulus behaviors

Development

PackageVersionPurpose
esbuild^0.23.0JS bundling
tailwindcss^3.4.10CSS framework
postcss^8.4.45CSS transformation
autoprefixer^10.4.20CSS vendor prefixes
eslint^9.11.0JS linting
@eslint/js^9.11.0ESLint core config
stylelint^16.8.0CSS linting
stylelint-config-standard^36.0.0Stylelint standard config

Dependency Coupling Analysis

Tight Coupling (hard to replace)

  • Rails 8.x -- entire engine is built on Rails conventions
  • Feedjira -- core feed parsing logic, deeply integrated in Fetching::FeedFetcher
  • Faraday -- HTTP client used throughout SourceMonitor::HTTP, configurable via middleware stack
  • Solid Queue -- integrated in engine initializer, scheduler, and job visibility system
  • PostgreSQL -- uses FOR UPDATE SKIP LOCKED, NULLS FIRST/LAST SQL syntax

Moderate Coupling (replaceable with effort)

  • Nokolexbor/Nokogiri -- HTML parsing in scrapers and OPML import
  • Ransack -- used in model ransackable_attributes declarations and search forms
  • Tailwind CSS -- all views use Tailwind utility classes scoped under .fm-admin

Loose Coupling (easily replaceable)

  • Solid Cable -- configurable via config.realtime.adapter, supports :solid_cable, :redis, :async
  • ruby-readability -- wrapped in Scrapers::Readability adapter behind pluggable adapter interface
  • Turbo Rails -- optional, loaded conditionally

Version Constraints of Note

  • Ruby >= 3.4.0 is a relatively aggressive minimum requirement
  • Rails >= 8.0.3 pins to the latest major, narrowing host app compatibility
  • Solid Queue has a wide range (0.3 to 3.0), suggesting early adoption with forward-looking flexibility
  • PostgreSQL is the only supported database (uses PG-specific SQL features)