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
-
Twitter Account
- Active Twitter/X account
- Email verification completed
- Two-factor authentication (optional but recommended)
-
Reddit Account
- Reddit account with API access
- Reddit API credentials (client ID and secret)
- Developer application registered
-
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
- Ensure Chrome is installed
- Verify Chrome version matches chromedriver
- Test Twitter login:
python test_twitter_integration.py
Reddit Setup
- Create Reddit API application
- Configure API credentials
- 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:
- 📚 Read the Quick Start Guide
- ⚙️ Review Configuration Options
- 🤖 Explore Personality Development
Troubleshooting
If you encounter issues:
- Check the logs in
twitter_bot.log
andbot.log
- Verify all environment variables are set correctly
- Ensure all dependencies are installed properly
- Review Chrome/Selenium compatibility
Need help? Check our Contributing Guidelines for community support.