diff --git a/lib/supabase.ts b/lib/supabase.ts index 85d0bf6..01e2ac4 100644 --- a/lib/supabase.ts +++ b/lib/supabase.ts @@ -1,6 +1,14 @@ -import { createClient } from '@supabase/supabase-js'; +import { createClient, SupabaseClient } from '@supabase/supabase-js'; -const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL!; -const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!; +const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL; +const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY; -export const supabase = createClient(supabaseUrl, supabaseAnonKey); +// Create client only if credentials are available +// This allows the app to run without Supabase for basic previews +export const supabase: SupabaseClient | null = + supabaseUrl && supabaseAnonKey + ? createClient(supabaseUrl, supabaseAnonKey) + : null; + +// Helper to check if Supabase is configured +export const isSupabaseConfigured = (): boolean => supabase !== null; diff --git a/next.config.js b/next.config.js index 419ac82..3c6a178 100644 --- a/next.config.js +++ b/next.config.js @@ -1,12 +1,17 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, - // Note: 'output: standalone' is set during Docker build, not in dev mode + + // Support VibeCoder proxy paths (e.g., /projekte/[id]/preview/) + assetPrefix: process.env.ASSET_PREFIX || undefined, + basePath: process.env.BASE_PATH || undefined, + experimental: { serverActions: { bodySizeLimit: '2mb', }, }, + images: { remotePatterns: [ { diff --git a/package.json b/package.json index 65cb12e..a539db4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "project-1766459980010-q6lr8s01b", - "version": "0.1.0", - "description": "ads", + "name": "lumina-nextjs-template", + "version": "0.2.0", + "description": "Next.js 15 starter template for Lumina VibeCoder projects", "private": true, "scripts": { "dev": "next dev",