A Laravel application that analyzes Amazon product reviews to detect fake reviews using AI. Supports Amazon products from 14+ countries including US, Canada, Germany, France, UK, Japan, Mexico, Brazil, India, Singapore, and more. The service includes multiple data collection methods with BrightData's managed web scraping, direct Amazon scraping, and comprehensive AI analysis with multi-provider support.
Visit nullfake.com to try it out.
Read our blog post about how nullfake works
- Getting Started
- How It Works
- Supported Countries
- Features
- Data Collection Methods
- Chrome Extension API
- Database Schema
- Technology Stack
- Docker Deployment
- Configuration
- Management Commands
- Usage
- Development
- License
- Shift8
Before setting up Null Fake, ensure you have the following installed:
- PHP 8.2 or higher with the following extensions:
- BCMath
- Ctype
- cURL
- DOM
- Fileinfo
- JSON
- Mbstring
- OpenSSL
- PCRE
- PDO
- Tokenizer
- XML
- Composer (for PHP dependency management)
- Node.js 18+ and npm (for frontend asset compilation)
- MySQL 8.0+ or PostgreSQL 13+
- Redis (optional, for caching and queue management)
-
Clone the repository:
git clone https://github.com/stardothosting/nullfake.git cd nullfake -
Install PHP dependencies:
composer install
-
Install Node.js dependencies:
npm install
-
Build frontend assets:
npm run build
-
Copy the environment file:
cp .env.example .env
-
Generate application key:
php artisan key:generate
-
Configure your
.envfile with the following essential settings:# Application APP_NAME="Null Fake" APP_ENV=local APP_DEBUG=true APP_URL=http://localhost:8000 # Database DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=nullfake DB_USERNAME=your_db_user DB_PASSWORD=your_db_password # Queue Configuration QUEUE_CONNECTION=database ANALYSIS_ASYNC_ENABLED=true # Choose your LLM provider (required for analysis) # Option 1: OpenAI LLM_PRIMARY_PROVIDER=openai OPENAI_API_KEY=sk-proj-your-openai-key-here OPENAI_MODEL=gpt-4o-mini # Option 2: DeepSeek (cost-effective) # LLM_PRIMARY_PROVIDER=deepseek # DEEPSEEK_API_KEY=sk-your-deepseek-key-here # DEEPSEEK_MODEL=deepseek-v3 # Option 3: Self-hosted Ollama (free) # LLM_PRIMARY_PROVIDER=ollama # OLLAMA_BASE_URL=http://localhost:11434 # OLLAMA_MODEL=qwen2.5:7b # Amazon Review Service (choose one) AMAZON_REVIEW_SERVICE=brightdata # or 'scraping' or 'ajax' # If using BrightData BRIGHTDATA_SCRAPER_API=your-brightdata-api-key # If using direct scraping (add multiple sessions for rotation) # AMAZON_COOKIES_1=your-session-cookies-here # AMAZON_COOKIES_2=your-session-cookies-here # Captcha (for production) CAPTCHA_ENABLED=false # Set to true in production # RECAPTCHA_SITE_KEY=your-recaptcha-site-key # RECAPTCHA_SECRET_KEY=your-recaptcha-secret-key # Amazon Affiliate Links (optional) AMAZON_AFFILIATE_ENABLED=true # Set to false to disable affiliate links # AMAZON_AFFILIATE_TAG=your-affiliate-tag # Chrome Extension API (optional) # EXTENSION_API_KEY=your-extension-api-key # Not required for local/testing
-
Create your database:
# For MySQL mysql -u root -p -e "CREATE DATABASE nullfake CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" # For PostgreSQL createdb nullfake
-
Run migrations:
php artisan migrate
-
Seed the database (optional):
php artisan db:seed
-
Start the Laravel development server:
php artisan serve
The application will be available at
http://localhost:8000 -
Start the queue worker (in a separate terminal):
php artisan queue:work --queue=analysis
-
For development with hot reloading (optional, in a separate terminal):
npm run dev
Docker provides an easy way to run NullFake with all dependencies included. This is perfect if you're not familiar with Laravel or want a quick setup.
Prerequisites:
- Docker and Docker Compose installed
- No other services running on ports 8080, 3307, or 11434
Quick Start:
# 1. Copy and configure environment
cp docker.env.example .env
# 2. Edit .env and configure at least one LLM provider:
# For OpenAI: Add your OPENAI_API_KEY
# For local AI: Use OLLAMA (no API key needed)
# 3. Start all services (automatic initialization included)
docker-compose -f docker/docker-compose.yml up -d
# 4. Optional: Install local AI model
docker-compose -f docker/docker-compose.yml exec ollama ollama pull phi4:14bAutomatic Setup: The Docker containers now automatically handle:
- Laravel app key generation
- Database migrations
- Permissions setup
- Directory creation
Access the Application:
- Web Interface: http://localhost:8080
- Database: localhost:3307 (user: faker, password: password)
- Ollama API: http://localhost:11434
Docker Services Included:
- PHP 8.3-FPM: Laravel application
- Nginx: Web server
- MariaDB: Database
- Queue Worker: Background job processing
- Ollama: Local AI model server (optional)
For detailed Docker documentation, troubleshooting, and advanced configuration, see the Docker Setup Guide.
Traditional Setup:
- Visit
http://localhost:8000 - Enter an Amazon product URL (e.g.,
https://amazon.com/dp/B08N5WRWNW) - Complete the captcha if enabled
- Watch the analysis process in real-time
Docker Setup:
- Visit
http://localhost:8080 - Enter an Amazon product URL (e.g.,
https://amazon.com/dp/B08N5WRWNW) - Complete the captcha if enabled
- Watch the analysis process in real-time
Choose one of the following AI providers for review analysis:
Perfect for development and cost-conscious deployments:
-
Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh -
Pull a model:
# Lightweight model (3B parameters) ollama pull llama3.2:3b # Better quality model (7B parameters) ollama pull qwen2.5:7b
-
Configure in
.env:LLM_PRIMARY_PROVIDER=ollama OLLAMA_BASE_URL=http://localhost:11434 OLLAMA_MODEL=qwen2.5:7b
Most reliable, requires API key:
LLM_PRIMARY_PROVIDER=openai
OPENAI_API_KEY=sk-proj-your-openai-key-here
OPENAI_MODEL=gpt-4o-mini94% cheaper than OpenAI with comparable quality:
LLM_PRIMARY_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-your-deepseek-key-here
DEEPSEEK_MODEL=deepseek-v3For users who prefer containerized deployment or want to avoid setting up PHP/MySQL locally, NullFake includes a complete Docker setup.
| Aspect | Traditional Setup | Docker Setup |
|---|---|---|
| Setup Time | 15-30 minutes | 5-10 minutes |
| Prerequisites | PHP 8.2+, MySQL, Node.js, Composer | Docker only |
| Best For | Development, customization | Quick testing, production |
| Performance | Native performance | Near-native (containerized) |
| Isolation | Uses system resources | Fully isolated environment |
# Start services
docker-compose -f docker/docker-compose.yml up -d
# View logs
docker-compose -f docker/docker-compose.yml logs -f
# Access application container
docker-compose -f docker/docker-compose.yml exec app bash
# Run Laravel commands
docker-compose -f docker/docker-compose.yml exec app php artisan [command]
# Stop services
docker-compose -f docker/docker-compose.yml down
# Stop and remove data (WARNING: destroys database)
docker-compose -f docker/docker-compose.yml down -vThe Docker setup uses a template-based configuration approach:
- Safe defaults in
docker.env.example(committed to git) - User customization in
.env(not committed to git) - External secrets provided by users (API keys, etc.)
Required Configuration:
# Copy template
cp docker.env.example .env
# Edit .env and add at least one LLM provider:
OPENAI_API_KEY=sk-proj-your-key-here # OR
LLM_PRIMARY_PROVIDER=ollama # (free, local AI)┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Nginx │ │ Laravel App │ │ MariaDB │
│ (Port 8080) │───▶│ (PHP 8.3-FPM) │───▶│ (Port 3307) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ Queue Worker │ │ Ollama │
│ (Background) │ │ (Port 11434) │
└─────────────────┘ └─────────────────┘
Common Issues:
- "Class not found" errors: Run
composer dump-autoload - Permission errors: Ensure
storage/andbootstrap/cache/are writable - Queue jobs not processing: Make sure
php artisan queue:workis running - LLM provider errors: Test your provider with
php artisan llm:manage test - Amazon scraping fails: Check your cookies/API keys and test with
php artisan test:amazon-scraping
Docker-Specific Issues:
- Port conflicts: Change ports in
docker/docker-compose.ymlif 8080, 3307, or 11434 are in use - 500 errors: Check that you've configured at least one LLM provider in
.env - Database connection fails: Ensure
DB_HOST=dbin your.envfile - Containers won't start: Run
docker-compose -f docker/docker-compose.yml logsto see error details
Logs and Debugging:
- Application logs:
storage/logs/laravel.log - Queue jobs:
php artisan queue:failedto see failed jobs - Debug mode: Set
APP_DEBUG=truein.env - Docker logs:
docker-compose -f docker/docker-compose.yml logs [service]
- User submits an Amazon product URL from any supported country and completes a captcha
- Null Fake automatically detects the country and retrieves the ASIN from the URL
- Database check: If a review analysis for the given ASIN and country exists in the database (and is less than 30 days old), the cached analysis is returned instantly
- If fresh data is needed, the service fetches reviews using the configured data collection method (BrightData, direct scraping, or AJAX bypass)
- Reviews are analyzed using AI with configurable thresholds for fake review detection
- Results are displayed including fake review percentage, grade, explanation, and ratings
Null Fake supports Amazon product analysis from the following countries:
| Country | Amazon Domain | Status |
|---|---|---|
| 🇺🇸 United States | amazon.com | ✅ Full Support |
| 🇨🇦 Canada | amazon.ca | ✅ Full Support |
| 🇩🇪 Germany | amazon.de | ✅ Full Support |
| 🇫🇷 France | amazon.fr | ✅ Full Support |
| 🇬🇧 United Kingdom | amazon.co.uk | ✅ Full Support |
| 🇮🇹 Italy | amazon.it | ✅ Full Support |
| 🇪🇸 Spain | amazon.es | ✅ Full Support |
| 🇯🇵 Japan | amazon.co.jp | ✅ Full Support |
| 🇦🇺 Australia | amazon.com.au | ✅ Full Support |
| 🇮🇳 India | amazon.in | ✅ Full Support |
| 🇲🇽 Mexico | amazon.com.mx | ✅ Full Support |
| 🇧🇷 Brazil | amazon.com.br | ✅ Full Support |
| 🇸🇬 Singapore | amazon.sg | ✅ Full Support |
| 🇳🇱 Netherlands | amazon.nl | ✅ Full Support |
Additional domains supported: Turkey, UAE, Saudi Arabia, Sweden, Poland, Egypt, Belgium
Note: All countries use the same sophisticated AI analysis and data collection methods. Product metadata, review extraction, and fake review detection work consistently across all supported Amazon domains.
- BrightData Integration: Professional web scraping with managed infrastructure and anti-bot protection
- Direct Amazon Scraping: Custom scraping with proxy support and session management
- AJAX Bypass: Alternative method using Amazon's internal endpoints
- Multi-session Management: Cookie rotation across multiple Amazon sessions for reliability
- Rate Limiting: Configurable delays and request throttling
- Multi-provider Support: OpenAI, DeepSeek, or self-hosted Ollama
- Configurable Thresholds: Adjustable fake review detection sensitivity (default: 85+ score)
- Comprehensive Scoring: Heuristic analysis combined with LLM evaluation
- Grade System: Letter grades (A-F) with detailed explanations
- Price Analysis: AI-powered price assessment including MSRP comparison, market positioning, and deal indicators
- Real-time Progress: Job-based processing with live progress updates
- Asynchronous Processing: Queue-based analysis for better performance
- Captcha Protection: reCAPTCHA and hCaptcha support with session persistence
- Product Metadata: Title, image, and description extraction for complete product pages
- Shareable URLs: SEO-optimized product analysis pages
- Chrome Extension API: RESTful API endpoints for browser extension integration
- Database Caching: Fast repeat lookups with 30-day cache validity
- Comprehensive Alerting: Pushover notifications for API errors and system issues
- Command Line Tools: Management commands for data processing and system maintenance
- Test Coverage: Extensive test suite with 660+ tests covering all major functionality
The application supports three primary methods for collecting Amazon review data:
Professional managed scraping service with enterprise-grade infrastructure:
AMAZON_REVIEW_SERVICE=brightdata
BRIGHTDATA_SCRAPER_API=your-api-key-hereBenefits:
- Managed anti-bot protection
- High success rates for data collection
- Professional infrastructure
- Built-in retry mechanisms
Custom scraping implementation with advanced session management:
AMAZON_REVIEW_SERVICE=scraping
AMAZON_COOKIES_1=your-session-cookies-here
AMAZON_COOKIES_2=your-session-cookies-here
# Up to AMAZON_COOKIES_10 for rotationFeatures:
- Multi-session cookie rotation
- CAPTCHA detection and alerting
- Proxy integration support
- Bandwidth optimization
Alternative method using Amazon's internal AJAX endpoints:
AMAZON_REVIEW_SERVICE=ajaxNote: Currently disabled pending optimization. Uses Amazon's review rendering endpoints to bypass traditional page scraping.
Null Fake provides RESTful API endpoints for Chrome extension integration, allowing browser extensions to submit review data directly from Amazon product pages.
POST /api/extension/submit-reviews
Headers:
Content-Type: application/jsonX-API-Key: your-api-key(not required for local/testing environments)
Request Body:
{
"asin": "B0CGM1RSZH",
"country": "ca",
"product_url": "https://amazon.ca/dp/B0CGM1RSZH",
"extraction_timestamp": "2025-09-04T23:57:47.173Z",
"extension_version": "1.5.1",
"product_info": {
"title": "Product Title from Amazon Page",
"description": "Product description extracted from DOM",
"image_url": "https://m.media-amazon.com/images/I/product-image.jpg",
"amazon_rating": 4.3,
"total_reviews_on_amazon": 1247,
"price": "$29.99",
"availability": "In Stock"
},
"reviews": [
{
"author": "Customer Name",
"content": "Review text content...",
"date": "2025-03-17",
"extraction_index": 1,
"helpful_votes": 0,
"rating": 5,
"review_id": "AMAZON_REVIEW_ID",
"title": "Review title",
"verified_purchase": true,
"vine_customer": false
}
]
}Response:
{
"success": true,
"asin": "B0CGM1RSZH",
"country": "ca",
"analysis_id": 12681,
"processed_reviews": 99,
"analysis_complete": true,
"results": {
"fake_percentage": 15.2,
"grade": "B",
"explanation": "Analysis detected some potentially inauthentic reviews...",
"amazon_rating": 4.3,
"adjusted_rating": 4.1,
"rating_difference": -0.2
},
"statistics": {
"total_reviews_on_amazon": 1247,
"reviews_analyzed": 99,
"genuine_reviews": 84,
"fake_reviews": 15
},
"product_info": {
"title": "Product Title",
"description": "Product description...",
"image_url": "https://m.media-amazon.com/images/I/product-image.jpg"
},
"view_url": "http://nullfake.com/amazon/ca/B0CGM1RSZH",
"redirect_url": "http://nullfake.com/amazon/ca/B0CGM1RSZH"
}GET /api/extension/analysis/{asin}/{country}
Returns the current analysis status for a given ASIN and country combination.
# Optional API key for production (not required for local/testing)
EXTENSION_API_KEY=your-secure-api-key
# API key requirement (automatically disabled for local/testing environments)
EXTENSION_REQUIRE_API_KEY=true- Direct DOM Access: Extensions can extract complete product data directly from Amazon pages
- No Backend Scraping: Eliminates the need for server-side product metadata scraping
- Real-time Data: Fresh product information and reviews from the user's current session
- Accurate Totals: Access to exact review counts displayed on Amazon pages
- Enhanced Reliability: Bypasses anti-bot measures by using legitimate browser sessions
The asin_data table stores:
asin- Amazon Standard Identification Numbercountry- Country code (e.g., 'us', 'ca')product_title- Product title from Amazonproduct_description- Product description from Amazonproduct_image_url- Product image URLreviews- JSON array of fetched reviewsopenai_result- JSON of full AI analysis with detailed scorestotal_reviews_on_amazon- Total review count reported by Amazonhave_product_data- Boolean indicating complete product metadataprice- Current Amazon price (decimal)currency- Currency code (USD, CAD, GBP, etc.)price_analysis- JSON of AI price analysis resultsprice_analysis_status- Status (pending/processing/completed/failed)
The model calculates:
fake_percentage- Percentage of reviews flagged as potentially fake (score ≥ 85)grade- Letter grade (A-F) based on fake review percentageexplanation- Human-readable analysis summaryamazon_rating- Original average rating from all reviewsadjusted_rating- Adjusted rating excluding fake reviews
- Backend: Laravel 12 with Livewire 3
- Database: MySQL/PostgreSQL with JSON columns
- Queue System: Database-driven job processing for asynchronous analysis
- Session Management: Multi-provider session rotation for Amazon access
- AI Integration: Multi-provider LLM support with automatic failover
- Security: reCAPTCHA/hCaptcha integration with session persistence
- Monitoring: Comprehensive alerting via Pushover for system health
The application supports three AI providers for review analysis:
LLM_PRIMARY_PROVIDER=openai
OPENAI_API_KEY=sk-proj-your-openai-key-here
OPENAI_MODEL=gpt-4o-miniLLM_PRIMARY_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-your-deepseek-key-here
DEEPSEEK_MODEL=deepseek-v3- Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Pull a model:
ollama pull qwen2.5:7borollama pull llama3.2:3b - Configure:
LLM_PRIMARY_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=qwen2.5:7bLLM_AUTO_FALLBACK=trueControl job-based vs immediate processing:
ANALYSIS_ASYNC_ENABLED=true # Use job queues (recommended for production)
QUEUE_CONNECTION=database # Database-backed job processingFor immediate processing (development):
ANALYSIS_ASYNC_ENABLED=false- Check provider status:
php artisan llm:manage status - Switch providers:
php artisan llm:manage switch --provider=ollama - Compare costs:
php artisan llm:manage costs --reviews=100 - Test providers:
php artisan llm:manage test
- Process existing products:
php artisan asin:process-existing --missing-any - Clean zero-review products:
php artisan products:cleanup-zero-reviews - Backfill total review counts:
php artisan backfill:total-review-counts
Run AI-powered price analysis on products:
# Analyze products from the last N days (default: 1 day)
php artisan analyze:prices --days=7
# Analyze a specific ASIN
php artisan analyze:prices --asin=B08N5WRWNW
# Preview what would be processed (dry run)
php artisan analyze:prices --days=7 --dry-run
# Force re-analysis of already analyzed products
php artisan analyze:prices --days=7 --force
# Limit number of products to process
php artisan analyze:prices --days=30 --limit=100
# Adjust delay between API calls (default: 100ms)
php artisan analyze:prices --days=7 --delay=200Note: Price analysis is automatically queued when new products are analyzed. The console command is for batch processing existing products.
- Check Amazon sessions:
php artisan amazon:cookie-sessions - Test scraping functionality:
php artisan test:amazon-scraping - Test international URLs:
php artisan test:international-urls - Debug proxy connections:
php artisan debug:amazon-scraping
# Start main analysis queue worker
php artisan queue:work --queue=analysis
# Start price analysis queue worker
php artisan queue:work --queue=price-analysis
# Start worker for all queues (recommended for production)
php artisan queue:work --queue=analysis,product-scraping,price-analysis,default
# Restart workers (after code deployment)
php artisan queue:restartProduction Supervisor Configuration:
[program:nullfake-queue]
command=/usr/bin/php artisan queue:work database --queue=analysis,product-scraping,price-analysis,default --sleep=3 --tries=3 --timeout=300
numprocs=4- Enter an Amazon product URL from any supported country (US, Canada, Germany, France, UK, Japan, Mexico, Brazil, India, Singapore, etc.)
- Complete the captcha (production only)
- View real-time progress as analysis processes
- Review detailed results including:
- Fake review percentage with adjustable thresholds
- Letter grade (A-F) based on authenticity
- Detailed explanation of findings
- Original vs adjusted ratings
- Product metadata and images
- Country-specific analysis results
Run the comprehensive test suite:
# Standard execution
php artisan test
# Parallel execution (faster)
php artisan test --parallelThe application includes 530+ tests covering:
- Unit tests for all major services
- Feature tests for user workflows
- Integration tests for external services
- Mock-based testing to prevent external API calls
Maintain code quality with Laravel Pint:
./vendor/bin/pintMIT
Developed in Toronto, Canada by Shift8 Web