Skip to content
SolRengine

solrengine

The meta-gem. One install wires up wallet auth, tokens, transfers, real-time updates, and the generator — the whole Rails framework for Solana dApps.

solrengine is the meta-gem: it pulls in every SolRengine gem and ships a generator that wires the whole stack into a Rails 8 app. If you want everything, install this. If you want one piece, install the individual gem instead.

For the step-by-step install, see the Quickstart. This page is the reference.

What the generator does

rails generate solrengine:install sets up:

  • A User model with wallet auth (SIWS)
  • A Token model with Jupiter metadata
  • A Transfer model with confirmation tracking
  • Multi-database SQLite (primary, cache, queue, cable)
  • Solid Queue, Solid Cache, and Solid Cable, configured for development
  • The wallet controller from @solrengine/wallet-utils
  • Tailwind sources for the gem views
  • A .env template, bin/solana_monitor, and Procfile.dev entries
  • The auth engine mounted at /auth (login, nonce, verify, logout)

The gems

Gem What
auth SIWS wallet authentication (any Wallet Standard wallet)
rpc Solana JSON-RPC client with SSL fix and multi-network config
tokens Token metadata from Jupiter, USD prices, wallet portfolio
transactions SOL transfers with @solana/kit, confirmation tracking
realtime WebSocket account monitoring, Turbo Streams push updates
programs Anchor IDL parsing, Borsh serialization, account models, instruction builders

Each gem can be used independently or together via the solrengine meta-gem.

Configuration

The generator creates initializers automatically. Customize as needed:

# config/initializers/solrengine_auth.rb
Solrengine::Auth.configure do |config|
  config.domain = ENV.fetch("APP_DOMAIN", "localhost")
  config.nonce_ttl = 5.minutes
  config.after_sign_in_path = "/dashboard"
  config.after_sign_out_path = "/"
end

# config/initializers/solrengine_rpc.rb
Solrengine::Rpc.configure do |config|
  config.network = ENV.fetch("SOLANA_NETWORK", "mainnet")
end

Environment variables

SOLANA_NETWORK=devnet
SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=xxx
SOLANA_WS_URL=wss://mainnet.helius-rpc.com/?api-key=xxx
SOLANA_RPC_DEVNET_URL=https://devnet.helius-rpc.com/?api-key=xxx
SOLANA_WS_DEVNET_URL=wss://devnet.helius-rpc.com/?api-key=xxx
APP_DOMAIN=myapp.com

Free RPC keys are available at helius.dev.

Custom program interaction

Interact with any Anchor program by generating from its IDL:

rails generate solrengine:program PiggyBank path/to/piggy_bank.json

This scaffolds account models, instruction builders, and a Stimulus controller. See Programs for details.

Processes

bin/dev starts five processes via Procfile.dev:

Process What
web Rails server (Puma)
js esbuild watch
css Tailwind watch
jobs Solid Queue worker
ws Solana WebSocket monitor

License

MIT — a moviendo.me project.