create-better-t-stack 2.50.0-canary.dd7000f2 → 2.50.1-canary.58bbe5f6

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.
Files changed (53) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/index.d.ts +6 -7
  3. package/dist/index.js +1 -1
  4. package/dist/{src-dv6H37db.js → src-CulfT5QB.js} +461 -358
  5. package/package.json +1 -1
  6. package/templates/addons/ruler/.ruler/bts.md.hbs +24 -14
  7. package/templates/api/orpc/fullstack/next/src/app/api/rpc/[[...rest]]/route.ts.hbs +50 -0
  8. package/templates/api/orpc/server/package.json.hbs +1 -3
  9. package/templates/api/orpc/server/tsconfig.json.hbs +8 -8
  10. package/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbs +1 -1
  11. package/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbs +4 -2
  12. package/templates/api/orpc/web/solid/src/utils/orpc.ts.hbs +1 -1
  13. package/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbs +1 -1
  14. package/templates/api/trpc/fullstack/next/src/app/api/trpc/[trpc]/route.ts.hbs +14 -0
  15. package/templates/api/trpc/server/package.json.hbs +1 -3
  16. package/templates/api/trpc/server/tsconfig.json.hbs +8 -11
  17. package/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbs +6 -4
  18. package/templates/auth/better-auth/fullstack/next/src/app/api/auth/[...all]/route.ts.hbs +4 -0
  19. package/templates/auth/better-auth/server/base/package.json.hbs +1 -4
  20. package/templates/auth/better-auth/server/base/src/index.ts.hbs +5 -5
  21. package/templates/auth/better-auth/server/base/tsconfig.json.hbs +8 -11
  22. package/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs +2 -0
  23. package/templates/auth/better-auth/web/react/next/src/app/dashboard/page.tsx.hbs +31 -0
  24. package/templates/backend/server/base/package.json.hbs +1 -4
  25. package/templates/backend/server/base/tsconfig.json.hbs +1 -15
  26. package/templates/backend/server/base/tsdown.config.ts.hbs +1 -6
  27. package/templates/base/tsconfig.base.json.hbs +34 -0
  28. package/templates/base/tsconfig.json.hbs +3 -0
  29. package/templates/db/base/package.json.hbs +1 -3
  30. package/templates/db/base/tsconfig.json.hbs +8 -11
  31. package/templates/db/drizzle/mysql/drizzle.config.ts.hbs +5 -1
  32. package/templates/db/drizzle/postgres/drizzle.config.ts.hbs +5 -1
  33. package/templates/db/drizzle/sqlite/drizzle.config.ts.hbs +5 -1
  34. package/templates/db/prisma/mongodb/prisma.config.ts.hbs +5 -1
  35. package/templates/db/prisma/mysql/prisma.config.ts.hbs +5 -1
  36. package/templates/db/prisma/postgres/prisma.config.ts.hbs +5 -1
  37. package/templates/db/prisma/sqlite/prisma.config.ts.hbs +5 -1
  38. package/templates/deploy/alchemy/alchemy.run.ts.hbs +3 -3
  39. package/templates/examples/ai/fullstack/next/src/app/api/ai/route.ts.hbs +15 -0
  40. package/templates/examples/todo/server/drizzle/base/src/routers/todo.ts.hbs +2 -2
  41. package/templates/frontend/native/nativewind/tsconfig.json.hbs +1 -6
  42. package/templates/frontend/native/unistyles/tsconfig.json.hbs +1 -6
  43. package/templates/frontend/nuxt/tsconfig.json.hbs +0 -4
  44. package/templates/frontend/react/next/package.json.hbs +1 -1
  45. package/templates/frontend/react/next/tsconfig.json.hbs +0 -7
  46. package/templates/frontend/react/react-router/tsconfig.json.hbs +1 -6
  47. package/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs +1 -1
  48. package/templates/frontend/react/tanstack-router/tsconfig.json.hbs +1 -6
  49. package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +1 -1
  50. package/templates/frontend/react/tanstack-start/tsconfig.json.hbs +1 -6
  51. package/templates/frontend/solid/tsconfig.json.hbs +1 -6
  52. package/templates/frontend/svelte/tsconfig.json.hbs +1 -6
  53. package/templates/base/tsconfig.base.json +0 -23
@@ -3,7 +3,11 @@ import type { PrismaConfig } from "prisma";
3
3
  import dotenv from "dotenv";
