PriceTracker Pro

Consumer

Original Idea

Price Change Monitor A browser extension that builds watchlists, charts history, and pings you on drops.

Product Requirements Document: PriceTracker Pro (2026 Edition)

1. Executive Summary

PriceTracker Pro is a high-performance browser extension designed to eliminate price uncertainty in the volatile 2026 e-commerce landscape. By leveraging AI-driven "Buy or Wait" predictions, high-frequency price history tracking via TimescaleDB, and a seamless Manifest V3 architecture, PriceTracker Pro empowers consumers to make data-backed purchasing decisions. The product integrates directly into the browsing experience, providing real-time alerts and visual charts without the need for manual price checks.

2. Problem Statement

Consumers in 2026 face "Hyper-Personalized Pricing" and extreme price volatility driven by retail AI. Static price tags are a thing of the past. Without historical context or predictive analytics, shoppers often overpay or miss the "bottom" of a price cycle. Current solutions are either brittle (broken by site updates) or intrusive (slowing down the browser).

3. Goals & Success Metrics

  • User Savings: Average $150 saved per active user annually.
  • Retention: 40% Day-30 retention for users who add at least 3 items to their watchlist.
  • Performance: Extension popup and side panel initialization in <150ms.
  • Accuracy: 90%+ accuracy in AI-driven price predictions for consumer electronics.
  • Scalability: Support 1 million+ concurrent price tracking points using TimescaleDB Hypercore.

4. User Personas

  • The Tech Enthusiast (David): Tracks GPU and smart home prices. Needs granular history and cares about "Buy/Wait" confidence scores.
  • The Strategic Parent (Sarah): Monitors household essentials and holiday gifts. Wants simple "set and forget" threshold alerts via SMS/Push.
  • The Budget-Conscious Student (Alex): High sensitivity to $10–$20 drops. Uses the extension on multiple devices (laptop and lab PC).

5. User Stories

  • As a shopper, I want to click a single button on an Amazon page so I can track an item without leaving the site.
  • As a data-driven buyer, I want to see a 90-day price chart so I can tell if the current "sale" is actually a good deal.
  • As a multi-device user, I want my watchlist to sync instantly between my work and home browsers using secure session transfer.
  • As a busy professional, I want an AI prediction to tell me "Wait 3 days, 85% chance of a drop" so I don't have to guess.

6. Functional Requirements

6.1 Price Extraction & Tracking

  • Automated DOM Parsing: Use AI-powered self-healing selectors (Playwright-based) to extract prices even when site layouts change.
  • Background Polling: Server-side workers poll product URLs at user-defined or AI-optimized frequencies.
  • Manual Override: Allow users to highlight a price on a page to "teach" the extension where the price is located.

6.2 Visualization & Analytics

  • Interactive Charts: Display time-series data using uPlot for maximum performance in the extension popup.
  • AI "Buy or Wait" Badge: Display a recommendation based on LSTM/XGBoost models analyzing historical cycles and scarcity.
  • Historical Lows: Visual badges indicating if the current price is the "All-Time Low."

6.3 Alerting System

  • Threshold Alerts: Notify user when price < $X.
  • Percentage Drops: Notify user when price drops by X%.
  • Multi-Channel Notifications: Desktop Push (FCM), Email (SendGrid), and SMS (Twilio).

6.4 Cross-Device Sync

  • Auth0 Integration: Secure login using Passkeys and Session Transfer Tokens.
  • Real-time Revocation: Sync logout/session changes across devices using Shared Signals and Events (SSE).

7. Technical Requirements

  • Frontend: React 19.2 (utilizing React Server Components), TypeScript 6.0/7.0 (Strict Mode), Tailwind CSS v4.1 (using CSS-first @theme configuration).
  • Build Tool: Vite 7 with the Rolldown (Rust-based) bundler for ultra-fast extension packaging.
  • Extension Framework: Manifest V3 (MV3).
    • Note: Use the Offscreen API for long-running price parsing tasks to bypass the 30s service worker timeout.
  • Backend: Node.js 24+, Playwright for stealth scraping (utilizing JA4 fingerprinting bypass).
  • Database: PostgreSQL 18 with TimescaleDB 2.18+.
    • Optimization: Use Hypercore storage engine and UUIDv7 for time-ordered primary keys.
  • AI/ML: Gemini Nano (built-in browser AI) for local summarization of product reviews; server-side XGBoost for price forecasting.
  • Security: Enforce Trusted Types and the native Sanitizer API for rendering scraped data to prevent XSS.

8. Data Model

