Add beenvoice mobile companion app with full dark mode support.

Expo app with dashboard, time clock, invoices, and settings — native tabs, glass UI, theme-aware components, and iOS Live Activities.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-17 22:36:37 -04:00
parent 8a7a8df477
commit 14c880123c
93 changed files with 8849 additions and 7849 deletions
+50
View File
@@ -0,0 +1,50 @@
import { expoClient } from "@better-auth/expo/client";
import { createAuthClient } from "better-auth/react";
import * as SecureStore from "expo-secure-store";
import {
createContext,
useContext,
useMemo,
type ReactNode,
} from "react";
type AuthClient = ReturnType<typeof createAuthClient>;
const AuthContext = createContext<AuthClient | null>(null);
export function AuthProvider({
apiUrl,
storagePrefix,
children,
}: {
apiUrl: string;
storagePrefix: string;
children: ReactNode;
}) {
const client = useMemo(
() =>
createAuthClient({
baseURL: apiUrl,
plugins: [
expoClient({
scheme: "beenvoice",
storagePrefix,
storage: SecureStore,
}),
],
}),
[apiUrl, storagePrefix],
);
return <AuthContext.Provider value={client}>{children}</AuthContext.Provider>;
}
export function useAuthClient() {
const client = useContext(AuthContext);
if (!client) throw new Error("useAuthClient must be used within AuthProvider");
return client;
}
export function useSession() {
return useAuthClient().useSession();
}