yantrabodha-api / api /database.py
Kethan Dosapati
Enhance static UI and authentication: improve sidebar auth visibility, add mobile responsiveness, and refine error messages; update `/report` endpoint to use `ArticleOut` model; redesign styles for a Reddit-like layout with theming and responsive tweaks.
363bda3
raw
history blame contribute delete
488 Bytes
"""Supabase client singleton."""
import os
from pathlib import Path
from dotenv import load_dotenv
from supabase import create_client, Client
# Load .env from api/ first, then project root, so vars are available
_root = Path(__file__).resolve().parent
load_dotenv(_root / ".env")
load_dotenv(_root.parent / ".env")
SUPABASE_URL = os.environ["SUPABASE_URL"]
SUPABASE_SERVICE_KEY = os.environ["SUPABASE_SERVICE_KEY"]
supabase: Client = create_client(SUPABASE_URL, SUPABASE_SERVICE_KEY)