Commit graph

76 commits

Author SHA1 Message Date
clucraft
5bafab3623
Update header image width in README
Reduced header image width in README.
2026-01-23 13:30:19 -05:00
clucraft
85dc4b9b34
Update header image width in README
Increased the width of the header image from 500 to 600 pixels.
2026-01-23 13:30:00 -05:00
clucraft
9398b5989c Fix README header: remove space, adjust gradient opacity
- Removed space between Price and Ghost (now one word)
- Ghost gradient starts at 85% opacity for smoother transition
- Price text remains fully prominent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:26:24 -05:00
clucraft
b8c3b80db7 Add ghostly header SVG for README
- Combined icon + PriceGhost text in single SVG header
- Ghost text has gradient fade effect (solid to transparent)
- Subtle glow filter for ethereal look
- Replaces separate icon and h1 in README

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:23:54 -05:00
clucraft
25936f4c9d Add Puppeteer fallback for JavaScript-rendered prices
- If no price found in static HTML, automatically try headless browser
- Re-runs all extraction methods on browser-rendered HTML
- Fixes price extraction for Magento, React, Vue, and other JS-heavy sites
- AI extraction now also benefits from rendered HTML

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:21:07 -05:00
clucraft
61ffafdd8c Detect pre-order/coming soon products as out of stock
- AI verification now checks if product is purchasable RIGHT NOW
- AI returns stockStatus field for pre-order/coming soon detection
- Enhanced generic stock status detection with pre-order phrases:
  - Coming soon, available soon, releases on, pre-order, etc.
  - Notify me when available, join waitlist, etc.
- Pre-order buttons no longer count as Add to Cart
- Fixes issue where unreleased products showed as in stock

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:55:08 -05:00
clucraft
059336536f Add ghostly wispy effect to Ghost text in navbar
- Ghost text fades from solid to transparent (left to right)
- Soft ethereal glow effect via text-shadow
- Enhanced glow on hover
- Works in both light and dark modes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:24:42 -05:00
clucraft
6896dd0c7e Use official PriceGhost icon in header and login page
- Replace ghost emoji with SVG icon in navbar
- Replace ghost emoji with SVG icon on login/register page
- Consistent branding throughout the app

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:22:00 -05:00
clucraft
3073f1a010 Fix fresh install 500 error - add base table creation to migrations
- Backend now creates all required tables if they do not exist
- Migrations run BEFORE server accepts connections (prevents race condition)
- Server exits if migrations fail instead of running with broken DB
- Fixes registration failure on fresh Docker installs without init.sql

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:06:51 -05:00
clucraft
5e67e76504 Add version tracking and v1.0.0 release
- Create CHANGELOG.md documenting all features
- Add version.json for version tracking
- Display version in Settings page footer with links to Changelog and GitHub
- Tag release as v1.0.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:54:15 -05:00
clucraft
ccbc188487 Add AI status badges to show verification status on prices
- Add ai_status column to price_history table (verified/corrected/null)
- Track AI verification status through scraper and scheduler
- Display badges next to prices:
  - ✓ AI (green): AI verified the price is correct
  -  AI (orange): AI corrected an incorrect price
- Show badges on Dashboard product cards and ProductDetail page
- Add legend explaining badges in Settings when AI Verification is enabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:45:45 -05:00
clucraft
3d91489f12 Fix AI verification toggle not persisting
The GET and PUT /api/settings/ai endpoints were missing
ai_verification_enabled in the request/response handling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:32:49 -05:00
clucraft
715765bc58 Update README with AI verification docs and Ollama support
- Rename section to "Strongly Recommended: Enable AI Features"
- Document AI Extraction (fallback) and AI Verification separately
- Add Ollama as a provider option throughout
- Add AI price verification to features list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:26:26 -05:00
clucraft
dc4e7b9665 Add AI price verification feature
When enabled, AI verifies every scraped price to ensure accuracy.
This catches issues like scraped "savings" amounts instead of actual prices.

- Add ai_verification_enabled column to users table
- Create verification prompt and functions for Anthropic, OpenAI, Ollama
- Integrate verification step into scraper after traditional scraping
- Add verification toggle to Settings page (separate from AI extraction)
- AI verification is independent of AI extraction fallback

Flow: Traditional scraping -> AI verification (if enabled) -> AI extraction fallback (if no price found)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:24:17 -05:00
clucraft
7afa3ccec3 Update README with new icon and recent features
- Add PriceGhost logo at top of README
- Center header with icon and description
- Add ntfy.sh to notification options and setup guide
- Add Ollama as local AI extraction option
- Add ntfy test endpoint to API reference

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 04:39:33 -05:00
clucraft
31732b814f Fix Newegg scraper picking up bundle savings instead of product price
- Add helper to detect savings/combo/bundle containers
- Prioritize JSON-LD data as primary price source (most reliable)
- Skip price elements inside savings containers
- Add minimum price threshold to filter out discount amounts

