This is the frontend application for the cryptocurrency trading chatbot platform. It provides a user-friendly web interface that allows users to interact with the cryptocurrency trading system through natural language. The frontend features:
- Web3 Integration: Secure wallet connection using Phantom wallet
- Firebase Authentication: Seamless authentication combining Web3 security with Firebase convenience
- Natural Language Interface: Chat-based interface for cryptocurrency operations (swaps, transfers, quotes)
- Real-time Updates: Live cryptocurrency quotes and transaction status
Users can connect their Phantom wallet, authenticate securely, and perform cryptocurrency operations using conversational language, making complex DeFi operations accessible to everyone.
- Node.js (v18 or higher)
- NPM or Yarn
- Phantom wallet installed in the browser
- Project created in Firebase Console
- Clone the repository:
git clone <your-repository>
cd platform- Install dependencies:
npm install-
Configure environment variables: Create a
.envfile in the project root with the variables present in.env.example: -
Start the development server:
npm run devThe authentication system combines Web3 security with Firebase convenience, following this flow:
-
Initial Connection
- User clicks "Connect with Phantom"
- System checks if Phantom wallet is installed
- If not installed, redirects to installation page
-
Firebase Authentication
- After connecting with Phantom, system creates an anonymous session in Firebase
- The wallet address is associated with the user profile
- Firebase maintains authentication state between sessions
-
State Management
- System monitors changes in wallet connection
- Wallet disconnection causes automatic logout
- Authentication state is synchronized between Firebase and application