Onboardr is an innovative DeFi application that enhances the user experience through natural language interaction. Built for the Stellar Hacks: Swaps and Vaults hackathon, it seamlessly integrates with Soroswap and Defindex protocols through an AI assistant named Soro, making DeFi more accessible and intuitive.
- Demo Video: Coming Soon (5-minute walkthrough showcasing features)
- GitHub: https://github.com/DomNav/onboardr
Soroswap and Defindex have built powerful DeFi infrastructure on Stellar. Onboardr enhances these protocols by adding a conversational layer that makes their features more accessible. Users can interact naturally - simply type "swap 100 xlm for usdc" or "show me the highest APY vaults" to execute complex DeFi operations.
- π€ Soro AI Assistant - Natural language processing for swaps, metrics, and trading
- π± Multi-Swap Queue - Batch multiple swaps: "swap 100 xlm for usdc and 300 aqua to yxlm"
- π Defindex Analytics - Real-time vault metrics, APY tracking, TVL monitoring
- π¨ Theme System - Dark/light mode with smooth transitions
- π Wallet Integration - Freighter & LOBSTR support with connection status
- π Trade History - Track all your swaps and transactions
- β‘ Real-time Updates - Live price streaming and trade monitoring
- β Natural language swap execution through Soro AI
- β Integration with Soroswap for token swaps
- β Defindex vault analytics dashboard
- β Multi-swap queueing system
- β Real-time price streaming
- β Responsive UI with theme switching
- β Wallet connection management
- π Profile NFT minting system (soul-bound NFTs for identity)
- π Orchestration system for autonomous vault deposits
- π Enhanced AI memory with user preferences
- π Full vault interaction (deposits/withdrawals)
- π Portfolio tracking and P&L calculations
- π Custom alerts and notifications
Onboardr uses soul-bound "Profile-NFT" to unlock Soro AI and provide stable memory anchoring via vectorKey.
- User connects Freighter β API checks ownership via
/api/profile/owns/:address - No NFT β Mint wizard appears (gas sponsored, costs 0 XLM)
- Soro chat backend β Resolves
vectorKeyfrom NFT metadata - MCP vector store β Persists per-user context and conversation history
- Location:
contracts/profile_nft/ - Deployment:
scripts/deploy_profile_nft.ts - Features: Soul-bound (no transfer), metadata storage, gasless minting
- Metadata Schema:
{ "name": "display name", "avatar": "data:image/svg+xml;base64,.. or ipfs://...", "fiat": "USD|CAD|EUR", "risk": "conservative|balanced|aggressive", "vectorKey": "uuid-from-backend" }
- Node.js 18+
- pnpm
- Stellar wallet (Freighter or LOBSTR)
See docs/wallets.md for wallet connection and troubleshooting tips.
# Clone the repository
git clone <repository-url>
cd onboardr
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local# Stellar Network Configuration
STELLAR_NETWORK=testnet
PROFILE_NFT_CONTRACT_ADDRESS=C...
SPONSOR_SECRET_KEY=S...
# AI Integration
OPENAI_API_KEY=sk-...
# IPFS Storage (for Profile NFT metadata)
NFT_STORAGE_TOKEN=your_nft_storage_token_here
# Optional: IPFS configuration
IPFS_GATEWAY_URL=https://gateway.nftstorage.linkFor development on Stellar testnet with graceful fallbacks:
# Generate a new Stellar keypair for sponsoring transactions
node -e "
const { Keypair } = require('stellar-sdk');
const keypair = Keypair.random();
console.log('SPONSOR_SECRET_KEY=' + keypair.secret());
console.log('SPONSOR_PUBLIC_KEY=' + keypair.publicKey());
"Visit Stellar Friendbot and fund your sponsor account:
https://friendbot.stellar.org?addr=YOUR_SPONSOR_PUBLIC_KEY
Create apps/web/.env.local with testnet configuration:
# Network Configuration
STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
# Sponsor Account (from step 1)
SPONSOR_SECRET_KEY=S...
SPONSOR_PUBLIC_KEY=G...
# Optional: For full functionality
OPENAI_API_KEY=sk-... # For AI chat features
DUNE_API_KEY=... # For live market data
NFT_STORAGE_TOKEN=... # For IPFS metadata uploads
# Development will work without these - graceful fallbacks are built-in# Install dependencies
pnpm install
# Start with development stubs enabled
pnpm devWhen running in development (NODE_ENV !== 'production'), the application includes several graceful fallbacks:
- Market Data API: Returns zeroed data with 200 status when Dune/Graph APIs fail
- Health API: Treats missing environment variables as warnings, not failures
- Profile NFT Minting: Returns mock results when sponsor keys are missing
- Balance API: Shows mock balance data when Horizon is unavailable
- Graph Components: Display friendly "placeholder data" messages when data is zero
Look for the π₯ Mock or Development Mode indicators in the UI.
# Start development server
pnpm dev
# Run tests
pnpm test
# Build for production
pnpm build
# Deploy Profile NFT contract
pnpm deploy:profile-nftβββ apps/web/ # Next.js frontend application
β βββ src/app/api/profile/ # Profile NFT API endpoints
β βββ src/components/ # React components
β βββ src/store/ # Zustand state management
β βββ src/lib/ # Utilities and helpers
βββ contracts/profile_nft/ # Soroban smart contract
βββ scripts/ # Deployment and utility scripts
βββ docs/ # Documentation
POST /api/profile/mint- Prepare mint transaction XDRGET /api/profile/owns/:address- Check NFT ownership (cached 30s)
POST /api/chat- Soro AI chat with NFT gating and MCP memory
- Soul-bound NFT β no transfer or burn endpoints
vectorKeyis the single source-of-truth for AI memory- Always mock IPFS in unit tests (
src/lib/testUtils.ts) - Gasless minting via sponsor pattern (users pay 0 XLM)
# Run unit tests
pnpm test
# Run integration tests (requires testnet)
pnpm test:integration
# Run contract tests
cd contracts/profile_nft && cargo test# Set environment variables
export DEPLOYER_SECRET_KEY="S..."
export SPONSOR_SECRET_KEY="S..." # Can be same as deployer
# Deploy to testnet
pnpm deploy:profile-nft
# Contract address will be saved to deployments/profile_nft_testnet.jsonGet an API token from NFT.Storage and add it to your environment:
# Get free API token from https://nft.storage
NFT_STORAGE_TOKEN=your_token_hereThe app will automatically fall back to mock IPFS uploads if no token is configured (useful for development).
# Build application
pnpm build
# Deploy to your hosting platform
# (Vercel, Netlify, etc.)- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Frontend: Next.js 14, React 18, TypeScript, Tailwind CSS
- UI Components: shadcn/ui, Radix UI primitives
- State Management: Zustand (migrating from React Context)
- Blockchain: Stellar SDK, Soroban smart contracts
- AI Integration: OpenAI API with MCP vector stores
- Testing: Jest, React Testing Library
This project is licensed under the MIT License - see the LICENSE file for details.