Skip to main content

E-commerce Stock Tracker with Auto-Notifications

Automated stock monitoring system for multiple e-commerce platforms with real-time Telegram notifications.

  • Automation Engineer
  • Backend Developer
  • Bot Developer
E-commerce Stock Tracker Dashboard

Project Overview

This project automates the tedious task of monitoring product availability on multiple Indonesian e-commerce platforms. Originally developed to track iPhone 17 Pro Max availability, the system monitors stock across iBox, Digimap, Eraspace, and Hellostore.

The system runs 24/7, checking product availability at configurable intervals and sends instant Telegram notifications when items become available, giving users a competitive advantage in securing limited stock items.

Key Features

  • Multi-Platform Monitoring: Simultaneously tracks stock across 4 major e-commerce platforms (iBox, Digimap, Eraspace, Hellostore) with platform-specific detection strategies.
  • Stealth Browser Automation: Uses Playwright with stealth mode to bypass anti-bot detection, mimicking real user behavior with proper headers and delays.
  • Instant Telegram Alerts: Real-time notifications via Telegram Bot API with product details, availability status, and direct purchase links.
  • Intelligent Detection: Multiple fallback strategies for stock detection including button state analysis, inventory quantity checking, and HTML parsing.
  • Comprehensive Logging: Detailed activity logs with timestamps, status changes, and hourly monitoring reports.
  • Auto-Recovery System: Automatic error handling and browser restart on failures, ensuring continuous monitoring even during network issues.

Technical Architecture

  • Browser Automation: Playwright with Chromium in headless mode, implementing stealth techniques with custom user agents, viewport settings, and natural timing delays.
  • Detection Strategies: Multi-layered approach — button visibility checking, hidden inventory extraction, add-to-cart analysis, and text-based stock indicators with fallback mechanisms.
  • Data Extraction: Beautiful Soup for HTML parsing combined with Playwright's native selectors. JSON data extraction from embedded script tags.
  • Notification System: Telegram Bot API integration with formatted markdown messages and status change detection to prevent notification spam.

Challenges & Solutions

  • Anti-Bot Detection: Implemented Playwright Stealth with custom user agents, natural timing delays, and browser fingerprint manipulation to mimic human behavior.
  • Dynamic Content Loading: Used full browser automation with proper wait strategies and JavaScript execution monitoring to ensure complete page rendering.
  • Platform-Specific Variations: Created platform-specific checker classes with customized detection strategies and multiple fallback mechanisms for reliability.

Results & Impact

The system successfully runs for extended periods with minimal intervention, providing competitive advantage in securing limited stock items. Hourly status reports ensure system health monitoring and provide peace of mind for 24/7 operation.