From b3e0173651c9f557b062bf10b1362e3fe1cfc902 Mon Sep 17 00:00:00 2001 From: urjitc <135136842+urjitc@users.noreply.github.com> Date: Wed, 15 Apr 2026 23:42:28 +0000 Subject: [PATCH 1/8] Install Autumn SDK and integrate with Better Auth --- .env.example | 3 +++ package.json | 1 + src/app/layout.tsx | 24 +++++++++++++++++------- src/lib/auth-client.ts | 25 ++++++++++++++----------- src/lib/auth.ts | 2 ++ 5 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.env.example b/.env.example index c583d8bb..876d2cfb 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,9 @@ NEXT_PUBLIC_APP_URL=http://localhost:3000 BETTER_AUTH_SECRET=your-better-auth-secret BETTER_AUTH_URL=http://localhost:3000 +# Autumn Billing +AUTUMN_SECRET_KEY=am_sk_test_... + # Google OAuth (for Better Auth) GOOGLE_CLIENT_ID=... GOOGLE_CLIENT_SECRET=... diff --git a/package.json b/package.json index afab3568..5931345c 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,7 @@ "ai": "^6.0.158", "assemblyai": "^4.29.0", "assistant-stream": "^0.3.10", + "autumn-js": "^1.2.9", "better-auth": "^1.6.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 40607c89..6f634e89 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,6 @@ import type { Metadata } from "next"; import Script from "next/script"; +import { AutumnProvider } from "autumn-js/react"; // Using system fonts instead of custom fonts import { Providers } from "@/components/providers"; @@ -85,13 +86,22 @@ export default function RootLayout({ - -