Fixes issue where $189.99 bundle savings was extracted instead of
actual $675.59 product price for items like AMD Ryzen 9 9950X3D.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 04:25:12 -05:00
clucraft
1029a0b08c
Update README.md 2026-01-23 04:21:21 -05:00
clucraft
2079357b9b
Update README.md 2026-01-23 04:20:50 -05:00
clucraft
3cedae65bc Add PWA support for mobile app-like experience
- Create ghost icon with gradient background and price tag
- Add manifest.json with app metadata and icon references
- Implement service worker with network-first caching strategy
- Update index.html with PWA meta tags and SW registration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 04:11:27 -05:00
clucraft
3d6af13ac4 Add ntfy.sh notification support
- Add ntfy_topic and ntfy_enabled columns to database
- Add sendNtfyNotification function with emoji tags
- Add /settings/notifications/test/ntfy endpoint
- Add ntfy section in Settings UI with topic input
- Show ntfy badge in ProductDetail notification status

ntfy.sh is a free, simple notification service - no account needed.
Users just pick a topic name and subscribe in the ntfy app.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 21:02:49 -05:00
clucraft
a4da43c127 Return actual sensitive values from API for visibility toggle
Backend:
- Update /settings/notifications to return actual tokens/keys
- Update /settings/ai to return actual API keys

Frontend:
- Update NotificationSettings and AISettings types
- Populate form fields with actual saved values on load
- Eye toggle now reveals actual stored values
- Always show toggle button for consistent UX

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:45:06 -05:00
clucraft
b885e4ef57 Fix password visibility toggle UX
- Change confusing placeholder from bullets to "Saved - enter new value to replace"
- Only show eye toggle when field has actual content to reveal
- Add z-index and improved click handling for toggle button

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:39:47 -05:00
clucraft
81bbd8538f Add password visibility toggle for sensitive fields in Settings
- Create reusable PasswordInput component with eye icon toggle
- Apply to Telegram bot token, Discord webhook, Pushover keys
- Apply to Anthropic and OpenAI API keys
- Toggle switches between masked and visible text

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:33:58 -05:00
clucraft
082aae8789 Add Ollama support for local AI-powered price extraction
- Add database migration for ollama_base_url and ollama_model columns
- Update backend models and queries for Ollama settings
- Add extractWithOllama function using Ollama's /api/chat endpoint
- Add /api/settings/ai/test-ollama endpoint to test connection and list models
- Update frontend Settings page with Ollama configuration UI
- Support model selection from dropdown after testing connection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 20:14:14 -05:00
clucraft
6c2aece1e8 Add stock status history tracking and timeline visualization
- Create stock_status_history table to track status changes over time
- Add stockStatusHistoryQueries with getByProductId, recordChange, getStats
- Update scheduler to record status changes
- Update product creation and manual refresh to record initial/changed status
- Add GET /products/:id/stock-history API endpoint
- Create StockTimeline component with:
  - Visual timeline bar showing in-stock (green) vs out-of-stock (red)
  - Availability percentage
  - Outage count and duration stats
- Integrate timeline into ProductDetail page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 14:23:55 -05:00
clucraft
4928d6b9d3 Add Swiss franc (CHF) and improve Euro currency support
- Add CHF to currency detection patterns in priceParser
- Add getCurrencySymbol helper in notifications service
- Update all frontend price formatting to support CHF
- Swiss francs display as "CHF 29.99" format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 14:16:01 -05:00
clucraft
c2cec6d4f1 Update README with current features and AI recommendation
- Add "Built by AI. Built Right." section addressing AI code quality
- Add prominent section recommending AI extraction feature
- Document all current features including Pushover, notification toggles,
  dark mode, countdown timers, and progress bars
