Real-time stock & price monitoring for Flipkart and Amazon — with Telegram alerts and a live web dashboard.
Live Web App: satiricalguru.github.io/ShopBot
| Feature | Description |
|---|---|
| Multi-platform | Supports Flipkart and Amazon product URLs |
| Instant Check | Paste any URL and get stock status in seconds |
| Price Extraction | Automatically extracts the current selling price |
| Watchlist | Add products to monitor continuously in the background |
| Real-time Updates | WebSocket-powered live status — no refresh needed |
| Check History | Log of all checks with timestamps and prices |
| Telegram Alerts | Get notified the moment a product comes back in stock |
| Pincode Delivery | Check Flipkart deliverability for a specific pincode |
| Modern UI | Dark luxury-tech design, fully responsive |
git clone https://github.com/satiricalguru/ShopBot.git
cd ShopBot
chmod +x start.sh
./start.shThen open http://localhost:8000 in your browser.
ShopBot/
├── backend/
│ ├── app.py # FastAPI server (REST + WebSocket)
│ ├── monitor.py # Platform router (Flipkart + Amazon)
│ ├── amazon_monitor.py # Amazon scraper
│ ├── notifier.py # Telegram notification handler
│ └── requirements.txt
├── frontend/
│ └── index.html # Single-page web app (no build step)
├── .env.example # Environment variable template
├── .gitignore
├── start.sh # One-command launcher
└── README.md
No .env editing needed. Open the app at http://localhost:8000, click ⚙️ Settings, and paste your credentials there. They are saved permanently to settings.json (gitignored) and survive server restarts.
Telegram is optional. The app works without it — you just won't receive push notifications.
If you are using the live GitHub Pages app at satiricalguru.github.io/ShopBot or any static server, you will need to point the frontend to your running backend:
- Open the app and click the ⚙️ Settings icon in the top header.
- Under Server Connection, set the Backend API URL to your deployed backend instance (e.g.
https://your-backend.onrender.comorhttp://localhost:8000if running the backend locally). - Click Save Settings. The app will reload and establish connection with your custom server automatically.
The only thing in .env is the default check interval:
CHECK_INTERVAL=30If you prefer not to use start.sh:
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r backend/requirements.txt
playwright install chromium
cp .env.example .env # Only needed to customise CHECK_INTERVAL
cd backend
uvicorn app:app --reload --port 8000Then open http://localhost:8000 and add your Telegram credentials via ⚙️ Settings.
- Playwright (headless Chromium) navigates to the product page
- For Flipkart: checks for
"Add to Cart"/"Buy Now"buttons (in-stock) and"Notify Me"/"Sold Out"text (out-of-stock). Optionally checks pincode-level deliverability. - For Amazon: reads the
#availabilityspan and checks for#add-to-cart-buttonvisibility - Results — including price, image, and platform — are returned over HTTP + WebSocket
- If the product is in stock and Telegram is configured, an alert is sent immediately with the platform name
- Amazon anti-bot: Amazon aggressively blocks headless browsers. Checks may occasionally fail with a CAPTCHA notice — this is expected. Reduce watchlist frequency or use it for one-off checks.
- Credentials: Telegram token and chat ID are entered via the Settings UI and saved to
settings.json(gitignored). They are never stored in.envor committed to git. - CORS:
allow_origins=["*"]is set for local development. Restrict this if you deploy the backend publicly. - Data persistence: watchlist and history are in-memory and reset on server restart. Settings (credentials + interval) persist across restarts via
settings.json.
- Persistent watchlist (SQLite / JSON)
- Meesho support
- Browser extension mode
- Price history chart
MIT — see LICENSE
Developed by Satirical Guru , Claude & Antigravity .
