/** * Initializes and exports a singleton PocketBase instance for use throughout the app. * * Throws if the PocketBase URL is invalid. */ import PocketBase from "pocketbase"; import { POCKETBASE_URL } from "@/config"; export const pb = new PocketBase(POCKETBASE_URL); export function isAuthenticated(): boolean { return pb.authStore.isValid; }