- Update notification setup docs with toggle information
- Add Pushover setup instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 14:09:57 -05:00
clucraft
433c0a0b12 Add toggles to enable/disable notification channels
- Add telegram_enabled, discord_enabled, pushover_enabled columns to database
- Update notification service to check enabled status before sending
- Add toggle switches in Settings UI for each configured channel
- Update ProductDetail to only show badges for enabled channels
- Channels default to enabled so existing users keep notifications

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 14:07:44 -05:00
clucraft
f1deb924d8 Show all configured notification channels on product page
- Add Pushover badge to notification settings section
- Update description to clarify all channels receive notifications
- Fix condition to show section when Pushover is configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 13:55:40 -05:00
clucraft
3fa913814d Add Pushover notification support
- Add pushover_user_key and pushover_app_token columns to users table
- Add sendPushoverNotification function to notifications service
- Add Pushover test endpoint
- Add Pushover settings UI in Settings page
- User provides both User Key and App Token (self-hosted friendly)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 13:48:31 -05:00
clucraft
3b7dce8bde Fix countdown timer using server's next_check_at
- Add next_check_at to Product interface
- Use server-calculated next check time instead of client-side estimate
- Accounts for server-side jitter (±5 min) correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 08:18:26 -05:00
clucraft
d09850d84e Add progress bar and countdown timer to product cards
- Show time remaining until next refresh (e.g., "12m 45s")
- Animated progress bar at bottom of card (blue → cyan → green gradient)
- Glowing edge effect on the progress bar leading point
- Pulse animation when progress reaches 100%

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 08:08:15 -05:00
clucraft
e8123b27dc Add 5 and 10 minute refresh interval options
- Add 5, 10, and 15 minute intervals to both ProductForm and ProductDetail
- Show warning when 5 minute interval is selected (rate limiting risk)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 07:48:24 -05:00
clucraft
0a762eba76 Hide sign up link when registration is disabled
- Check registration status on login page load
- Only show sign up link if registration is enabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 22:52:17 -05:00
clucraft
afda0b3f01 Auto-detect system theme preference
- Use system dark/light preference on first visit
- Listen for system theme changes and update automatically
- Only persist to localStorage when user manually toggles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 22:33:43 -05:00
clucraft
e522c3d987
Update README.md 2026-01-21 22:23:55 -05:00
clucraft
2ecb02677e Display user's name instead of email in profile button
- Add name field to auth login/register responses
- Update User interface in AuthContext to include name
- Show name (or email as fallback) in navbar dropdown

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 22:17:36 -05:00
clucraft
5a048aefd6 Update README with current feature set
- Add AI-powered extraction documentation
- Add target price alerts
- Add admin panel and user management
- Add profile management
- Update API reference with new endpoints
- Update tech stack with Puppeteer and AI SDKs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 22:06:50 -05:00
clucraft
906212e6ae Fix AI extraction JSON-LD parsing and add debug logging
- Extract JSON-LD scripts BEFORE removing script tags
- Add logging for prepared HTML, AI responses, and parsed data
- Include more detailed error messages in test endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:58:39 -05:00
clucraft
d98138fe7c Add AI-powered price extraction fallback
- Add AI extraction service supporting Anthropic (Claude) and OpenAI
- Add AI settings UI in Settings page with provider selection
- Add database migration for AI settings columns
- Integrate AI fallback into scraper when standard methods fail
- Add API endpoints for AI settings and test extraction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:49:55 -05:00
clucraft
cfca33b4ea Add toast notifications for user feedback
- Created ToastContext with showToast hook
- Toast notifications appear in bottom-right, auto-dismiss after 3s
- Added success/error toasts for:
  - Saving notification settings
  - Refreshing prices
  - Updating check interval
  - Deleting products
- Replaced alert() calls with toast notifications

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:35:28 -05:00
clucraft
a8a2562cee Extract stock status from JSON-LD availability field
Now extracts availability/stock status from JSON-LD structured data
(e.g., "https://schema.org/OutOfStock"). This fixes stock detection
for sites like Ubiquiti Store that provide availability in JSON-LD.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:28:39 -05:00
clucraft
f188ad4ff1 Support priceSpecification in JSON-LD price extraction
Some sites (like Ubiquiti Store) use the priceSpecification nested
format in their JSON-LD structured data instead of direct price
property. Now checks offer.priceSpecification.price as fallback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:22:49 -05:00
clucraft
c23cc8353a Remove B&H Photo scraper (Cloudflare protection too strong)
B&H Photo Video uses aggressive Cloudflare protection that blocks
headless browsers even with stealth plugins. Removing the site-specific
scraper for now. The Puppeteer fallback remains in place for other
sites with less aggressive protection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:17:14 -05:00
clucraft
58ad638641 Add human-like behavior to browser scraping 2026-01-21 21:13:09 -05:00
clucraft
9af18969f3 Add puppeteer-extra stealth plugin for Cloudflare bypass
The headless browser was being detected by Cloudflare and stuck on the
"Just a moment..." challenge page. Added puppeteer-extra with the stealth
plugin which patches browser fingerprinting to avoid bot detection. Also
added logic to wait for Cloudflare challenges to complete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:07:51 -05:00
clucraft
be1b2d9b6c Add temporary debug logging to B&H scraper 2026-01-21 21:03:01 -05:00
clucraft
c96861fefb Add Puppeteer fallback for Cloudflare-protected sites
When HTTP requests are blocked with 403 (e.g., B&H Photo's Cloudflare
protection), the scraper now automatically retries using a headless
Chrome browser via Puppeteer. Also updated Dockerfile to include
Chromium dependencies for container deployment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:55:49 -05:00
clucraft
7c8ab0721b Add B&H Photo Video scraper support
- Parse JSON-LD structured data for price, name, image, availability
- Add fallback HTML selectors using data-selenium attributes
- Detect stock status from add-to-cart and notify buttons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:37:53 -05:00
clucraft
e0adae87f6 Fix Walmart scraper with improved price and stock detection
- Parse Walmart's __NEXT_DATA__ JSON for accurate product data
- Extract price, name, image, and availability from embedded JSON
- Add fallback HTML selectors if JSON parsing fails
- Make stock status detection more conservative
- Avoid false "out of stock" from unrelated page text
- Only mark out of stock when explicitly indicated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:33:24 -05:00