chore: create frontend project from boilerplate

This commit is contained in:
Henry Li
2026-01-14 09:50:26 +08:00
parent 3ff7613dd9
commit c628c7f8db
72 changed files with 15444 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import { createAuthClient } from "better-auth/react";
export const authClient = createAuthClient();
export type Session = typeof authClient.$Infer.Session;

View File

@@ -0,0 +1,9 @@
import { betterAuth } from "better-auth";
export const auth = betterAuth({
emailAndPassword: {
enabled: true,
},
});
export type Session = typeof auth.$Infer.Session;

View File

@@ -0,0 +1 @@
export { auth } from "./config";

View File

@@ -0,0 +1,7 @@
import { auth } from ".";
import { headers } from "next/headers";
import { cache } from "react";
export const getSession = cache(async () =>
auth.api.getSession({ headers: await headers() }),
);