feat: implement advanced tagging system, tag weighting, and app focus refactoring
- 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
This commit is contained in:
6
src/lib/ai-client.ts
Normal file
6
src/lib/ai-client.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { OpenAI } from 'openai';
|
||||
|
||||
export const aiClient = new OpenAI({
|
||||
baseURL: 'https://api.tokenfactory.nebius.com/v1/',
|
||||
apiKey: process.env.NEBIUS_API_KEY,
|
||||
});
|
||||
19
src/lib/supabase-admin.ts
Normal file
19
src/lib/supabase-admin.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user