Skip to main content

Installation Guide

This guide will walk you through the process of installing and setting up FlavumHive on your system.

Prerequisites

Before you begin, ensure you have the following installed:

System Requirements

  • Python 3.9 or higher
  • Google Chrome browser (for Twitter automation)
  • Git
  • Node.js 18+ (optional, for documentation)

API Keys and Accounts

  1. Twitter Account

    • Active Twitter/X account
    • Email verification completed
    • Two-factor authentication (optional but recommended)
  2. Reddit Account

    • Reddit account with API access
    • Reddit API credentials (client ID and secret)
    • Developer application registered
  3. OpenAI Account

    • Active OpenAI account
    • API key with sufficient credits

Installation Steps

1. Clone the Repository

git clone https://github.com/yourusername/flavumhive.git
cd flavumhive

2. Set Up Virtual Environment

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
.\venv\Scripts\activate

# Upgrade pip
pip install --upgrade pip

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

# Copy example environment file
cp .env.example .env

# Edit .env with your credentials
nano .env # or use your preferred editor

Required environment variables:

# Twitter Credentials
TWITTER_USERNAME="your_username"
TWITTER_PASSWORD="your_password"
TWITTER_EMAIL="your_email"

# Reddit Credentials
REDDIT_USERNAME="your_username"
REDDIT_PASSWORD="your_password"
REDDIT_CLIENT_ID="your_client_id"
REDDIT_CLIENT_SECRET="your_client_secret"

# OpenAI Configuration
OPENAI_API_KEY="your_openai_api_key"

5. Initialize Database

python -c "from utils.db_init import initialize_database; initialize_database()"

6. Verify Installation

python run_tests.py

Platform-Specific Setup

Twitter Setup

  1. Ensure Chrome is installed
  2. Verify Chrome version matches chromedriver
  3. Test Twitter login:
python test_twitter_integration.py

Reddit Setup

  1. Create Reddit API application
  2. Configure API credentials
  3. Test Reddit integration:
python test_reddit_integration.py

Common Installation Issues

Chrome/Selenium Issues

# Clear existing Chrome processes
pkill -f chrome

# Clear debug files
./cleanup.sh

Database Issues

# Reset database
rm bot.db reddit_bot.db
python -c "from utils.db_init import initialize_database; initialize_database()"

Permission Issues

# Fix file permissions
chmod +x cleanup.sh
chmod 755 -R .

Docker Installation (Alternative)

If you prefer using Docker:

# Build Docker image
docker build -t flavumhive .

# Run with Docker Compose
docker-compose up -d

Next Steps

After successful installation:

  1. 📚 Read the Quick Start Guide
  2. ⚙️ Review Configuration Options
  3. 🤖 Explore Personality Development

Troubleshooting

If you encounter issues:

  1. Check the logs in twitter_bot.log and bot.log
  2. Verify all environment variables are set correctly
  3. Ensure all dependencies are installed properly
  4. Review Chrome/Selenium compatibility

Need help? Check our Contributing Guidelines for community support.