← ClaudeAtlas

laravel-vision-label-scanlisted

Vision AI pipeline for Laravel — upload label photo, extract JSON fields, user reviews and applies to form (never auto-save). Use for OCR/VLM label scanning on admin forms, asset registration, or catalog model entry.
Yaz-inc/yazinc-ai-toolkit · ★ 0 · AI & Automation · score 60
Install: claude install-skill Yaz-inc/yazinc-ai-toolkit
# Laravel Vision Label Scan Image → AI JSON extraction → **review panel** → user applies selected fields. No auto-save. ## When to use - Staff photograph equipment/shipping labels (serial, SKU, MAC, IMEI, PO) - Reduce manual typing into admin forms - Same scan UX on multiple entities (e.g. asset vs catalog model) with different field maps ## Stack - Laravel 10, multipart upload, throttle (e.g. 10/min) - `AiService::analyzeImage()` + `LabelScanService` (domain-agnostic name: `VisionFormScanService`) - Shared Blade partial + JS modal (`label-scan` component pattern) - Config: `config/ai.php` → `label_scan` ## User flow ``` [Scan label] → upload/camera → "Reading label…" → review table: Value | Suggested field | ☑ Apply → [Apply selected] → form fields update only → user clicks Save on form (required) ``` ## API ``` POST /items/scan-label Content-Type: multipart/form-data Body: image (jpeg/png/webp, max 8MB) Response 200: { "success": true, "suggestions": [ { "key": "serial_number", "label": "Serial", "value": "...", "confidence": "high" } ], "extras": [ ... unmapped fields ... ], "description_append": "--- Label scan ---\nMAC: ..." } ``` ## Service layers | Layer | Role | |-------|------| | Controller | Validate image, permission, call service, JSON response | | Scan service | Prompt, `analyzeImage()`, parse JSON, map to form keys, DB lookup (optional) | | AiService | Vision + fallback chain (`label_scan` mode) | ## Prompt rules - Ask for