Add recipes, images, AI photo ID, barcode scanning & ingredient matching
- Fuzzy ingredient matching for bar inventory against recipes - AI photo identification API for bottles/labels (drink + bar context) - Barcode scanner with photo toggle for My Bar - Barcode scan + photo ID buttons on Add Drink form - Auto-pull product images from Open Food Facts barcode lookup - Recipes section on drink detail pages with bar availability - Dedicated Recipes page in sidebar navigation - Bar item image support (schema, upload, display) - Drink detail image upload component - MinIO image proxy through Next.js rewrites (fixes broken image links) - Improved category mapping (energy drinks → Mixers, not Spirits) - Re-process saved recipe ingredients against current bar inventory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,9 +31,8 @@ export async function uploadImage(
|
||||
})
|
||||
)
|
||||
|
||||
const useSSL = process.env.MINIO_USE_SSL === "true"
|
||||
const protocol = useSSL ? "https" : "http"
|
||||
return `${protocol}://${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${BUCKET}/${key}`
|
||||
// Return relative URL through Next.js proxy — works from any device
|
||||
return `/minio-images/${key}`
|
||||
}
|
||||
|
||||
export async function getImage(key: string) {
|
||||
@@ -56,7 +55,6 @@ export async function deleteImage(key: string) {
|
||||
}
|
||||
|
||||
export function getImageUrl(key: string): string {
|
||||
const useSSL = process.env.MINIO_USE_SSL === "true"
|
||||
const protocol = useSSL ? "https" : "http"
|
||||
return `${protocol}://${process.env.MINIO_ENDPOINT}:${process.env.MINIO_PORT}/${BUCKET}/${key}`
|
||||
// Return relative URL through Next.js proxy — works from any device
|
||||
return `/minio-images/${key}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user