Skip to content

NikhilRaikwar/Nexis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nexis - AI-Powered Multi-Chain Web3 Assistant πŸš€

License: MIT React TypeScript Vite

🌐 Your intelligent AI assistant for seamless multi-chain Web3 interactions

🎯 Overview

Nexis is a cutting-edge AI-powered Web3 assistant that simplifies blockchain interactions across multiple networks. Using natural language processing, users can perform complex blockchain operations through simple conversational commands. Built with React, TypeScript, and powered by OpenAI's GPT-4, Nexis makes Web3 accessible to everyone.

πŸ” Civic Authentication

Nexis leverages Civic Auth for secure, seamless Web3 authentication:

  • πŸ›‘οΈ Secure Identity Verification - Industry-standard Web3 authentication
  • ⚑ Frictionless UX - One-click wallet connection with embedded wallet support
  • πŸ”’ Privacy-First - No personal data storage, decentralized identity management
  • 🌐 Universal Access - Works across all devices and browsers
  • ✨ Smooth Integration - Embedded wallet code provides intuitive user experience

πŸ’» Implementation Code:

// App.tsx - Civic Auth Provider Setup
import { CivicAuthProvider } from "@civic/auth-web3/react";

const App = () => {
  const civicAuthClientId = import.meta.env.VITE_CIVIC_AUTH_CLIENT_ID;

  return (
    <CivicAuthProvider clientId={civicAuthClientId}>
      <QueryClientProvider client={queryClient}>
        <TooltipProvider>
          <BrowserRouter>
            <AuthProvider>
              <Routes>
                <Route path="/" element={<Index />} />
                <Route path="/dashboard" element={
                  <ProtectedRoute>
                    <Dashboard />
                  </ProtectedRoute>
                } />
              </Routes>
            </AuthProvider>
          </BrowserRouter>
        </TooltipProvider>
      </QueryClientProvider>
    </CivicAuthProvider>
  );
};
// AuthContext.tsx - Civic Auth Integration
import { useUser } from '@civic/auth-web3/react';

export const AuthProvider = ({ children }: { children: ReactNode }) => {
  const { user, signIn, signOut, isLoading } = useUser();
  const navigate = useNavigate();
  
  const isAuthenticated = !!user;

  const handleSignIn = useCallback(async () => {
    try {
      await signIn();
      // Auto-redirect to dashboard after authentication
    } catch (error) {
      console.error('Sign-in error:', error);
      throw error;
    }
  }, [signIn]);

  return (
    <AuthContext.Provider value={{
      user,
      isAuthenticated,
      isLoading,
      signIn: handleSignIn,
      signOut,
    }}>
      {children}
    </AuthContext.Provider>
  );
};
// Navigation.tsx - One-Click Authentication
const handleGetStarted = async () => {
  if (isAuthenticated) {
    navigate('/dashboard');
  } else {
    try {
      // Trigger full-page Civic Auth flow
      await signIn();
      // Navigation handled automatically by auth context
    } catch (error) {
      console.error('Authentication failed:', error);
      alert('Authentication failed. Please try again.');
    }
  }
};

🎯 Implementation Highlights:

  • Go-to-Market Ready - Production-grade authentication system
  • Real-World Problem Solving - Eliminates complex wallet setup barriers
  • Creative Use Case - AI + Authentication for mass Web3 adoption
  • Marketing Ready - User-friendly onboarding for mainstream audiences

πŸ”— Supported Blockchains

Network Type Currency Status
🟒 Monad Testnet EVM MONAD βœ… Active
πŸ”΅ Ethereum Sepolia EVM ETH βœ… Active
🟑 Base Sepolia EVM ETH βœ… Active
🟣 Polygon Mumbai EVM MATIC βœ… Active
πŸ”΄ Arbitrum Sepolia EVM ETH βœ… Active
🟠 Solana Devnet Non-EVM SOL βœ… Active

⚑ Key Features

πŸ€– AI-Powered Operations

  • Natural Language Processing - Interact using plain English
  • Smart Transaction Parsing - Auto-detects chains, amounts, and recipients
  • Real-Time Price Data - Live token prices via CoinGecko API
  • Gas Price Monitoring - Current gas prices across all EVM chains

