diff --git a/_wiki/REFACTORING_SUMMARY.md b/_wiki/REFACTORING_SUMMARY.md deleted file mode 100644 index f640702..0000000 --- a/_wiki/REFACTORING_SUMMARY.md +++ /dev/null @@ -1,118 +0,0 @@ -# Refactoring Summary: Troostwijk Auction Monitor - -## Overview -This project has been refactored to focus on **image processing and monitoring**, removing all auction/lot scraping functionality which is now handled by the external `ARCHITECTURE-TROOSTWIJK-SCRAPER` process. - -## Architecture Changes - -### Removed Components -- ❌ **TroostwijkScraper.java** - Removed (replaced by TroostwijkMonitor) -- ❌ Auction discovery and scraping logic -- ❌ Lot scraping via Playwright/JSoup -- ❌ CacheDatabase (can be removed if not used elsewhere) - -### New/Updated Components - -#### New Classes -- ✅ **TroostwijkMonitor.java** - Monitors bids and coordinates services (no scraping) -- ✅ **ImageProcessingService.java** - Downloads images and runs object detection -- ✅ **Console.java** - Simple output utility (renamed from IO to avoid Java 25 conflict) - -#### Modernized Classes -- ✅ **AuctionInfo** - Converted to immutable `record` -- ✅ **Lot** - Converted to immutable `record` with `minutesUntilClose()` method -- ✅ **DatabaseService.java** - Uses modern Java features: - - Text blocks (`"""`) for SQL - - Record accessor methods - - Added `getImagesForLot()` method - - Added `processed_at` timestamp to images table - - Nested `ImageRecord` record - -#### Preserved Components -- ✅ **NotificationService.java** - Desktop/email notifications -- ✅ **ObjectDetectionService.java** - YOLO-based object detection -- ✅ **Main.java** - Updated to use new architecture - -## Database Schema - -### Populated by External Scraper -- `auctions` table - Auction metadata -- `lots` table - Lot details with bidding info - -### Populated by This Process -- `images` table - Downloaded images with: - - `file_path` - Local storage path - - `labels` - Detected objects (comma-separated) - - `processed_at` - Processing timestamp - -## Modern Java Features Used - -- **Records** - Immutable data carriers (AuctionInfo, Lot, ImageRecord) -- **Text Blocks** - Multi-line SQL queries -- **var** - Type inference throughout -- **Switch expressions** - Where applicable -- **Pattern matching** - Ready for future enhancements - -## Responsibilities - -### This Project -1. ✅ Image downloading from URLs in database -2. ✅ Object detection using YOLO/OpenCV -3. ✅ Bid monitoring and change detection -4. ✅ Desktop and email notifications -5. ✅ Data enrichment with image analysis - -### External ARCHITECTURE-TROOSTWIJK-SCRAPER -1. 🔄 Discover auctions from Troostwijk website -2. 🔄 Scrape lot details via API -3. 🔄 Populate `auctions` and `lots` tables -4. 🔄 Share database with this process - -## Usage - -### Running the Monitor -```bash -# With environment variables -export DATABASE_FILE=troostwijk.db -export NOTIFICATION_CONFIG=desktop # or smtp:user:pass:email - -java -jar troostwijk-monitor.jar -``` - -### Expected Output -``` -=== Troostwijk Auction Monitor === - -✓ OpenCV loaded -Initializing monitor... - -📊 Current Database State: - Total lots in database: 42 - Total images processed: 0 - -[1/2] Processing images... -Processing pending images... - -[2/2] Starting bid monitoring... -✓ Monitoring service started - -✓ Monitor is running. Press Ctrl+C to stop. - -NOTE: This process expects auction/lot data from the external scraper. - Make sure ARCHITECTURE-TROOSTWIJK-SCRAPER is running and populating the database. -``` - -## Migration Notes - -1. The project now compiles successfully with Java 25 -2. All scraping logic removed - rely on external scraper -3. Shared database architecture for inter-process communication -4. Clean separation of concerns -5. Modern, maintainable codebase with records and text blocks - -## Next Steps - -- Remove `CacheDatabase.java` if not needed -- Consider adding API endpoint for external scraper to trigger image processing -- Add metrics/logging framework -- Consider message queue (e.g., Redis, RabbitMQ) for better inter-process communication diff --git a/API_INTELLIGENCE_FINDINGS.md b/docs/API_INTELLIGENCE_FINDINGS.md similarity index 100% rename from API_INTELLIGENCE_FINDINGS.md rename to docs/API_INTELLIGENCE_FINDINGS.md diff --git a/_wiki/ARCHITECTURE.md b/docs/ARCHITECTURE.md similarity index 100% rename from _wiki/ARCHITECTURE.md rename to docs/ARCHITECTURE.md diff --git a/COMPREHENSIVE_UPDATE_PLAN.md b/docs/COMPREHENSIVE_UPDATE_PLAN.md similarity index 100% rename from COMPREHENSIVE_UPDATE_PLAN.md rename to docs/COMPREHENSIVE_UPDATE_PLAN.md diff --git a/_wiki/Deployment.md b/docs/Deployment.md similarity index 100% rename from _wiki/Deployment.md rename to docs/Deployment.md diff --git a/ENHANCED_LOGGING_EXAMPLE.md b/docs/ENHANCED_LOGGING_EXAMPLE.md similarity index 100% rename from ENHANCED_LOGGING_EXAMPLE.md rename to docs/ENHANCED_LOGGING_EXAMPLE.md diff --git a/FIXES_COMPLETE.md b/docs/FIXES_COMPLETE.md similarity index 100% rename from FIXES_COMPLETE.md rename to docs/FIXES_COMPLETE.md diff --git a/_wiki/FIXING_MALFORMED_ENTRIES.md b/docs/FIXING_MALFORMED_ENTRIES.md similarity index 100% rename from _wiki/FIXING_MALFORMED_ENTRIES.md rename to docs/FIXING_MALFORMED_ENTRIES.md diff --git a/_wiki/Getting-Started.md b/docs/Getting-Started.md similarity index 100% rename from _wiki/Getting-Started.md rename to docs/Getting-Started.md diff --git a/_wiki/HOLISTIC.md b/docs/HOLISTIC.md similarity index 100% rename from _wiki/HOLISTIC.md rename to docs/HOLISTIC.md diff --git a/_wiki/Home.md b/docs/Home.md similarity index 100% rename from _wiki/Home.md rename to docs/Home.md diff --git a/INTELLIGENCE_DASHBOARD_UPGRADE.md b/docs/INTELLIGENCE_DASHBOARD_UPGRADE.md similarity index 100% rename from INTELLIGENCE_DASHBOARD_UPGRADE.md rename to docs/INTELLIGENCE_DASHBOARD_UPGRADE.md diff --git a/_wiki/JAVA_FIXES_NEEDED.md b/docs/JAVA_FIXES_NEEDED.md similarity index 100% rename from _wiki/JAVA_FIXES_NEEDED.md rename to docs/JAVA_FIXES_NEEDED.md diff --git a/QUICK_REFERENCE.md b/docs/QUICK_REFERENCE.md similarity index 100% rename from QUICK_REFERENCE.md rename to docs/QUICK_REFERENCE.md diff --git a/REFACTORING_COMPLETE.md b/docs/REFACTORING_COMPLETE.md similarity index 100% rename from REFACTORING_COMPLETE.md rename to docs/REFACTORING_COMPLETE.md diff --git a/REFACTORING_SUMMARY.md b/docs/REFACTORING_SUMMARY.md similarity index 100% rename from REFACTORING_SUMMARY.md rename to docs/REFACTORING_SUMMARY.md diff --git a/_wiki/RUN_INSTRUCTIONS.md b/docs/RUN_INSTRUCTIONS.md similarity index 100% rename from _wiki/RUN_INSTRUCTIONS.md rename to docs/RUN_INSTRUCTIONS.md diff --git a/SESSION_COMPLETE_SUMMARY.md b/docs/SESSION_COMPLETE_SUMMARY.md similarity index 100% rename from SESSION_COMPLETE_SUMMARY.md rename to docs/SESSION_COMPLETE_SUMMARY.md diff --git a/_wiki/TESTING.md b/docs/TESTING.md similarity index 100% rename from _wiki/TESTING.md rename to docs/TESTING.md diff --git a/VALIDATION_SUMMARY.md b/docs/VALIDATION_SUMMARY.md similarity index 100% rename from VALIDATION_SUMMARY.md rename to docs/VALIDATION_SUMMARY.md