feat: Initialize CAR Auto Center project with Vite and React

Sets up the foundational structure for the CAR Auto Center application using Vite and React. Includes project dependencies, basic HTML structure, TypeScript configuration, and initial README content. This commit establishes the project's build tool, core libraries, and essential configuration files.
This commit is contained in:
MMrp89
2026-02-19 16:22:10 -03:00
parent 638c7c3eef
commit c0bd6d7e3d
20 changed files with 3181 additions and 8 deletions

18
lib/supabase.ts Normal file
View File

@@ -0,0 +1,18 @@
import { createClient } from '@supabase/supabase-js';
// NOTA: Em produção, estas variáveis devem estar no .env
// Para teste imediato, se as variáveis não existirem, o sistema usará localStorage
// Safely access environment variables
const envUrl = (import.meta as any).env?.VITE_SUPABASE_URL;
const envKey = (import.meta as any).env?.VITE_SUPABASE_ANON_KEY;
// Fallback to placeholder values to prevent createClient from throwing "supabaseUrl is required" error
const supabaseUrl = envUrl || 'https://placeholder.supabase.co';
const supabaseAnonKey = envKey || 'placeholder';
export const supabase = createClient(supabaseUrl, supabaseAnonKey);
export const isSupabaseConfigured = () => {
return !!envUrl && !!envKey && envUrl !== '' && envKey !== '';
};