πŸ’° Multi-Chain Operations

  • Cross-Chain Balance Tracking - Monitor assets across all networks
  • Universal Token Transfers - Send tokens using natural language
  • Transaction History - View recent transactions with explorer links
  • Faucet Integration - Easy testnet token requests

πŸ› οΈ Available Operations

Wallet Management

# Connect wallets
setWallet <evmPrivateKey> <solanaPrivateKey>

# Get wallet addresses
getWalletAddress

# Disconnect all wallets
disconnectWallet

Balance & Transfers

# Check all balances
getAllBalances

# Smart transfers (natural language)
"Send 0.1 ETH to 0x123... on Base"
"Transfer 0.5 SOL to ABC123..."

# Get gas prices
getGasPrices

Market Data

# Token prices
getTokenPrices bitcoin,ethereum,solana

# Trending tokens
getTrendingTokens <chain>

Faucets & Tools

# Get testnet tokens
getFaucetTokens ethereum,solana

# AI assistance
web3Question "How do I bridge tokens?"

# Help
help

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ or Bun
  • Git
  • Civic Auth Client ID

Installation

  1. Clone the repository

    git clone https://github.com/your-username/nexis.git
    cd nexis
  2. Install dependencies

    npm install
    # or
    bun install
  3. Environment Setup

    cp .env.example .env

    Update .env with your credentials:

    VITE_CIVIC_AUTH_CLIENT_ID=your_civic_auth_client_id
    VITE_BACKEND_URL=https://nexis-zona.onrender.com
  4. Start development server

    npm run dev
    # or
    bun dev
  5. Open your browser Navigate to http://localhost:8080

πŸ’‘ Usage Examples

Basic Wallet Operations

// Connect your wallets
"Set up my EVM and Solana wallets"

// Check balances
"What's my balance across all chains?"

// View wallet addresses
"Show me my wallet addresses"

Token Transfers

// Simple transfers
"Send 0.1 ETH to 0x742d35Cc6634C0532925a3b8D404fAbCe4649681 on Base"

// Cross-chain operations
"Transfer 1 MATIC to 0x123... on Polygon"

// Solana transfers
"Send 0.5 SOL to 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"

Market Information

// Get token prices
"What's the current price of ETH and SOL?"

// Gas prices
"Show me current gas prices"

// Get testnet tokens
"I need testnet ETH for Base Sepolia"

πŸ—οΈ Project Structure

nexis/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”œβ”€β”€ contexts/          # Auth context
β”‚   β”œβ”€β”€ config/            # API configuration
β”‚   β”œβ”€β”€ pages/             # Main pages
β”‚   └── hooks/             # Custom hooks
β”œβ”€β”€ api/
β”‚   └── agent.ts           # Multi-chain AI agent
β”œβ”€β”€ public/                # Static assets
└── server/                # Backend server

πŸ”§ Configuration

Civic Auth Setup

  1. Visit Civic Auth Dashboard
  2. Create a new application
  3. Copy your Client ID to .env

Backend Configuration

The backend is deployed on Render at https://nexis-zona.onrender.com

Required environment variables for backend:

OPENAI_API_KEY=your_openai_api_key
COINGECKO_API_KEY=your_coingecko_api_key (optional)

πŸ“¦ Dependencies

Frontend

  • React 18.3.1 - UI framework
  • TypeScript 5.8.3 - Type safety
  • Vite 5.4.19 - Build tool
  • Civic Auth - Web3 authentication
  • Framer Motion - Animations
  • Tailwind CSS - Styling

Backend

  • LangChain - AI framework
  • OpenAI GPT-4 - Language model
  • Ethers.js - Ethereum interactions
  • Solana Web3.js - Solana interactions
  • Express.js - Web server

🌐 API Endpoints

Endpoint Method Description
/agent POST Main AI agent interaction
/health GET Service health check
/chains GET Supported chains info

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Nikhil Raikwar

πŸ™ Acknowledgments

  • Civic for Web3 authentication
  • OpenAI for GPT-4 integration
  • LangChain for AI framework
  • Base for blockchain infrastructure

πŸ“ž Support


Made with ❀️ by the Nexis team

🌐 Website β€’ πŸ“± GitHub β€’ 🐦 Twitter

About

Nexis is a decentralized AI-powered Web3 assistant that simplifies blockchain interactions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages