feat: ditch triplit, move to postgresql + drizzle orm

This commit is contained in:
Zoe
2026-04-08 17:03:07 -05:00
parent c341c96798
commit e2e3ac6e86
121 changed files with 6680 additions and 4373 deletions
+7 -12
View File
@@ -1,18 +1,13 @@
import { triplitAdapter } from '@daveyplate/better-auth-triplit';
import { HttpClient } from '@triplit/client';
import { drizzleAdapter } from "@better-auth/drizzle-adapter/relations-v2";
import { db } from "../server/lib/db";
import { betterAuth } from 'better-auth/minimal';
import { schema } from '../triplit/schema';
const httpClient = new HttpClient({
schema,
serverUrl: process.env.NUXT_PUBLIC_TRIPLIT_URL,
token: process.env.TRIPLIT_SERVICE_TOKEN,
});
import * as schema from '../drizzle/schema';
export const auth = betterAuth({
database: triplitAdapter({
httpClient,
secretKey: process.env.BETTER_AUTH_SECRET,
database: drizzleAdapter(db, {
provider: "pg",
schema,
usePlural: true,
}),
session: {