WalletTrain is the reference SolRengine app — a full-featured Solana wallet that exercises nearly the whole stack. You sign in with your wallet, see your token portfolio priced in USD, send SOL with live confirmation tracking, and watch your balance update in real time as transactions land — all server-rendered Rails, no SPA.
If you want to see what an ambitious SolRengine app looks like end to end, this is it: five processes, real-time Turbo Streams, and 54 passing tests.
What it does
- Wallet sign-in via SIWS — the wallet is the identity, no passwords
- Token portfolio with Jupiter USD prices
- SOL transfers with on-chain confirmation tracking
- Real-time balance updates pushed over WebSocket into Turbo Streams
- 54 passing tests covering the auth and transfer flows
How it’s built
WalletTrain runs the full SolRengine Solid stack: five processes (web, js,
css, jobs, ws) and four SQLite databases (primary, cache, queue, cable).
The split that makes it tick:
- All blockchain reads happen in Ruby, server-side, via
solrengine-rpc— balances, token accounts, transaction status. The browser never talks to an RPC node to read. - All signing happens client-side with
@solana/kit+ Wallet Standard. The server prepares; the wallet signs.
Real-time without a SPA
The dashboard stays live without a single line of bespoke front-end state management:
- The
wsprocess subscribes to the user’s account over a Solana WebSocket and pushes Turbo Streams when the balance changes. - An Idiomorph auto-refresh re-renders the dashboard every 60 seconds, morphing the DOM in place rather than replacing it.
- A cache bypass skips the cached balance for two minutes after a transfer, so you never see a stale number right after sending.
- Turbo’s page cache is disabled on the dashboard to prevent stale snapshots on back-navigation.
The result feels like a reactive app, but it’s Rails views and Hotwire doing the work.
Wallet compatibility, handled
Every wallet exposes a slightly different API. WalletTrain (via
@solrengine/wallet-utils) papers over the differences so you don’t have to:
- Phantom — legacy provider at
window.phantom.solana - Solflare — read the key from
provider.publicKey, not the connect response - Backpack —
signMessagereturns aUint8Arraydirectly - All wallets — Wallet Standard for
signAndSendTransaction
The SolRengine gems behind it
WalletTrain pulls in the solrengine meta-gem and uses five pieces:
- auth — SIWS wallet authentication
- rpc — balances, token accounts, transaction confirmation
- tokens — portfolio holdings with Jupiter USD pricing
- transactions — the SOL transfer + confirmation lifecycle
- realtime — the WebSocket account monitor behind live updates