8.1 Users (PostgreSQL)

  • user_id: UUIDv7 (PK)
  • email: String (Unique)
  • auth0_sub: String (Index)
  • created_at: Timestamp

8.2 Products (PostgreSQL)

  • product_id: UUIDv7 (PK)
  • original_url: Text
  • sku: String
  • site_name: String
  • last_price: Numeric(12,2)
  • metadata: JSONB (Product images, titles)

8.3 Price_History (TimescaleDB Hypertable)

  • time: Timestamp (PK/Partition Key)
  • product_id: UUIDv7 (FK)
  • price: Numeric(12,2)
  • Compression: Enabled via Hypercore, segmented by product_id.

8.4 Watchlist (PostgreSQL)

  • watchlist_id: UUID
  • user_id: UUIDv7 (FK)
  • product_id: UUIDv7 (FK)
  • target_price: Numeric(12,2)
  • is_active: Boolean

9. API Specification

  • POST /api/v1/track: Adds a new URL to the system.
    • Request: { url: string, target_price?: number }
  • GET /api/v1/history/:product_id: Returns time-series data for uPlot.
  • POST /api/v1/sync-session: Facilitates Auth0 Session Transfer Token handoff.
  • GET /api/v1/predict/:product_id: Returns AI confidence score for purchasing.

10. UI/UX Requirements

  • Side Panel UI: Primary interface for the watchlist (using chrome.sidePanel API) to allow persistent viewing while browsing.
  • Micro-Interactions: Use Framer Motion for smooth transitions between "Tracking" and "Not Tracking" states.
  • Dark Mode: Native support using Tailwind v4 variable-first theming.
  • Chart Design: Minimalist uPlot canvas charts with hover tooltips showing date and price.

11. Non-Functional Requirements

  • Security: All scraped HTML must pass through the Sanitizer API before rendering in the extension.
  • Privacy: No personal browsing data sent to the server; only product URLs explicitly tracked by the user are processed.
  • Reliability: Service workers must implement event.waitUntil() for all push notification listeners.
  • Performance: Use SkipScan in TimescaleDB to ensure "Latest Price" queries take <10ms.

12. Out of Scope

  • Native iOS/Android mobile applications (Web-only/Extension-only for V1).
  • Automatic purchasing/checkout (Targeting V2 Agentic Commerce).
  • Generic coupon code searching (Focus is strictly on price tracking).

13. Risks & Mitigations

  • Risk: Aggressive anti-bot measures (e.g., Cloudflare/DataDome).
  • Mitigation: Use Playwright with behavioral AI (jitter/scroll simulation) and managed proxy rotation.
  • Risk: Manifest V3 Service Worker termination.
  • Mitigation: State persistence in chrome.storage.session and using alarms to heartbeat the worker.
  • Risk: Data storage costs for high-frequency prices.
  • Mitigation: Implement TimescaleDB tiered storage—compressing data older than 7 days by 95%.

14. Implementation Tasks

Phase 1: Foundation & Setup

  • [ ] Initialize React 19.2 project with Vite 7 and TypeScript 6.0
  • [ ] Configure Tailwind CSS v4.1 with @theme block
  • [ ] Set up Manifest V3 manifest.json with Side Panel permissions
  • [ ] Configure PostgreSQL 18 with TimescaleDB extension

Phase 2: Core Tracking Engine

  • [ ] Implement Playwright-based scraper with JA4 fingerprinting
  • [ ] Build TimescaleDB schema with Hypercore compression enabled
  • [ ] Create background Service Worker to handle chrome.declarativeNetRequest for stealth headers
  • [ ] Implement DOM-based price extraction logic with Sanitizer API protection

Phase 3: Extension UI & Charts

  • [ ] Build "Add to Watchlist" overlay for e-commerce sites
  • [ ] Integrate uPlot for price history visualization in the Side Panel
  • [ ] Implement Auth0 login with Session Transfer Token support
  • [ ] Develop the "Buy or Wait" AI badge component

Phase 4: Notifications & AI

  • [ ] Integrate Firebase Cloud Messaging for Silent Push updates
  • [ ] Set up Node.js worker for XGBoost price prediction modeling
  • [ ] Implement SendGrid and Twilio alert triggers
  • [ ] Deploy to Google Cloud Run (Backend) and Chrome Web Store (Frontend)

Phase 5: Optimization & Launch

  • [ ] Audit CSP policies to ensure require-trusted-types-for 'script' compliance
  • [ ] Optimize SQL queries using SkipScan for "Current Price" lookups
  • [ ] Conduct load testing for 10k concurrent price updates
  • [ ] Finalize Documentation and Onboarding flow