Skip to content

Getting Started

Abid Ali Awan edited this page Dec 2, 2025 · 1 revision

🚀 Getting Started

This guide will walk you through installing, configuring, and using ECom Intel to analyze product reviews.

Prerequisites

Before you begin, ensure you have:

  • Python 3.8+ installed
  • pip (Python package manager)
  • API keys for OpenAI and Firecrawl

🛠️ Installation

Step 1: Clone the Repository

git clone https://github.com/kingabzpro/ECom-Intel.git
cd ECom-Intel

Step 2: Install Dependencies

pip install -r requirements.txt

The following packages will be installed:

Package Purpose
streamlit Web dashboard framework
openai OpenAI API client for AI analysis
firecrawl-py Web scraping API client
pandas Data manipulation
plotly Interactive charts
python-dotenv Environment variable management
requests HTTP requests

Step 3: Configure Environment Variables

cp .env.example .env

Edit the .env file and add your API keys:

# OpenAI API Key
OPENAI_API_KEY=sk-your-openai-key-here

# Firecrawl API Key
FIRECRAWL_API_KEY=fc-your-firecrawl-key-here

# Database path (optional, defaults to reviews.db)
DATABASE_PATH=reviews.db

🔑 Obtaining API Keys

OpenAI API Key

  1. Visit platform.openai.com/api-keys
  2. Sign in or create an account
  3. Click "Create new secret key"
  4. Copy the key and add it to your .env file

Note: ECom Intel uses the gpt-4o-mini model, which is cost-effective and fast.

Firecrawl API Key

  1. Visit firecrawl.dev
  2. Sign up for an account
  3. Navigate to API settings
  4. Copy your API key and add it to your .env file

🚀 Usage

Starting the Application

streamlit run app.py

The application will start and open in your default browser at http://localhost:8501.

Analyzing a Product

  1. Enter a Product URL in the sidebar

    • Supported formats: Amazon, eBay, or other e-commerce product pages
  2. Adjust Settings (optional)

    • Max review pages: Slider to control how many pages to scrape (1-10)
    • Use cached results: Toggle to use previously stored results
  3. Click "Analyze Reviews" and watch the progress:

    • 🔍 Searching for reviews...
    • 📥 Scraping review content...
    • 🧠 Analyzing reviews with AI...
    • 💾 Saving results...
  4. View Results:

    • Key metrics (total reviews, average rating, sentiment percentages)
    • Sentiment distribution pie chart
    • Rating distribution bar chart
    • Key insights and recommendations
    • Pros and cons summary
    • Sample reviews with sentiment labels

💡 Tips for Best Results

Tip Description
🔗 Use direct product URLs More accurate results with specific product pages
Popular products Products with more reviews provide better insights
💾 Check cached results Save API credits by using stored data
📊 Adjust max pages More pages = more reviews but longer processing time
Allow sufficient time Comprehensive analysis may take 1-2 minutes

🐛 Troubleshooting

Common Issues

"API Key Not Found" Error

  • ✅ Ensure .env file exists in the project root
  • ✅ Verify API keys are correctly formatted
  • ✅ Check that API keys are active and valid

"No Reviews Found"

  • ✅ Try a different product URL
  • ✅ Verify the product has reviews available
  • ✅ Increase the max pages setting in the sidebar

"Scraping Failed"

  • ✅ Verify Firecrawl API key is valid
  • ✅ Check your internet connection
  • ✅ Some websites may block scraping attempts

"Analysis Error"

  • ✅ Verify OpenAI API key and available credits
  • ✅ Check if the gpt-4o-mini model is accessible
  • ✅ Try again with fewer reviews (reduce max pages)

📊 Understanding the Dashboard

Key Metrics Section

Metric Description
Total Reviews Number of reviews analyzed
Average Rating Mean rating across all reviews (1-5 scale)
Positive Sentiment Percentage of positive reviews
Negative Sentiment Percentage of negative reviews

Charts

  • Sentiment Distribution: Pie chart showing positive/negative/neutral breakdown
  • Rating Distribution: Bar chart showing 1-5 star distribution

Insights Section

  • Key Insights: AI-generated observations about the product
  • What Customers Love: Most praised features (Pros)
  • Common Complaints: Frequent issues mentioned (Cons)
  • Recommendations: Actionable suggestions based on reviews

Recent Analyses

View history of previously analyzed products with their ratings and review counts.


🤝 Contributing

Contributions are welcome! To contribute:

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

Next: Architecture-and-Tools - Learn about the technical architecture