Quickstart
From a fresh Rails app to a running, wallet-authenticated Solana dApp in about ten minutes.
This guide takes you from nothing to a running dApp where users sign in with their Solana wallet — no passwords, no Rust, no separate frontend. You’ll use the solrengine meta-gem, which installs the whole stack at once.
Prerequisites: Ruby 3.2+, Rails 8, Node + Yarn, and a free Helius RPC key.
1. Create a Rails app
rails new my_solana_app --css=tailwind --javascript=esbuild
cd my_solana_app
2. Add SolRengine
# Gemfile
gem "solrengine"
gem "dotenv-rails", group: [:development, :test]
3. Install
bundle install
rails generate solrengine:install
rails db:prepare
yarn add @solrengine/wallet-utils @solana/kit @wallet-standard/app @solana/wallet-standard-features @rails/actioncable
The generator wires up the whole stack for you:
- A
Usermodel with wallet authentication (SIWS) - A
Tokenmodel with Jupiter metadata, and aTransfermodel with confirmation tracking - Multi-database SQLite (primary, cache, queue, cable) with Solid Queue, Solid Cache, and Solid Cable
- The wallet Stimulus controller from @solrengine/wallet-utils
- Tailwind sources for the gem views
- A
.envtemplate,bin/solana_monitor, andProcfile.deventries - The auth engine mounted at
/auth(login, nonce, verify, logout)
4. Configure your RPC
The generator created a .env. Drop in your Helius key:
SOLANA_NETWORK=devnet
SOLANA_RPC_URL=https://devnet.helius-rpc.com/?api-key=YOUR_KEY
SOLANA_WS_URL=wss://devnet.helius-rpc.com/?api-key=YOUR_KEY
APP_DOMAIN=localhost
Start on devnet while you build — it’s free to transact against.
5. Run it
bin/dev
Visit localhost:3000/auth/login, connect Phantom (or any Wallet Standard wallet), sign the message, and you’re authenticated. That’s the full Sign In With Solana flow — challenge, signature, verify — with zero passwords.
6. Build your dashboard
After sign-in the app redirects to /dashboard (configurable). Wire it to the rest of the stack:
# config/routes.rb
root "dashboard#show"
# app/controllers/dashboard_controller.rb
class DashboardController < ApplicationController
before_action :authenticate!
def show
@wallet = current_user.wallet_address
@portfolio = Solrengine::Tokens::Portfolio.new(@wallet)
@tokens = @portfolio.tokens
@transactions = @portfolio.recent_transactions
end
end
current_user, logged_in?, and authenticate! are added to your ApplicationController by the generator.
What bin/dev runs
bin/dev starts five processes from Procfile.dev:
| Process | What |
|---|---|
web |
Rails server (Puma) |
js |
esbuild watch |
css |
Tailwind watch |
jobs |
Solid Queue worker (transfer confirmations) |
ws |
Solana WebSocket monitor (real-time balance updates) |
Next steps
- Auth — customize the sign-in flow, message, and session.
- Tokens — render the wallet portfolio with USD values.
- Transactions — let users send SOL with confirmation tracking.
- Realtime — push balance changes to the UI live.
- Programs — talk to any Anchor program from its IDL.