An AI-powered MetaMask Card and DeFi management application built with React and MetaMask SDK.
Project URL:
https://financial-assistant-sayanmukherjee.vercel.app/
Personalized Financial Assistant
An AI-powered MetaMask Card and DeFi management application built with React and MetaMask SDK.
π MetaMask wallet integration
π³ MetaMask Card usage tracking
π° USDC balance display
π€ AI-powered financial suggestions
β‘ One-click portfolio optimization
π± Mobile-responsive design
π¨ Modern glassmorphism UI
Frontend: React 18
Styling: Tailwind CSS
Wallet Integration: MetaMask SDK
Icons: Lucide React
State Management: React Hooks
Node.js (v16 or higher)
npm or yarn
MetaMask browser extension
Create the project directory
mkdir financial-assistant
cd financial-assistant
Initialize React app
npx create-react-app .
Install dependencies
npm install @metamask/sdk lucide-react
Create folder structure
mkdir -p src/components src/hooks src/utils
Copy the provided files into their respective folders:
Copy package.json
to root directory
Copy public/index.html
to public/
folder
Copy all src/
files to their respective folders:
src/index.js
src/App.js
src/App.css
src/components/WalletConnection.js
src/components/Dashboard.js
src/components/CardUsage.js
src/components/AISuggestions.js
src/components/OptimizeButton.js
src/hooks/useMetaMask.js
src/utils/mockData.js
Start the development server
npm start
The application will open at http://localhost:3000
financial-assistant/
βββ public/
β βββ index.html # HTML template with Tailwind CDN
βββ src/
β βββ components/
β β βββ WalletConnection.js # Wallet connection component
β β βββ Dashboard.js # Main dashboard
β β βββ CardUsage.js # Card usage and transactions
β β βββ AISuggestions.js # AI recommendations
β β βββ OptimizeButton.js # One-click optimization
β βββ hooks/
β β βββ useMetaMask.js # MetaMask SDK integration
β βββ utils/
β β βββ mockData.js # Mock data for demo
β βββ App.js # Main app component
β βββ App.css # Custom styles
β βββ index.js # App entry point
βββ package.json # Dependencies and scripts
βββ README.md # This file
Handles MetaMask wallet connection/disconnection
Shows connection status and wallet address
Main user interface after wallet connection
Displays welcome message and user stats
Shows MetaMask Card balance and transactions
Displays spending patterns and credit information
AI-powered financial recommendations
Categorized suggestions with confidence levels
One-click portfolio optimization
Animated loading states and success feedback
Create a .env
file in the root directory:
REACT_APP_INFURA_API_KEY=your_infura_api_key_here
Wallet Connection: Click "Connect MetaMask" to connect your wallet
Card Dashboard: View your MetaMask Card balance and recent transactions
AI Suggestions: See personalized financial recommendations
One-Click Optimize: Use the optimize button to improve your financial portfolio
Mobile Responsive: Works seamlessly on all device sizes
Uses mock data for demonstration purposes
MetaMask SDK integration is production-ready
Responsive design with Tailwind CSS
Modern UI with glassmorphism effects
Smooth animations and hover effects
Integrate real MetaMask Card API
Connect to actual DeFi protocols
Implement real AI recommendation engine
Add user authentication and data persistence
Deploy to production environment
Fork the repository
Create a feature branch
Make your changes
Test thoroughly
Submit a pull request
None