Skip to content

Latest commit

 

History

History
162 lines (115 loc) · 4.59 KB

INSTALL.md

File metadata and controls

162 lines (115 loc) · 4.59 KB

Installation Guide

This guide will help you set up and run the Sola AI application locally.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher)
  • Yarn package manager
  • Git
  • A code editor of your choice (VS Code recommended)
  • A Solana wallet with SOL tokens for testing

Quick Start

  1. Clone the repository:
git clone https://github.com/TheSolaAI/sola-application.git
  1. Navigate to the project directory:
cd sola-application
  1. Install dependencies:
yarn install
  1. Set up environment variables (see env configuration and details section below)

  2. Start the development server:

yarn dev
  1. Open your browser and navigate to http://localhost:5173

Configuration

Create a .env file in the root directory with the following environment variables:

Required Environment Variables

# OpenAI Configuration
VITE_OPENAI_API_URL=        # GPT-4.0 realtime/realtime mini model url

# Authentication
VITE_PRIVY_APP_ID=          # Privy application ID
VITE_SENTRY_AUTH_TOKEN=     # Sentry authentication token (optional for development)

# Solana Configuration
VITE_HELIUS_API_KEY=        # Your Helius API key
VITE_SOLANA_RPC=            # Solana RPC endpoint URL
VITE_ATA_PRIV_KEY=          # Solana private key for validation

# Microservices URLs (privy Whitelisted Access Required to interact with these endpoints)
VITE_WALLET_SERVICE_URL=https://wallet-service.solaai.tech/         # Wallet service endpoint
VITE_DATA_SERVICE_URL=https://data-stream-service.solaai.tech/      # Data stream service endpoint
VITE_AUTH_SERVICE_URL=https://user-service.solaai.tech/api/v1/      # User authentication service endpoint

# Environment
VITE_ENVIORNMENT=          # 'development' or 'production'

Environment Variable Details

  • VITE_OPENAI_API_URL: Use GPT-4.0 realtime or realtime mini model url
  • VITE_PRIVY_APP_ID: Use cm5m351oa03ij5a8yrrj64qcv if you have a whitelisted wallet, or your own Privy ID
  • VITE_HELIUS_API_KEY: Your Helius API key for Solana data access
  • VITE_SOLANA_RPC: Your Solana RPC endpoint (Helius RPC recommended)
  • VITE_ATA_PRIV_KEY: Solana private key for general validation (not used in transactions)
  • VITE_SENTRY_AUTH_TOKEN: Can use dummy value for development

Security Note

For production deployments:

  • Use Cloudflare Workers or similar service to secure sensitive keys
  • Never commit the .env file to version control
  • Implement proper key rotation and management
  • Use environment-specific configuration

Development

Start the development server:

yarn dev

The application will be available at http://localhost:5173

Troubleshooting

If you encounter issues during setup:

  1. Node.js Version

    • Ensure you're using Node.js v18 or higher
    • Use nvm to manage Node.js versions:
      nvm install 18
      nvm use 18
  2. Dependencies Issues

    • Clear dependency cache and reinstall:
      rm -rf node_modules yarn.lock
      yarn cache clean
      yarn install
  3. Environment Variables

    • Verify all required variables are set in .env
    • Check for typos in variable names
    • Ensure service endpoints are accessible
  4. Network Issues

    • Check your internet connection
    • Verify Solana RPC endpoint is responsive
    • Ensure you have access to required microservices
  5. Application Access and Configuration

    • Ensure your .env file is properly configured in the project root directory
    • For microservices access:
      • Option 1 (Recommended): Use our hosted services
        • Requires a whitelisted wallet with our default Privy App ID
        • Must use VITE_PRIVY_APP_ID=cm5m351oa03ij5a8yrrj64qcv
        • Server performs authentication and validation checks
      • Option 2 (Self-hosted): Run your own infrastructure
        • Deploy microservices locally or on your infrastructure
        • Use your own Privy App ID
        • Implement custom service logic as needed
    • Note: The application will have limited functionality without proper microservice access

Support

If you continue to experience issues:

  1. Check existing GitHub Issues
  2. Review the Documentation
  3. Open a new GitHub issue with:
    • Detailed error description
    • Environment details (OS, Node version)
    • Steps to reproduce
    • Relevant error logs

Contributing

Please read our Contributing Guidelines before submitting pull requests.