11 Commits

Author SHA1 Message Date
Semih
9f3fcf26f8 fix: Volvo parser - VIN decode & category flow improvements
Volvo VIN Decode:
- Changed URL pattern from vehicle.action to vin-group.action
- Added parseVolvoInfoTable() for Volvo's specific table format
  (multiple label/value pairs per row)
- Fixed brand detection using WMI codes (YV1/YV4 = Volvo)
- Updated selectors for vinInfoTable and nav-group tables

Category & SubGroup Flow:
- Added LEGACY_VOLVO to architectures using vin-group.action
- Implemented 4-level Volvo hierarchy:
  1. vin-group.action → Main groups (group1)
  2. vin-group.action?group1=... → Sub-groups (group2)
  3. vin-group.action?group1=...&group2=... → Illustrations
  4. vin-image-board.action → Parts (dynamic JS loading)
- Added fetchVolvoPartsFromIllustrations() method
- Added parseVolvoIllustrations() for nav-group3-table

TODO: Volvo parts are loaded dynamically via JavaScript.
The nav-bom-table in vin-image-board.action is empty in static HTML.
Need to investigate json-vin-bom.action or similar for BOM data.

Test Results:
- VIN decode: Volvo V40 (13-), 2015, 7 categories ✓
- SubGroups fetch: Working ✓
- Parts fetch: Needs dynamic JS handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:33:18 +01:00
Semih
42175731cf fix: Volvo parser now correctly decodes VIN with vin-group.action
- Changed VIN search URL from vehicle.action to vin-group.action
- Updated selectors for Volvo's specific HTML structure (vinInfoTable)
- Added parseVolvoInfoTable() to handle multiple label/value pairs per row
- Fixed brand detection to use WMI codes (YV1/YV4 = Volvo)
- Updated category parsing to use nav-group1-table
- Added LEGACY_VOLVO to architectures using vin-group.action

Test VIN YV1MV845BF2240557 now returns:
- Brand: Volvo
- Model: V40 (13-)
- Year: 2015
- Categories: 7

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:21:52 +01:00
Semih
fdb78383c3 feat: Add Jaguar and Land Rover brand services
- Create JaguarService with SAJ WMI code mapping
- Create LandRoverService with SAL WMI code mapping
- Both brands use P5_MODERN architecture with /p5jlr API path
- Register services in pl24.module.ts and pl24-factory.service.ts
- Update brands index to export JLR services

Tested with VIN SAJAF511866E91130:
- VIN decode: working
- Categories: 23 main groups
- Parts fetch: 90-106 parts per category
- Schema images: downloaded via token-based imageserver
- Hotspots: extracted correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:02:12 +01:00
Semih
f6cfae2eb6 fix: Opel schema images now load via ticket-based system
- Fixed proxySchemaImage to detect Opel catalogs and use downloadOpelSchemaImage
- Opel requires a server-generated 'signature' parameter for image tickets
- Extract signed ticket URL from parts page HTML (imageViewerParamsUrl)
- Use extracted signature to get valid image ticket from PL24
- Schema images now return actual PNG instead of HTML

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 07:37:53 +01:00
Semih
4347a499c0 feat: JLR hotspot support & image dimension handling
## PL24 JLR Improvements
- Extend IMAGE_ID_PATTERN to support JLR alphanumeric IDs (e.g., "ll0047c")
- Add extractJlrImageData() method for parsing JLR BOM response
- Extract schema image width/height from JLR images[] array
- Parse hotspots with key and areas from JLR response structure
- Return schemaWidth and schemaHeight in PL24PartsResponse

## Assets
- Add 4 new JLR schema images (eafxpa1a, lf0032a, lf0038a, ls0017)
- Update UI screenshots

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:44:30 +01:00
Semih
895416f1aa feat: PL24 multi-brand support & Corgi integration
## PL24 Improvements
- Add JLR (Jaguar/Land Rover) 3-step parts flow (vin_illus → vin_bomdetails)
- Enhance Ford parser with comprehensive category/subcategory handling
- Extend Hyundai-Kia parser with improved part extraction and hotspot support
- Add dedicated Kia parser for brand-specific parsing
- Add Kia scraper service for specialized scraping
- Improve legacy scraper with better error handling

## New Features
- Add Corgi API integration (corgi.service.ts, corgi.types.ts)
- Add NHTSA WMI fetch script for VIN decoding
- Add 90+ new schema images for parts visualization

