create-better-t-stack 3.2.6 → 3.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as createBtsCli } from "./src-DW5V85iA.js";
2
+ import { n as createBtsCli } from "./src-c3LG0aVB.js";
3
3
 
4
4
  //#region src/cli.ts
5
5
  createBtsCli().run();
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-DW5V85iA.js";
2
+ import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-c3LG0aVB.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -62,11 +62,11 @@ function getDefaultConfig() {
62
62
  }
63
63
  const DEFAULT_CONFIG = getDefaultConfig();
64
64
  const dependencyVersionMap = {
65
- "better-auth": "^1.3.13",
66
- "@better-auth/expo": "^1.3.13",
65
+ "better-auth": "^1.3.28",
66
+ "@better-auth/expo": "^1.3.28",
67
67
  "@clerk/nextjs": "^6.31.5",
68
68
  "@clerk/clerk-react": "^5.45.0",
69
- "@clerk/tanstack-react-start": "^0.25.1",
69
+ "@clerk/tanstack-react-start": "^0.26.3",
70
70
  "@clerk/clerk-expo": "^2.14.25",
71
71
  "drizzle-orm": "^0.44.2",
72
72
  "drizzle-kit": "^0.31.2",
@@ -116,11 +116,11 @@ const dependencyVersionMap = {
116
116
  "@ai-sdk/react": "^2.0.39",
117
117
  streamdown: "^1.3.0",
118
118
  shiki: "^3.12.2",
119
- "@orpc/server": "^1.9.0",
120
- "@orpc/client": "^1.9.0",
121
- "@orpc/openapi": "^1.9.0",
122
- "@orpc/zod": "^1.9.0",
123
- "@orpc/tanstack-query": "^1.9.0",
119
+ "@orpc/server": "^1.10.0",
120
+ "@orpc/client": "^1.10.0",
121
+ "@orpc/openapi": "^1.10.0",
122
+ "@orpc/zod": "^1.10.0",
123
+ "@orpc/tanstack-query": "^1.10.0",
124
124
  "@trpc/tanstack-react-query": "^11.5.0",
125
125
  "@trpc/server": "^11.5.0",
126
126
  "@trpc/client": "^11.5.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.2.6",
3
+ "version": "3.2.8",
4
4
  "description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
2
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3
3
  "vcs": {
4
4
  "enabled": false,
5
5
  "clientKind": "git",
@@ -68,6 +68,12 @@ url = "https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp"
68
68
  url = "https://ui.nuxt.com/mcp"
69
69
  {{/if}}
70
70
 
71
+ {{#if (includes frontend "next")}}
72
+ [mcp_servers.next-devtools]
73
+ command = "npx"
74
+ args = ["-y", "next-devtools-mcp@latest"]
75
+ {{/if}}
76
+
71
77
  # --- Global .gitignore Configuration ---
72
78
  [gitignore]
73
79
  # Enable/disable automatic .gitignore updates (default: true)
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
2
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3
3
  "files": {
4
4
  "ignoreUnknown": false,
5
5
  "includes": [
@@ -1,5 +1,5 @@
1
1
  {{#if (eq orm "prisma")}}
2
- import { betterAuth } from "better-auth";
2
+ import { betterAuth, type BetterAuthOptions } from "better-auth";
3
3
  import { prismaAdapter } from "better-auth/adapters/prisma";
4
4
  {{#if (eq payments "polar")}}
5
5
  import { polar, checkout, portal } from "@polar-sh/better-auth";
@@ -7,12 +7,12 @@ import { polarClient } from "./lib/payments";
7
7
  {{/if}}
8
8
  import prisma from "@{{projectName}}/db";
9
9
 
10
- export const auth = betterAuth({
10
+ export const auth = betterAuth<BetterAuthOptions>({
11
11
  database: prismaAdapter(prisma, {
12
- {{#if (eq database "postgres")}}provider: "postgresql"{{/if}}
13
- {{#if (eq database "sqlite")}}provider: "sqlite"{{/if}}
14
- {{#if (eq database "mysql")}}provider: "mysql"{{/if}}
15
- {{#if (eq database "mongodb")}}provider: "mongodb"{{/if}}
12
+ {{#if (eq database "postgres")}}provider: "postgresql",{{/if}}
13
+ {{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
14
+ {{#if (eq database "mysql")}}provider: "mysql",{{/if}}
15
+ {{#if (eq database "mongodb")}}provider: "mongodb",{{/if}}
16
16
  }),
17
17
  trustedOrigins: [
18
18
  process.env.CORS_ORIGIN || "",
@@ -59,7 +59,7 @@ export const auth = betterAuth({
59
59
 
60
60
  {{#if (eq orm "drizzle")}}
61
61
  {{#if (or (eq runtime "bun") (eq runtime "node") (eq runtime "none"))}}
62
- import { betterAuth } from "better-auth";
62
+ import { betterAuth, type BetterAuthOptions } from "better-auth";
63
63
  import { drizzleAdapter } from "better-auth/adapters/drizzle";
64
64
  {{#if (eq payments "polar")}}
65
65
  import { polar, checkout, portal } from "@polar-sh/better-auth";
@@ -68,7 +68,7 @@ import { polarClient } from "./lib/payments";
68
68
  import { db } from "@{{projectName}}/db";
69
69
  import * as schema from "@{{projectName}}/db/schema/auth";
70
70
 
71
- export const auth = betterAuth({
71
+ export const auth = betterAuth<BetterAuthOptions>({
72
72
  database: drizzleAdapter(db, {
73
73
  {{#if (eq database "postgres")}}provider: "pg",{{/if}}
74
74
  {{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
@@ -119,7 +119,7 @@ export const auth = betterAuth({
119
119
  {{/if}}
120
120
 
121
121
  {{#if (eq runtime "workers")}}
122
- import { betterAuth } from "better-auth";
122
+ import { betterAuth, type BetterAuthOptions } from "better-auth";
123
123
  import { drizzleAdapter } from "better-auth/adapters/drizzle";
124
124
  {{#if (eq payments "polar")}}
125
125
  import { polar, checkout, portal } from "@polar-sh/better-auth";
@@ -129,7 +129,7 @@ import { db } from "@{{projectName}}/db";
129
129
  import * as schema from "@{{projectName}}/db/schema/auth";
130
130
  import { env } from "cloudflare:workers";
131
131
 
132
- export const auth = betterAuth({
132
+ export const auth = betterAuth<BetterAuthOptions>({
133
133
  database: drizzleAdapter(db, {
134
134
  {{#if (eq database "postgres")}}provider: "pg",{{/if}}
135
135
  {{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
@@ -190,11 +190,11 @@ export const auth = betterAuth({
190
190
  ],
191
191
  {{/if}}
192
192
  });
193
- {{/if}}
193
+ {{/if}}
194
194
  {{/if}}
195
195
 
196
196
  {{#if (eq orm "mongoose")}}
197
- import { betterAuth } from "better-auth";
197
+ import { betterAuth, type BetterAuthOptions } from "better-auth";
198
198
  import { mongodbAdapter } from "better-auth/adapters/mongodb";
199
199
  {{#if (eq payments "polar")}}
200
200
  import { polar, checkout, portal } from "@polar-sh/better-auth";
@@ -202,7 +202,7 @@ import { polarClient } from "./lib/payments";
202
202
  {{/if}}
203
203
  import { client } from "@{{projectName}}/db";
204
204
 
205
- export const auth = betterAuth({
205
+ export const auth = betterAuth<BetterAuthOptions>({
206
206
  database: mongodbAdapter(client),
207
207
  trustedOrigins: [
208
208
  process.env.CORS_ORIGIN || "",
@@ -248,13 +248,13 @@ export const auth = betterAuth({
248
248
  {{/if}}
249
249
 
250
250
  {{#if (eq orm "none")}}
251
- import { betterAuth } from "better-auth";
251
+ import { betterAuth, type BetterAuthOptions } from "better-auth";
252
252
  {{#if (eq payments "polar")}}
253
253
  import { polar, checkout, portal } from "@polar-sh/better-auth";
254
254
  import { polarClient } from "./lib/payments";
255
255
  {{/if}}
256
256
 
257
- export const auth = betterAuth({
257
+ export const auth = betterAuth<BetterAuthOptions>({
258
258
  database: "", // Invalid configuration
259
259
  trustedOrigins: [
260
260
  process.env.CORS_ORIGIN || "",
@@ -1,7 +1,6 @@
1
+ import type { auth } from "@{{projectName}}/auth";
1
2
  import { createAuthClient } from "better-auth/react";
2
- {{#if (eq payments "polar")}}
3
- import { polarClient } from "@polar-sh/better-auth";
4
- {{/if}}
3
+ import { inferAdditionalFields } from "better-auth/client/plugins";
5
4
 
6
5
  export const authClient = createAuthClient({
7
6
  {{#unless (eq backend "self")}}
@@ -12,7 +11,5 @@ export const authClient = createAuthClient({
12
11
  import.meta.env.VITE_SERVER_URL,
13
12
  {{/if}}
14
13
  {{/unless}}
15
- {{#if (eq payments "polar")}}
16
- plugins: [polarClient()]
17
- {{/if}}
14
+ plugins: [inferAdditionalFields<typeof auth>()],
18
15
  });
@@ -0,0 +1,8 @@
1
+ import { clerkMiddleware } from '@clerk/tanstack-react-start/server'
2
+ import { createStart } from '@tanstack/react-start'
3
+
4
+ export const startInstance = createStart(() => {
5
+ return {
6
+ requestMiddleware: [clerkMiddleware()],
7
+ }
8
+ })
@@ -5,6 +5,7 @@ node_modules
5
5
  out
6
6
  dist
7
7
  *.tgz
8
+ /prisma/generated
8
9
 
9
10
  # code coverage
10
11
  coverage
@@ -31,7 +31,7 @@ export default function AIPage() {
31
31
  const [input, setInput] = useState("");
32
32
  const { messages, sendMessage } = useChat({
33
33
  transport: new DefaultChatTransport({
34
- api: `${process.env.NEXT_PUBLIC_SERVER_URL}/ai`,
34
+ api: {{#if (eq backend "self")}}"/api/ai"{{else}}`${process.env.NEXT_PUBLIC_SERVER_URL}/ai`{{/if}},
35
35
  }),
36
36
  });
37
37
 
@@ -5,6 +5,7 @@ import type { NextConfig } from "next";
5
5
 
6
6
  const nextConfig: NextConfig = {
7
7
  typedRoutes: true,
8
+ reactCompiler: true,
8
9
  {{#if (includes examples "ai")}}
9
10
  transpilePackages: ["shiki"],
10
11
  {{/if}}
@@ -3,7 +3,7 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "next dev --turbopack --port=3001",
6
+ "dev": "next dev --port=3001",
7
7
  "build": "next build",
8
8
  "start": "next start"
9
9
  },
@@ -12,21 +12,22 @@
12
12
  "@tanstack/react-form": "^1.12.3",
13
13
  "class-variance-authority": "^0.7.1",
14
14
  "clsx": "^2.1.1",
15
- "lucide-react": "^0.487.0",
16
- "next": "15.5.4",
15
+ "lucide-react": "^0.546.0",
16
+ "next": "16.0.0",
17
17
  "next-themes": "^0.4.6",
18
- "react": "19.1.0",
19
- "react-dom": "19.1.0",
18
+ "react": "19.2.0",
19
+ "react-dom": "19.2.0",
20
20
  "sonner": "^2.0.5",
21
21
  "tailwind-merge": "^3.3.1",
22
22
  "tw-animate-css": "^1.3.4",
23
- "zod": "^4.0.2"
23
+ "zod": "^4.1.12",
24
+ "babel-plugin-react-compiler": "^1.0.0"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@tailwindcss/postcss": "^4.1.10",
27
28
  "@types/node": "^20",
28
- "@types/react": "~19.1.10",
29
- "@types/react-dom": "^19",
29
+ "@types/react": "19.2.2",
30
+ "@types/react-dom": "19.2.2",
30
31
  "tailwindcss": "^4.1.10",
31
32
  "typescript": "^5"
32
33
  }
@@ -28,15 +28,14 @@ import Loader from "@/components/loader";
28
28
 
29
29
  {{#if (and (eq backend "convex") (eq auth "clerk"))}}
30
30
  import { ClerkProvider, useAuth } from "@clerk/tanstack-react-start";
31
- import { getAuth } from "@clerk/tanstack-react-start/server";
31
+ import { auth } from "@clerk/tanstack-react-start/server";
32
32
  import { createServerFn } from "@tanstack/react-start";
33
- import { getRequest } from "@tanstack/react-start/server";
34
33
  import { ConvexProviderWithClerk } from "convex/react-clerk";
35
34
 
36
35
  const fetchClerkAuth = createServerFn({ method: "GET" }).handler(async () => {
37
- const auth = await getAuth(getRequest());
38
- const token = await auth.getToken({ template: "convex" });
39
- return { userId: auth.userId, token };
36
+ const clerkAuth = await auth();
37
+ const token = await clerkAuth.getToken({ template: "convex" });
38
+ return { userId: clerkAuth.userId, token };
40
39
  });
41
40
  {{else if (and (eq backend "convex") (eq auth "better-auth"))}}
42
41
  import { createServerFn } from "@tanstack/react-start";
@@ -1,19 +0,0 @@
1
- import { createClerkHandler } from "@clerk/tanstack-react-start/server";
2
- import {
3
- createStartHandler,
4
- defaultStreamHandler,
5
- defineHandlerCallback,
6
- } from "@tanstack/react-start/server";
7
- import { createRouter } from "./router";
8
-
9
- // this is broken right now, waiting for a fix
10
- const handlerFactory = createClerkHandler(
11
- createStartHandler({
12
- createRouter,
13
- }),
14
- );
15
-
16
- export default defineHandlerCallback(async (event) => {
17
- const startHandler = await handlerFactory(defaultStreamHandler);
18
- return startHandler(event);
19
- });