Castaway is an open-source web app that turns on-chain Solana IDLs into fully-typed SDK clients — in seconds.
Paste a program ID, fetch the on-chain IDL, and download a generated client powered by Codama.
- 🔍 Fetch Solana IDLs directly from the blockchain
- ⚡ Generate SDK clients for TypeScript (
@solana/kit), TypeScript Umi, Rust, Go, and Dart - 📦 Download as a zip — drop it straight into your project
- 🔎 Preset programs — popular protocols pre-loaded for quick access
- 🔐 Server-side default RPC for normal app usage, with an optional client-side custom RPC override
| Framework | Next.js 16 (App Router) |
| SDK generation | Codama |
| Solana client | @solana/kit (web3.js v2) |
| Styling | Tailwind CSS v4 |
- Node.js 22+
- npm
git clone https://github.com/dev-jodee/castaway.git
cd castaway
npm installcp .env.example .env.local| Variable | Required | Description |
|---|---|---|
SOLANA_RPC_URL |
Optional | RPC endpoint used by the server-side /api/fetch-idl route. Defaults to https://api.mainnet-beta.solana.com. |
NEXT_PUBLIC_BASE_URL |
Recommended | Canonical public URL of your deployment (no trailing slash), e.g. https://castaway.lol. Used for Open Graph and social preview metadata. |
If a user enters a custom RPC URL in the UI, that request is made directly from their browser instead of the server.
npm run devOpen http://localhost:3000.
This repo is configured for manual Vercel deploys. Pushes to main do not auto-deploy.
Preview deploy:
npx vercelProduction deploy:
npx vercel --prodSet your environment variables in Vercel under Settings → Environment Variables:
SOLANA_RPC_URLNEXT_PUBLIC_BASE_URL
The repository CI workflow only runs checks. It does not perform deployments.
Preset programs live in data/presets.json. Each entry looks like this:
{
"name": "Jupiter",
"programId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
"description": "Jupiter aggregator v6",
"category": "DeFi"
}To submit a new preset:
- Fork the repo and create a branch:
git checkout -b preset/program-name - Add your entry to
data/presets.json - Make sure the program has an on-chain Solana IDL compatible with the app — test it first
categorymust be one of:DeFi,Staking,NFT,Governance- Open a PR with the title:
feat: add [Program Name] preset
See CONTRIBUTING.md for more details.
All contributions are welcome: bug fixes, presets, features, and documentation improvements. Read CONTRIBUTING.md before opening a PR.
MIT © dev-jodee