Commit graph

17 commits

Author SHA1 Message Date
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
fd09d77f05 Improve bulk selection UI with always-visible checkboxes and action menu
- Always show checkboxes next to product items
- Add floating action bar at bottom when items are selected
- Add dropdown menu with bulk actions:
  - Set Price Drop Alert (prompts for threshold)
  - Set Target Price (prompts for target)
  - Enable Stock Alerts
  - Delete Selected
- Remove "Select multiple" toggle in favor of always-on selection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:52:47 -05:00
clucraft
a85e22d8bc Add target price alerts, historical low indicator, bulk actions, and dashboard summary
Features:
- Target price alerts: Set a specific price target and get notified when reached
- Historical low indicator: Badge showing when current price is at/near all-time low
- Bulk actions: Select multiple products to delete at once
- Dashboard summary: Shows total products, items at lowest price, at target, biggest drops

Backend changes:
- Add target_price column to products table
- Add target_price notification type with Telegram/Discord support
- Include min_price in product queries for historical low detection
- Update scheduler to check target price conditions

Frontend changes:
- Add target price input to ProductDetail notification settings
- Show target price badge on product cards
- Add "Lowest Price" and "Near Low" badges to product cards
- Add bulk selection mode with checkboxes
- Add dashboard summary cards at top of product list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:40:39 -05:00
clucraft
2acc47c21c Add external link button to product list items
Opens the product's URL in a new tab directly from the dashboard,
without needing to go to the product detail page first.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:28:10 -05:00
clucraft
040cdb9c42 Add user management features to admin section
- Add ability to create new users from admin panel
- Add role dropdown (User/Admin) for each user
- Replace toggle buttons with select dropdown for role management
- Admin users can access the Admin section in settings
- Regular users see only Profile and Notifications sections

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:17:27 -05:00
clucraft
f46c6ad9d4 Add settings page with profile, notifications, and admin sections
- Add sidebar navigation to settings page
- Add profile section for name management and password change
- Add admin section for user management and registration toggle
- Add profile API endpoints (GET/PUT /profile, PUT /profile/password)
- Add admin API endpoints (users CRUD, system settings)
- Add system_settings table for registration control
- Add name and is_admin columns to users table
- First registered user automatically becomes admin
- Check registration status on register/login page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:58:11 -05:00
clucraft
0c8ce22cc1 Add product list sorting feature
Sort options:
- Date added (default)
- Product name
- Price
- Price change (7d)
- Website

Features:
- Ascending/descending toggle
- Preferences saved to localStorage
- Works with search filtering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:46:21 -05:00
clucraft
7be9906c61 Add notification badges to product list items
Show configured notifications on dashboard:
- Bell icon with dollar amount for price drop threshold
- Package icon for back-in-stock alerts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:35:06 -05:00
clucraft
59db0f5bb0 Fix product update route to include notification settings
Add price_drop_threshold and notify_back_in_stock to PUT /products/:id

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 22:18:44 -05:00
clucraft
4acd5c1432 Fix navbar button heights for visual consistency
Match theme toggle and profile dropdown to same 42px height

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:36:46 -05:00
clucraft
a6928a0c17 Add refresh controls and notification support
- Add refresh button to product list items with spinning animation
- Add editable refresh interval dropdown on product detail page
- Add user profile dropdown with settings link in navbar
- Create Settings page for Telegram and Discord configuration
- Add per-product notification options (price drop threshold, back in stock)
- Integrate notifications into scheduler for automatic alerts
- Add notification service supporting Telegram Bot API and Discord webhooks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 21:15:04 -05:00
clucraft
8c5d20707d Add out-of-stock detection and display
- Add stock_status column to products table (in_stock/out_of_stock/unknown)
- Detect out-of-stock status on Amazon by checking:
  - #availability text for "currently unavailable"
  - #outOfStock element presence
  - Missing "Add to Cart" button
- Add generic stock status detection for other sites
- Allow adding out-of-stock products (they just won't have a price)
- Update background scheduler to track stock status changes
- Display stock status badge in product list and detail pages
- Dim out-of-stock products in the dashboard
- Show "Currently Unavailable" badge instead of price when out of stock

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:54:12 -05:00
clucraft
ba9e52b90f Redesign dashboard with list layout, sparklines, and search
- Add sparkline component for 7-day price history visualization
- Convert product cards to horizontal list items
- Add search functionality to filter products by name/URL
- Backend returns sparkline data and 7-day price change with products
- Show price trend indicator (green for drops, red for increases)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 19:32:25 -05:00
clucraft
4ef61517e3 Add dark mode with theme toggle
- Add dark theme CSS variables
- Theme toggle button in navbar and auth pages
- Persist theme preference in localStorage
- Update chart colors for dark mode
- Auto-detect theme changes via MutationObserver

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:27:17 -05:00
clucraft
a2b0c2cc65 Fix price formatting for PostgreSQL DECIMAL type
PostgreSQL returns DECIMAL as strings, not numbers.
Updated all price formatting functions to handle both.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:22:40 -05:00
clucraft
8992087220 Fix Dockerfiles: use npm install instead of npm ci
npm ci requires package-lock.json which wasn't generated.
Using npm install instead for builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 14:02:06 -05:00
clucraft
10660e5626 Initial commit: PriceGhost price tracking application
Full-stack application for tracking product prices:
- Backend: Node.js + Express + TypeScript
- Frontend: React + Vite + TypeScript
- Database: PostgreSQL
- Price scraping with Cheerio
- JWT authentication
- Background price checking with node-cron
- Price history charts with Recharts
- Docker support with docker-compose

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