feat: Add Spotify-style backdrop, Cascade OCR, Smart Scan Flow & OCR Dashboard

- BottleGrid: Implement blurred backdrop effect for bottle cards
- Cascade OCR: TextDetector → RegEx → Fuzzy Match → window.ai pipeline
- Smart Scan: Native OCR for Android, Live Text fallback for iOS
- OCR Dashboard: Admin page at /admin/ocr-logs with stats and scan history
- Features: Add feature flags in src/config/features.ts
- SQL: Add ocr_logs table migration
- Services: Update analyze-bottle to use OpenRouter, add save-ocr-log
This commit is contained in:
2026-01-18 20:38:48 +01:00
parent 83e852e5fb
commit 9ba0825bcd
46 changed files with 3874 additions and 741 deletions

View File

@@ -7,12 +7,10 @@ import OpenAI from 'openai';
* - "openrouter" (default) - Uses OpenRouter with Gemma 3 27B via Nebius/FP8
* - "gemini" - Uses Google Gemini 2.5 Flash
*/
export type AIProvider = 'openrouter' | 'gemini';
export type AIProvider = 'openrouter';
export function getAIProvider(): AIProvider {
const provider = process.env.AI_PROVIDER?.toLowerCase();
if (provider === 'gemini') return 'gemini';
return 'openrouter'; // Default
return 'openrouter';
}
/**
@@ -38,6 +36,7 @@ export function getOpenRouterClient(): OpenAI {
// Default OpenRouter model for vision tasks
export const OPENROUTER_VISION_MODEL = 'google/gemma-3-27b-it';
//export const OPENROUTER_VISION_MODEL = 'google/gemma-3n-e4b-it';
/**
* OpenRouter provider preferences