4
4
 
5
5
  dotenv.config({
6
- path: "../../apps/server/.env",
6
+ {{#if (eq backend "self")}}
7
+ path: "../../apps/web/.env",
8
+ {{else}}
9
+ path: "../../apps/server/.env",
10
+ {{/if}}
7
11
  });
8
12
 
9
13
  export default {
@@ -4,7 +4,11 @@ import type { PrismaConfig } from "prisma";
4
4
  import dotenv from "dotenv";
5
5
 
6
6
  dotenv.config({
7
- path: "../../apps/server/.env",
7
+ {{#if (eq backend "self")}}
8
+ path: "../../apps/web/.env",
9
+ {{else}}
10
+ path: "../../apps/server/.env",
11
+ {{/if}}
8
12
  });
9
13
  {{/unless}}
10
14
 
@@ -3,7 +3,11 @@ import type { PrismaConfig } from "prisma";
3
3
  import dotenv from "dotenv";
4
4
 
5
5
  dotenv.config({
6
- path: "../../apps/server/.env",
6
+ {{#if (eq backend "self")}}
7
+ path: "../../apps/web/.env",
8
+ {{else}}
9
+ path: "../../apps/server/.env",
10
+ {{/if}}
7
11
  });
8
12
 
9
13
  export default {
@@ -39,15 +39,15 @@ const app = await alchemy("{{projectName}}");
39
39
 
40
40
  {{#if (and (eq serverDeploy "alchemy") (eq dbSetup "d1"))}}
41
41
  await Exec("db-generate", {
42
- {{#if (and (eq webDeploy "alchemy") (eq serverDeploy "alchemy"))}}cwd: "apps/server",{{/if}}
42
+ {{#if (and (eq webDeploy "alchemy") (eq serverDeploy "alchemy"))}}cwd: "packages/db",{{/if}}
43
43
  command: "{{packageManager}} run db:generate",
44
44
  });
45
45
 
46
46
  const db = await D1Database("database", {
47
47
  {{#if (eq orm "prisma")}}
48
- migrationsDir: "apps/server/prisma/migrations",
48
+ migrationsDir: "packages/db/prisma/migrations",
49
49
  {{else if (eq orm "drizzle")}}
50
- migrationsDir: "apps/server/src/db/migrations",
50
+ migrationsDir: "packages/db/src/migrations",
51
51
  {{/if}}
52
52
  });
53
53
  {{/if}}
@@ -0,0 +1,15 @@
1
+ import { google } from "@ai-sdk/google";
2
+ import { streamText, type UIMessage, convertToModelMessages } from "ai";
3
+
4
+ export const maxDuration = 30;
5
+
6
+ export async function POST(req: Request) {
7
+ const { messages }: { messages: UIMessage[] } = await req.json();
8
+
9
+ const result = streamText({
10
+ model: google("gemini-2.5-flash"),
11
+ messages: convertToModelMessages(messages),
12
+ });
13
+
14
+ return result.toUIMessageStreamResponse();
15
+ }
@@ -1,5 +1,5 @@
1
1
  {{#if (eq api "orpc")}}
2
- import { eq } from "@{{projectName}}/db";
2
+ import { eq } from "drizzle-orm";
3
3
  import z from "zod";
4
4
  import { db } from "@{{projectName}}/db";
5
5
  import { todo } from "@{{projectName}}/db/schema/todo";
@@ -40,7 +40,7 @@ export const todoRouter = {
40
40
  {{#if (eq api "trpc")}}
41
41
  import z from "zod";
42
42
  import { router, publicProcedure } from "../index";
43
- import { todo } from "../db/schema/todo";
43
+ import { todo } from "@{{projectName}}/db/schema/todo";
44
44
  import { eq } from "drizzle-orm";
45
45
  import { db } from "@{{projectName}}/db";
46
46
 
@@ -14,10 +14,5 @@
14
14
  ".expo/types/**/*.ts",
15
15
  "expo-env.d.ts",
16
16
  "nativewind-env.d.ts"
17
- ],
18
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
19
- "references": [{
20
- "path": "../server"
21
- }]
22
- {{/unless}}
17
+ ]
23
18
  }
@@ -8,10 +8,5 @@
8
8
  "@/*": ["*"]
9
9
  }
10
10
  },
11
- "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"],
12
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
13
- "references": [{
14
- "path": "../server"
15
- }]
16
- {{/unless}}
11
+ "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
17
12
  }
@@ -13,10 +13,6 @@
13
13
  },
14
14
  {
15
15
  "path": "./.nuxt/tsconfig.node.json"
16
- }{{#unless (or (eq backend "convex") (eq backend "none"))}},
17
- {
18
- "path": "../server"
19
16
  }
20
- {{/unless}}
21
17
  ]
22
18
  }
@@ -13,7 +13,7 @@
13
13
  "class-variance-authority": "^0.7.1",
14
14
  "clsx": "^2.1.1",
15
15
  "lucide-react": "^0.487.0",
16
- "next": "15.5.0",
16
+ "next": "15.5.4",
17
17
  "next-themes": "^0.4.6",
18
18
  "react": "19.1.0",
19
19
  "react-dom": "19.1.0",
@@ -40,12 +40,5 @@
40
40
  ],
41
41
  "exclude": [
42
42
  "./node_modules"
43
- ],
44
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
45
- "references": [
46
- {
47
- "path": "../server"
48
- }
49
43
  ]
50
- {{/unless}}
51
44
  }
@@ -23,10 +23,5 @@
23
23
  "resolveJsonModule": true,
24
24
  "skipLibCheck": true,
25
25
  "strict": true
26
- },
27
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
28
- "references": [{
29
- "path": "../server"
30
- }]
31
- {{/unless}}
26
+ }
32
27
  }
@@ -8,7 +8,7 @@ import type { QueryClient } from "@tanstack/react-query";
8
8
  import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
9
9
  import { useState } from "react";
10
10
  import { createTanstackQueryUtils } from "@orpc/tanstack-query";
11
- import type { AppRouterClient } from "@{{projectName}}/api/src/routers/index";
11
+ import type { AppRouterClient } from "@{{projectName}}/api/routers/index";
12
12
  import { createORPCClient } from "@orpc/client";
13
13
  {{/if}}
14
14
  {{#if (eq api "trpc")}}
@@ -14,10 +14,5 @@
14
14
  "paths": {
15
15
  "@/*": ["./src/*"]
16
16
  }
17
- },
18
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
19
- "references": [{
20
- "path": "../server"
21
- }]
22
- {{/unless}}
17
+ }
23
18
  }
@@ -66,7 +66,7 @@ export interface RouterAppContext {
66
66
  {{else}}
67
67
  {{#if (eq api "trpc")}}
68
68
  import type { TRPCOptionsProxy } from "@trpc/tanstack-react-query";
69
- import type { AppRouter } from "@{{projectName}}/api/src/routers/index";
69
+ import type { AppRouter } from "@{{projectName}}/api/routers/index";
70
70
  export interface RouterAppContext {
71
71
  trpc: TRPCOptionsProxy<AppRouter>;
72
72
  queryClient: QueryClient;
@@ -24,10 +24,5 @@
24
24
  "paths": {
25
25
  "@/*": ["./src/*"]
26
26
  }
27
- },
28
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
29
- "references": [{
30
- "path": "../server"
31
- }]
32
- {{/unless}}
27
+ }
33
28
  }
@@ -25,10 +25,5 @@
25
25
  "paths": {
26
26
  "@/*": ["./src/*"]
27
27
  }
28
- },
29
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
30
- "references": [{
31
- "path": "../server"
32
- }]
33
- {{/unless}}
28
+ }
34
29
  }
@@ -10,12 +10,7 @@
10
10
  "sourceMap": true,
11
11
  "strict": true,
12
12
  "moduleResolution": "bundler"
13
- },
14
- {{#unless (or (eq backend "convex") (eq backend "none"))}}
15
- "references": [{
16
- "path": "../server"
17
- }]
18
- {{/unless}}
13
+ }
19
14
  // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
20
15
  // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
21
16
  //
@@ -1,23 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- "target": "ESNext",
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "lib": [
8
- "ESNext"
9
- ],
10
- "verbatimModuleSyntax": true,
11
- "strict": true,
12
- "skipLibCheck": true,
13
- "resolveJsonModule": true,
14
- "allowSyntheticDefaultImports": true,
15
- "esModuleInterop": true,
16
- "forceConsistentCasingInFileNames": true,
17
- "isolatedModules": true,
18
- "noUncheckedIndexedAccess": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "noFallthroughCasesInSwitch": true
22
- }
23
- }