Ping-of-Exile
- Electron
- React
- TypeScript
- Node.js
- Chokidar
- Discord API
Ping of Exile is a real-time trade monitoring desktop application for Path of Exile that automatically detects incoming trade requests and sends Discord notifications with intelligent filtering.
I built the entire system: a file watcher that monitors Path of Exile’s client log in real-time, a sophisticated trade parsing engine that extracts trade details using regex pattern matching, a multi-layered filtering system with currency thresholds and whitelists, and Discord webhook integration for instant notifications.
How it works (log monitoring → notifications)
- Real-time log monitoring: The app uses Chokidar to watch Path of Exile’s client log file for changes, reading only new appended content to efficiently process incoming messages.
- Trade detection & parsing: A complex regex pattern extracts trade details from log messages: player name, item name, item type, price, currency, league, stash tab, and position coordinates.
- Intelligent filtering: Multi-tier filtering system prioritizes currency value thresholds (Exalted, Chaos, Divine, Annulment orbs), then falls back to item and stash tab whitelists. AFK status detection ensures notifications only fire when appropriate.
- Discord integration: Filtered trades trigger rich Discord webhook notifications with embedded trade details, optional user pings, and original log context for verification.
What I built (scope & responsibilities)
- File monitoring system: Robust log file watching with error handling, file validation, and automatic restart on file changes or replacements.
- Trade parsing engine: Regex-based extraction of structured trade data from Path of Exile’s specific message format, handling various item types and currency combinations.
- Filtering logic: Currency threshold system that overrides other filters when met, with fallback to configurable item and stash tab whitelists. Smart handling of empty filter states.
- Desktop UI: React-based interface with real-time trade display, filter management, settings persistence, and theme switching using shadcn/ui components.
- Discord notifications: Rich webhook integration with customizable user mentions, trade details formatting, and AFK-aware notification timing.
Design choices that make it robust
- Efficient file watching: Only reads appended content rather than entire file, with size tracking to detect file truncation or replacement.
- Persistent configuration: Electron Store with schema validation for all settings, ensuring user preferences survive app restarts.
- Graceful error handling: Comprehensive error catching for file operations, network requests, and invalid configurations with user-friendly error messages.
- Modular architecture: Clean separation between main process (file monitoring, parsing) and renderer process (UI) with secure IPC communication.
- Smart filtering hierarchy: Currency thresholds take precedence over whitelists, ensuring high-value trades are never missed while allowing fine-grained control for lower-value items.