AI-Powered DeFi Yield Optimization Platform
Valkyrie Finance combines cutting-edge AI technology with DeFi protocols to deliver automated, intelligent yield optimization. Now featuring live Web3 integration and production-ready AI engine.
π Just Completed: Full Web3 integration with multi-chain wallet support π€ Live: AI engine with sub-20ms portfolio optimization π Deployed: Production-ready Vercel deployment with pnpm workspaces π Working: Real-time market data and AI recommendations π Secure: Full wallet integration with 300+ wallet support via Reown AppKit
# Clone and setup (one-time)
git clone <repository-url>
cd valkyriefinance
pnpm install
# Start all services (development)
pnpm dev
# Start AI engine (separate terminal)
cd apps/ai-engine && go run main.go
# Access applications
# Web App: http://localhost:3001 β
Web3 + AI Integrated
# Server API: http://localhost:3000 β
tRPC + Database
# AI Engine: http://localhost:8080 β
Go + Real Market Data
# Storybook: http://localhost:6006 β
Component LibraryEverything works! Full stack with Web3, AI, and production deployment ready.
- π Web3 Integration: Multi-chain wallet connection (Ethereum, Arbitrum, Optimism)
- π€ AI Engine: Live portfolio optimization with real market data
- π° Smart Contracts: ERC-20 token and ERC-4626 vault deployed on Sepolia
- π¨ Component System: 20+ components with comprehensive Storybook
- π Authentication: Wallet-based auth with Better Auth
- π Real-time Data: Live market indicators and AI recommendations
- βοΈ Cloud Ready: Vercel deployment with pnpm workspace support
- Database: PostgreSQL with Drizzle ORM and migrations
- API: tRPC with end-to-end type safety
- Testing: Comprehensive test suites (unit, integration, E2E)
- Security: Full audit-ready smart contracts
- Performance: Sub-20ms AI responses, optimized bundles
valkyriefinance/
βββ apps/
β βββ web/ # Next.js frontend (port 3001) β
Web3 + AI
β βββ server/ # tRPC API server (port 3000) β
Database + Auth
β βββ ai-engine/ # Go AI service (port 8080) β
Live Market Data
β βββ storybook-host/ # Component docs (port 6006) β
50+ Stories
βββ packages/
β βββ ui/ # Component library β
20+ Components
β βββ common/ # Shared utilities β
Types + Schemas
β βββ config/ # Configuration β
Multi-chain Support
β βββ contracts/ # Smart contracts β
Deployed on Sepolia
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Web3: Wagmi v2, Viem, Reown AppKit, ConnectKit (300+ wallets)
- AI: Go-based engine with Modern Portfolio Theory
- Backend: tRPC, Drizzle ORM, PostgreSQL, Better Auth
- Contracts: Solidity, Foundry, OpenZeppelin, ERC-4626
- Development: Storybook, Turbo, pnpm workspaces, Biome
- Multi-chain Support: Ethereum, Arbitrum, Optimism, Sepolia
- Wallet Integration: 300+ wallets via Reown AppKit
- Smart Contracts: Live ERC-20 token and ERC-4626 vault
- Real-time Balances: Live token balances and vault data
- Transaction Management: Comprehensive transaction handling
- Portfolio Optimization: Sub-20ms AI-powered optimization
- Market Analysis: Real-time Fear & Greed Index, volatility metrics
- Risk Assessment: Advanced risk scoring and confidence metrics
- Strategy Recommendations: AI-driven yield optimization
- Dashboard: Real-time portfolio and AI analytics
- Vault Management: ERC-4626 vault operations
- User Authentication: Wallet-based authentication
- Responsive Design: Mobile-first with dark/light themes
# Development
pnpm dev # Start all services
pnpm dev:web # Frontend only
pnpm dev:server # Backend only
pnpm dev:storybook # Storybook only
# AI Engine (Go)
cd apps/ai-engine
go run main.go # Start AI service
# Building
pnpm build # Build all packages
pnpm build:web # Build frontend
pnpm build:server # Build backend
# Testing
pnpm test # Run all tests
pnpm test:watch # Tests in watch mode
pnpm type-check # TypeScript checking
# Smart Contracts
cd packages/contracts/foundry
forge build # Compile contracts
forge test # Run tests
forge script script/Deploy.s.sol --rpc-url sepolia # DeployThe project is configured for seamless Vercel deployment with pnpm workspace support:
# Automatic deployment on push to main
git push origin main
# Manual deployment
vercel deploy --prodDeployment URL: https://valkyrie-finance.vercel.app
# Docker deployment
docker build -t valkyrie-ai ./apps/ai-engine
docker run -p 8080:8080 valkyrie-ai
# Cloud deployment ready for AWS/GCP/Azure| Feature | Status | Performance |
|---|---|---|
| Web3 Integration | β Live | Instant wallet connection |
| AI Portfolio Optimization | β Live | ~15ms response time |
| Smart Contract Calls | β Live | Gas optimized |
| tRPC API | β Live | Type-safe, fast |
| Component Library | β Complete | 50+ documented stories |
| Build Pipeline | β Working | 7/7 packages building |
- Multiple security audits planned
- OpenZeppelin battle-tested contracts
- Comprehensive test coverage
- Gas optimization (200 runs)
- Secure wallet integration
- Multi-chain configuration
- Safe transaction handling
- Input validation on all Web3 calls
- TypeScript strict mode (100% coverage)
- Input validation with Zod
- SQL injection protection
- Rate limiting and CORS
- Technical Guide - Complete architecture overview
- Deployment Guide - Production deployment
- Project Status - Current capabilities
- Smart Contracts - Contract documentation
- API Documentation - tRPC API reference
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with tests
- Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenZeppelin for battle-tested smart contracts
- Shadcn/UI for beautiful component primitives
- Wagmi & Viem for excellent Web3 developer experience
- tRPC for end-to-end type safety
- Next.js for the amazing React framework