Commit Graph

13 Commits

Author SHA1 Message Date
Sjoerd de Vries 52c9947267 fix: harden price scraping (findings 1, 2, 6)
Finding 1: parsePriceValue mishandled thousands separators — "1.299,00"
and "1,299.00" both parsed to 1.3. Both the meta-tag path and the
text-regex path now funnel through a single normalizeAmount() helper
that picks the last separator as the decimal one, and the text regex
also matches thousands-grouped amounts.

Finding 2: the text fallback read <script>/<style> contents via
$('body').text(); those elements are now stripped from a clone first.

Finding 6: the default fetch now uses a 15s AbortSignal.timeout and a
browser-like User-Agent, so one unresponsive host cannot stall the
whole sequential run. The fetchImpl injection point is unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 15:49:56 +02:00
Sjoerd de Vries 862699d35b docs: add README 2026-09-05 15:40:08 +02:00
Sjoerd de Vries 195dff6fe3 chore: add Dockerfile for deployment 2026-09-05 15:28:31 +02:00
Sjoerd de Vries 5b6d672506 feat: wire modules together into the running server
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 15:21:15 +02:00
Sjoerd de Vries f73ea41a6c feat: add web UI for managing products
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 15:17:42 +02:00
Sjoerd de Vries 3b0e824c5b feat: add daily cron scheduler for price checks
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 15:15:09 +02:00
Sjoerd de Vries 68cb8d0c08 feat: add price-check orchestration with retry-safe error handling
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 15:12:16 +02:00
Sjoerd de Vries e1f8576b95 feat: add SMTP mailer for price-change notifications
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 15:09:26 +02:00
Sjoerd de Vries 5e7d247a16 feat: add price scraper with JSON-LD/meta/regex fallback
- Implement extractPrice() to extract price from HTML with three fallback methods:
  1. JSON-LD Product schema (json-ld)
  2. og:price:amount meta tag (meta)
  3. Euro symbol regex pattern (regex)
- Implement fetchAndExtractPrice() for fetching URLs and extracting prices
- Includes helper functions for parsing and normalizing price values
- Add comprehensive test suite with fixtures for each extraction method
- All tests passing (14/14)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 15:06:27 +02:00
Sjoerd de Vries 492833dda4 feat: add SQLite-backed products store
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 15:03:16 +02:00
Sjoerd de Vries a5073e6e74 chore: project scaffolding
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 14:59:04 +02:00
Sjoerd de Vries 5edb1f04f6 Add implementation plan for korting prijstracker
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 14:35:57 +02:00
Sjoerd de Vries 1bfe4fd794 Add design spec for korting prijstracker
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gwc3aCiyQxmCWQke8RvEz
2026-09-05 14:30:28 +02:00