## Bug Fixes & Improvements
- Update VIN decoder service with better brand detection
- Improve vehicles service with enhanced data handling
- Update parser factory with Kia support

## Assets
- Add new schema images for multiple vehicle brands
- Update UI screenshots (categories, parts, vehicles pages)
- Add debug hotspots utility for development

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:22:04 +01:00
Semih
757905f41c feat: Complete PL24 architecture overhaul with email & auth improvements
## PL24 Integration Rewrite
- Add dual architecture support: P5 Modern (JSON API) + Legacy (HTML scraping)
- New services: factory, session, fetch, html-parser, legacy-scraper
- Add NHTSA WMI data for accurate brand detection
- Brand-specific parsers for VW, Mercedes, BMW, Audi, Porsche, Ford, etc.
- Add 254 schema images for parts diagrams

## Authentication & Security
- Add PasswordResetToken database model with proper expiration
- Implement dual persistence (Redis + DB) for password reset tokens
- Add email enumeration protection

## Email Module
- New EmailService for password reset emails
- Configurable SMTP settings

## Database Schema
- Add Vehicle fields: equipment, interiorCode, productionDate, salesType
- Add Part.hotspotId for schema hotspot linking
- Add SchemaPic.hotspots JSON field
- Add VehicleCategory.subGroupsJson for subgroup data

## Frontend
- Improve auth pages (login, register, forgot-password)
- Enhance vehicle detail and categories pages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 08:51:11 +01:00
Semih
384aea0a01 fix: SubGroup filtering now shows all parts correctly
- Removed pagination from getCategoryPartsByVin API endpoint
- API now returns all parts for a category (not just first 50)
- Frontend filters by subGroupId correctly with full dataset
- Removed debug console.log statements from frontend

Previously, only 2 parts would show when selecting a subgroup that had 67 parts
because the API was returning paginated results and the user's subgroup parts
weren't in the first page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 07:16:27 +01:00
Semih
242ef0d053 fix: Hotspots now update correctly when switching subgroups
## Changes

### Backend (vehicles.service.ts)
- Download ALL subgroup schema images on-demand (not just first)
- Store per-subgroup schemaWidth, schemaHeight, and hotspots in DB
- Return per-subgroup hotspot data in API response

### Frontend ([categoryId]/page.tsx)
- Add useMemo hooks for selectedSubGroupData, schemaImageUrl, hotspots
- Hotspots now properly update when subgroup changes
- Schema image changes correctly with subgroup selection
- Reset imageSize state on subgroup change for hotspot recalculation

### PL24 Integration
- Add pl24-db.service.ts for database operations
- Improve schema image downloading and caching

## Bug Fixed
When switching between subgroups (tabs) on the category parts page,
the schema image was changing but hotspots remained fixed on the
first subgroup's values. Now both image and hotspots update correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 18:56:24 +01:00
Semih
2358b38b4d feat: PL24 integration + EMEX on-demand parts loading
## Major Changes

### PL24 Integration (PartsLink24 API)
- Add PL24 auth service with JWT token management
- Add PL24 service for VIN decode and parts catalog
- Support for VAG, Mercedes, BMW, Ford, Renault and more
- Schema image download with base64 decoding
- Image deduplication via SchemaPic table

### EMEX On-Demand Loading
- Remove automatic parts scraping during VIN decode
- Add fetchCategoryParts() for on-demand loading
- Store category URLs in rawResponse for later fetching
- Fix Chrome executable path for Puppeteer

### VIN Decode Flow
- PL24 first, fallback to EMEX if not available
- Both sources now use on-demand parts loading
- Faster VIN lookup (no parts scraped upfront)

### Database Schema
- Add SchemaPic model for image deduplication
- Add schemaPicId to VehicleCategory
- Add EMEX models for parallel scraping

### Frontend Improvements
- Dark theme with Tailwind CSS
- Improved UI components (card, button, input)
- Better category and parts display
- Schema image viewer

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 11:15:06 +01:00
root
b9532a61ee Initial commit: Sase.tr VIN Sorgulama Platformu
Features:
- Next.js 16.1.3 frontend with Turbopack
- NestJS API with Prisma ORM
- EMEX VIN scraper integration
- Turkish translations for automotive parts
- JWT authentication with refresh tokens
- PM2 production deployment

Tech Stack:
- Frontend: Next.js 16.1, React 19, TailwindCSS
- Backend: NestJS, Prisma, MySQL
- Scraping: Puppeteer

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 03:04:30 +01:00