How 0xoucan/mictlai works
Project type and purpose
• This is a full-stack AI-powered cross-chain bridge application.
• Frontend (“celo-mind-web”) is a React/Vite web UI for chat-based cross-chain operations.
• Backend (“celo-mind-dn”) is a Node.js/TypeScript API server that orchestrates AI agents and blockchain actions.
File structure
• Top level:
• celo-mind-dn/ (backend)
• celo-mind-web/ (frontend)
• launch.sh to install and start both services
• Backend:
• src/action-providers/ contains many providers, but we’ll focus on basic-atomic-swaps
• src/api-server.ts for Express API
• src/chatbot.ts for AI orchestration
• src/services/ for blockchain relay and escrow logic
• src/utils/ for logger, rate limiter, transaction utilities
• .env.example, package.json, tsconfig.json
• Frontend:
• src/components/ for UI widgets (ChatInterface, TransactionMonitor, WalletBalances, etc.)
• src/providers/ for React contexts (WalletContext, PrivyProvider)
• src/services/ for agentService (chat API), blockchainService, transactionService
• Vite configuration, Tailwind config
README for additional insights
• The README confirms a two-part architecture: a backend agent server and a frontend
• Backend uses Express, CORS, streaming responses, OpenAI API, Telegram integration
• Frontend uses React, browser wallets, real-time polling of pending transactions, viem library for chain interactions
• Cross-chain atomic swap is the core feature