Start repository

This commit is contained in:
Francisco Pessano
2025-06-06 21:14:10 -03:00
commit 1bb5fcd022
72 changed files with 14106 additions and 0 deletions

30
src/lib/supabase.ts Normal file
View File

@@ -0,0 +1,30 @@
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = import.meta.env.PUBLIC_SUPABASE_URL;
const supabaseAnonKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY;
if (!supabaseUrl || !supabaseAnonKey) {
throw new Error('Missing Supabase environment variables');
}
export const supabase = createClient(supabaseUrl, supabaseAnonKey);
export type Debt = {
id: string;
created_at: string;
updated_at: string;
vendor: string;
amount: number;
raw_email: string | null;
status: 'received' | 'negotiating' | 'settled' | 'failed' | 'opted_out';
negotiated_plan: string | null;
projected_savings: number;
};
export type AuditLog = {
id: string;
created_at: string;
debt_id: string;
action: string;
details: Record<string, any>;
};