- Implemented reusable TagSelector component with i18n support - Added tag weighting system (popularity scores 1-5) - Created admin panel for tag management - Integrated Nebius AI and Brave Search for 'Magic Scan' - Refactored app focus: removed bottle status, updated counters, and displayed extended bottle details - Updated i18n for German and English - Added database migration scripts
20 lines
610 B
TypeScript
20 lines
610 B
TypeScript
import { createClient } from '@supabase/supabase-js';
|
|
|
|
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
|
const supabaseServiceKey = process.env.SUPABASE_SERVICE_ROLE_KEY;
|
|
|
|
if (!supabaseUrl || !supabaseServiceKey) {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
console.warn('Supabase Admin Error: SUPABASE_SERVICE_ROLE_KEY is missing.');
|
|
}
|
|
}
|
|
|
|
export const supabaseAdmin = (supabaseUrl && supabaseServiceKey)
|
|
? createClient(supabaseUrl, supabaseServiceKey, {
|
|
auth: {
|
|
autoRefreshToken: false,
|
|
persistSession: false,
|
|
},
|
|
})
|
|
: null as any;
|