create-better-t-stack 3.8.3-pr730.1784e47 → 3.9.0-pr730.0ee9844

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 (60) hide show
  1. package/README.md +17 -16
  2. package/dist/cli.mjs +1 -1
  3. package/dist/index.mjs +1 -1
  4. package/dist/{src-GZpht_dQ.mjs → src-DW15ZRe9.mjs} +70 -89
  5. package/package.json +39 -40
  6. package/templates/auth/better-auth/convex/backend/convex/auth.ts.hbs +21 -19
  7. package/templates/auth/better-auth/convex/backend/convex/http.ts.hbs +6 -2
  8. package/templates/auth/better-auth/convex/native/base/lib/auth-client.ts.hbs +11 -6
  9. package/templates/auth/better-auth/convex/web/react/next/src/app/api/auth/[...all]/route.ts.hbs +2 -2
  10. package/templates/auth/better-auth/convex/web/react/next/src/components/user-menu.tsx.hbs +23 -20
  11. package/templates/auth/better-auth/convex/web/react/next/src/lib/auth-server.ts.hbs +13 -5
  12. package/templates/auth/better-auth/convex/web/react/tanstack-router/src/components/user-menu.tsx.hbs +25 -22
  13. package/templates/auth/better-auth/convex/web/react/tanstack-start/src/components/user-menu.tsx.hbs +23 -24
  14. package/templates/auth/better-auth/convex/web/react/tanstack-start/src/routes/api/auth/$.ts.hbs +4 -4
  15. package/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs +0 -1
  16. package/templates/auth/better-auth/web/react/next/src/components/user-menu.tsx.hbs +24 -21
  17. package/templates/auth/better-auth/web/react/react-router/src/components/user-menu.tsx.hbs +24 -21
  18. package/templates/auth/better-auth/web/react/{tanstack-start/src/components/user-menu.tsx → tanstack-router/src/components/user-menu.tsx.hbs} +26 -23
  19. package/templates/auth/better-auth/web/react/{tanstack-router/src/components/user-menu.tsx → tanstack-start/src/components/user-menu.tsx.hbs} +26 -23
  20. package/templates/frontend/react/next/package.json.hbs +8 -7
  21. package/templates/frontend/react/next/src/app/layout.tsx.hbs +28 -1
  22. package/templates/frontend/react/next/src/components/providers.tsx.hbs +14 -4
  23. package/templates/frontend/react/react-router/package.json.hbs +2 -1
  24. package/templates/frontend/react/{tanstack-router/src/components/mode-toggle.tsx → react-router/src/components/mode-toggle.tsx.hbs} +1 -1
  25. package/templates/frontend/react/tanstack-router/package.json.hbs +2 -1
  26. package/templates/frontend/react/{react-router/src/components/mode-toggle.tsx → tanstack-router/src/components/mode-toggle.tsx.hbs} +1 -1
  27. package/templates/frontend/react/tanstack-start/package.json.hbs +2 -1
  28. package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +6 -0
  29. package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +13 -14
  30. package/templates/frontend/react/tanstack-start/vite.config.ts.hbs +5 -0
  31. package/templates/frontend/react/web-base/components.json +5 -2
  32. package/templates/frontend/react/web-base/src/components/ui/button.tsx.hbs +57 -0
  33. package/templates/frontend/react/web-base/src/components/ui/card.tsx.hbs +103 -0
  34. package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx.hbs +26 -0
  35. package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx.hbs +262 -0
  36. package/templates/frontend/react/web-base/src/components/ui/input.tsx.hbs +20 -0
  37. package/templates/frontend/react/web-base/src/components/ui/label.tsx.hbs +20 -0
  38. package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx.hbs +13 -0
  39. package/templates/frontend/react/web-base/src/components/ui/sonner.tsx.hbs +44 -0
  40. package/templates/frontend/react/web-base/src/index.css.hbs +57 -63
  41. package/templates/frontend/react/web-base/src/components/ui/button.tsx +0 -56
  42. package/templates/frontend/react/web-base/src/components/ui/card.tsx +0 -75
  43. package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +0 -27
  44. package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +0 -228
  45. package/templates/frontend/react/web-base/src/components/ui/input.tsx +0 -21
  46. package/templates/frontend/react/web-base/src/components/ui/label.tsx +0 -19
  47. package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +0 -13
  48. package/templates/frontend/react/web-base/src/components/ui/sonner.tsx +0 -25
  49. /package/templates/auth/better-auth/web/react/tanstack-router/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
  50. /package/templates/auth/better-auth/web/react/tanstack-router/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
  51. /package/templates/auth/better-auth/web/react/tanstack-router/src/routes/{login.tsx → login.tsx.hbs} +0 -0
  52. /package/templates/auth/better-auth/web/react/tanstack-start/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
  53. /package/templates/auth/better-auth/web/react/tanstack-start/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
  54. /package/templates/auth/better-auth/web/react/tanstack-start/src/routes/{login.tsx → login.tsx.hbs} +0 -0
  55. /package/templates/auth/better-auth/web/solid/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
  56. /package/templates/auth/better-auth/web/solid/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
  57. /package/templates/auth/better-auth/web/solid/src/routes/{login.tsx → login.tsx.hbs} +0 -0
  58. /package/templates/frontend/react/react-router/src/components/{theme-provider.tsx → theme-provider.tsx.hbs} +0 -0
  59. /package/templates/frontend/react/tanstack-router/src/components/{theme-provider.tsx → theme-provider.tsx.hbs} +0 -0
  60. /package/templates/frontend/react/web-base/src/lib/{utils.ts → utils.ts.hbs} +0 -0
@@ -1,3 +1,3 @@
1
- import { nextJsHandler } from "@convex-dev/better-auth/nextjs";
1
+ import { handler } from "@/lib/auth-server";
2
2
 
3
- export const { GET, POST } = nextJsHandler();
3
+ export const { GET, POST } = handler;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  DropdownMenu,
3
3
  DropdownMenuContent,
4
+ DropdownMenuGroup,
4
5
  DropdownMenuItem,
5
6
  DropdownMenuLabel,
6
7
  DropdownMenuSeparator,
@@ -18,30 +19,32 @@ export default function UserMenu() {
18
19
 
19
20
  return (
20
21
  <DropdownMenu>
21
- <DropdownMenuTrigger asChild>
22
+ <DropdownMenuTrigger>
22
23
  <Button variant="outline">{user?.name}</Button>
23
24
  </DropdownMenuTrigger>
24
25
  <DropdownMenuContent className="bg-card">
25
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
26
- <DropdownMenuSeparator />
27
- <DropdownMenuItem>{user?.email}</DropdownMenuItem>
28
- <DropdownMenuItem asChild>
29
- <Button
30
- variant="destructive"
31
- className="w-full"
32
- onClick={() => {
33
- authClient.signOut({
34
- fetchOptions: {
35
- onSuccess: () => {
36
- router.push("/dashboard");
26
+ <DropdownMenuGroup>
27
+ <DropdownMenuLabel>My Account</DropdownMenuLabel>
28
+ <DropdownMenuSeparator />
29
+ <DropdownMenuItem>{user?.email}</DropdownMenuItem>
30
+ <DropdownMenuItem>
31
+ <Button
32
+ variant="destructive"
33
+ className="w-full"
34
+ onClick={() => {
35
+ authClient.signOut({
36
+ fetchOptions: {
37
+ onSuccess: () => {
38
+ router.push("/dashboard");
39
+ },
37
40
  },
38
- },
39
- });
40
- }}
41
- >
42
- Sign Out
43
- </Button>
44
- </DropdownMenuItem>
41
+ });
42
+ }}
43
+ >
44
+ Sign Out
45
+ </Button>
46
+ </DropdownMenuItem>
47
+ </DropdownMenuGroup>
45
48
  </DropdownMenuContent>
46
49
  </DropdownMenu>
47
50
  );
@@ -1,6 +1,14 @@
1
- import { createAuth } from "@{{projectName}}/backend/convex/auth";
2
- import { getToken as getTokenNextjs } from "@convex-dev/better-auth/nextjs";
1
+ import { convexBetterAuthNextJs } from "@convex-dev/better-auth/nextjs";
3
2
 
4
- export const getToken = () => {
5
- return getTokenNextjs(createAuth);
6
- };
3
+ export const {
4
+ handler,
5
+ preloadAuthQuery,
6
+ isAuthenticated,
7
+ getToken,
8
+ fetchAuthQuery,
9
+ fetchAuthMutation,
10
+ fetchAuthAction,
11
+ } = convexBetterAuthNextJs({
12
+ convexUrl: process.env.NEXT_PUBLIC_CONVEX_URL!,
13
+ convexSiteUrl: process.env.NEXT_PUBLIC_CONVEX_SITE_URL!,
14
+ });
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  DropdownMenu,
3
3
  DropdownMenuContent,
4
+ DropdownMenuGroup,
4
5
  DropdownMenuItem,
5
6
  DropdownMenuLabel,
6
7
  DropdownMenuSeparator,
@@ -18,32 +19,34 @@ export default function UserMenu() {
18
19
 
19
20
  return (
20
21
  <DropdownMenu>
21
- <DropdownMenuTrigger asChild>
22
+ <DropdownMenuTrigger>
22
23
  <Button variant="outline">{user?.name}</Button>
23
24
  </DropdownMenuTrigger>
24
25
  <DropdownMenuContent className="bg-card">
25
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
26
- <DropdownMenuSeparator />
27
- <DropdownMenuItem>{user?.email}</DropdownMenuItem>
28
- <DropdownMenuItem asChild>
29
- <Button
30
- variant="destructive"
31
- className="w-full"
32
- onClick={() => {
33
- authClient.signOut({
34
- fetchOptions: {
35
- onSuccess: () => {
36
- navigate({
37
- to: "/dashboard",
38
- });
26
+ <DropdownMenuGroup>
27
+ <DropdownMenuLabel>My Account</DropdownMenuLabel>
28
+ <DropdownMenuSeparator />
29
+ <DropdownMenuItem>{user?.email}</DropdownMenuItem>
30
+ <DropdownMenuItem>
31
+ <Button
32
+ variant="destructive"
33
+ className="w-full"
34
+ onClick={() => {
35
+ authClient.signOut({
36
+ fetchOptions: {
37
+ onSuccess: () => {
38
+ navigate({
39
+ to: "/dashboard",
40
+ });
41
+ },
39
42
  },
40
- },
41
- });
42
- }}
43
- >
44
- Sign Out
45
- </Button>
46
- </DropdownMenuItem>
43
+ });
44
+ }}
45
+ >
46
+ Sign Out
47
+ </Button>
48
+ </DropdownMenuItem>
49
+ </DropdownMenuGroup>
47
50
  </DropdownMenuContent>
48
51
  </DropdownMenu>
49
52
  );
@@ -1,49 +1,48 @@
1
1
  import {
2
2
  DropdownMenu,
3
3
  DropdownMenuContent,
4
+ DropdownMenuGroup,
4
5
  DropdownMenuItem,
5
6
  DropdownMenuLabel,
6
7
  DropdownMenuSeparator,
7
8
  DropdownMenuTrigger,
8
9
  } from "@/components/ui/dropdown-menu";
9
10
  import { authClient } from "@/lib/auth-client";
10
- import { useNavigate } from "@tanstack/react-router";
11
11
  import { Button } from "./ui/button";
12
12
  import { useQuery } from "convex/react";
13
13
  import { api } from "@{{projectName}}/backend/convex/_generated/api";
14
14
 
15
15
  export default function UserMenu() {
16
- const navigate = useNavigate();
17
16
  const user = useQuery(api.auth.getCurrentUser)
18
17
 
19
18
  return (
20
19
  <DropdownMenu>
21
- <DropdownMenuTrigger asChild>
20
+ <DropdownMenuTrigger>
22
21
  <Button variant="outline">{user?.name}</Button>
23
22
  </DropdownMenuTrigger>
24
23
  <DropdownMenuContent className="bg-card">
25
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
26
- <DropdownMenuSeparator />
27
- <DropdownMenuItem>{user?.email}</DropdownMenuItem>
28
- <DropdownMenuItem asChild>
29
- <Button
30
- variant="destructive"
31
- className="w-full"
32
- onClick={() => {
33
- authClient.signOut({
34
- fetchOptions: {
35
- onSuccess: () => {
36
- navigate({
37
- to: "/dashboard",
38
- });
24
+ <DropdownMenuGroup>
25
+ <DropdownMenuLabel>My Account</DropdownMenuLabel>
26
+ <DropdownMenuSeparator />
27
+ <DropdownMenuItem>{user?.email}</DropdownMenuItem>
28
+ <DropdownMenuItem>
29
+ <Button
30
+ variant="destructive"
31
+ className="w-full"
32
+ onClick={() => {
33
+ authClient.signOut({
34
+ fetchOptions: {
35
+ onSuccess: () => {
36
+ location.reload();
37
+ },
39
38
  },
40
- },
41
- });
42
- }}
43
- >
44
- Sign Out
45
- </Button>
46
- </DropdownMenuItem>
39
+ });
40
+ }}
41
+ >
42
+ Sign Out
43
+ </Button>
44
+ </DropdownMenuItem>
45
+ </DropdownMenuGroup>
47
46
  </DropdownMenuContent>
48
47
  </DropdownMenu>
49
48
  );
@@ -1,11 +1,11 @@
1
- import { reactStartHandler } from "@convex-dev/better-auth/react-start";
2
1
  import { createFileRoute } from "@tanstack/react-router";
2
+ import { handler } from "@/lib/auth-server";
3
3
 
4
4
  export const Route = createFileRoute("/api/auth/$")({
5
5
  server: {
6
6
  handlers: {
7
- GET: ({ request }) => reactStartHandler(request),
8
- POST: ({ request }) => reactStartHandler(request),
7
+ GET: ({ request }) => handler(request),
8
+ POST: ({ request }) => handler(request),
9
9
  },
10
10
  },
11
- });
11
+ });
@@ -1,4 +1,3 @@
1
- import type { auth } from "@{{projectName}}/auth";
2
1
  import { createAuthClient } from "better-auth/react";
3
2
  {{#if (eq payments "polar")}}
4
3
  import { polarClient } from "@polar-sh/better-auth";
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  DropdownMenu,
3
3
  DropdownMenuContent,
4
+ DropdownMenuGroup,
4
5
  DropdownMenuItem,
5
6
  DropdownMenuLabel,
6
7
  DropdownMenuSeparator,
@@ -22,7 +23,7 @@ export default function UserMenu() {
22
23
 
23
24
  if (!session) {
24
25
  return (
25
- <Button variant="outline" asChild>
26
+ <Button variant="outline">
26
27
  <Link href="/login">Sign In</Link>
27
28
  </Button>
28
29
  );
@@ -30,30 +31,32 @@ export default function UserMenu() {
30
31
 
31
32
  return (
32
33
  <DropdownMenu>
33
- <DropdownMenuTrigger asChild>
34
+ <DropdownMenuTrigger>
34
35
  <Button variant="outline">{session.user.name}</Button>
35
36
  </DropdownMenuTrigger>
36
37
  <DropdownMenuContent className="bg-card">
37
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
38
- <DropdownMenuSeparator />
39
- <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
40
- <DropdownMenuItem asChild>
41
- <Button
42
- variant="destructive"
43
- className="w-full"
44
- onClick={() => {
45
- authClient.signOut({
46
- fetchOptions: {
47
- onSuccess: () => {
48
- router.push("/");
38
+ <DropdownMenuGroup>
39
+ <DropdownMenuLabel>My Account</DropdownMenuLabel>
40
+ <DropdownMenuSeparator />
41
+ <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
42
+ <DropdownMenuItem>
43
+ <Button
44
+ variant="destructive"
45
+ className="w-full"
46
+ onClick={() => {
47
+ authClient.signOut({
48
+ fetchOptions: {
49
+ onSuccess: () => {
50
+ router.push("/");
51
+ },
49
52
  },
50
- },
51
- });
52
- }}
53
- >
54
- Sign Out
55
- </Button>
56
- </DropdownMenuItem>
53
+ });
54
+ }}
55
+ >
56
+ Sign Out
57
+ </Button>
58
+ </DropdownMenuItem>
59
+ </DropdownMenuGroup>
57
60
  </DropdownMenuContent>
58
61
  </DropdownMenu>
59
62
  );
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  DropdownMenu,
3
3
  DropdownMenuContent,
4
+ DropdownMenuGroup,
4
5
  DropdownMenuItem,
5
6
  DropdownMenuLabel,
6
7
  DropdownMenuSeparator,
@@ -22,7 +23,7 @@ export default function UserMenu() {
22
23
 
23
24
  if (!session) {
24
25
  return (
25
- <Button variant="outline" asChild>
26
+ <Button variant="outline">
26
27
  <Link to="/login">Sign In</Link>
27
28
  </Button>
28
29
  );
@@ -30,30 +31,32 @@ export default function UserMenu() {
30
31
 
31
32
  return (
32
33
  <DropdownMenu>
33
- <DropdownMenuTrigger asChild>
34
+ <DropdownMenuTrigger>
34
35
  <Button variant="outline">{session.user.name}</Button>
35
36
  </DropdownMenuTrigger>
36
37
  <DropdownMenuContent className="bg-card">
37
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
38
- <DropdownMenuSeparator />
39
- <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
40
- <DropdownMenuItem asChild>
41
- <Button
42
- variant="destructive"
43
- className="w-full"
44
- onClick={() => {
45
- authClient.signOut({
46
- fetchOptions: {
47
- onSuccess: () => {
48
- navigate("/");
38
+ <DropdownMenuGroup>
39
+ <DropdownMenuLabel>My Account</DropdownMenuLabel>
40
+ <DropdownMenuSeparator />
41
+ <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
42
+ <DropdownMenuItem>
43
+ <Button
44
+ variant="destructive"
45
+ className="w-full"
46
+ onClick={() => {
47
+ authClient.signOut({
48
+ fetchOptions: {
49
+ onSuccess: () => {
50
+ navigate("/");
51
+ },
49
52
  },
50
- },
51
- });
52
- }}
53
- >
54
- Sign Out
55
- </Button>
56
- </DropdownMenuItem>
53
+ });
54
+ }}
55
+ >
56
+ Sign Out
57
+ </Button>
58
+ </DropdownMenuItem>
59
+ </DropdownMenuGroup>
57
60
  </DropdownMenuContent>
58
61
  </DropdownMenu>
59
62
  );
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  DropdownMenu,
3
3
  DropdownMenuContent,
4
+ DropdownMenuGroup,
4
5
  DropdownMenuItem,
5
6
  DropdownMenuLabel,
6
7
  DropdownMenuSeparator,
@@ -22,7 +23,7 @@ export default function UserMenu() {
22
23
 
23
24
  if (!session) {
24
25
  return (
25
- <Button variant="outline" asChild>
26
+ <Button variant="outline">
26
27
  <Link to="/login">Sign In</Link>
27
28
  </Button>
28
29
  );
@@ -30,32 +31,34 @@ export default function UserMenu() {
30
31
 
31
32
  return (
32
33
  <DropdownMenu>
33
- <DropdownMenuTrigger asChild>
34
+ <DropdownMenuTrigger>
34
35
  <Button variant="outline">{session.user.name}</Button>
35
36
  </DropdownMenuTrigger>
36
37
  <DropdownMenuContent className="bg-card">
37
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
38
- <DropdownMenuSeparator />
39
- <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
40
- <DropdownMenuItem asChild>
41
- <Button
42
- variant="destructive"
43
- className="w-full"
44
- onClick={() => {
45
- authClient.signOut({
46
- fetchOptions: {
47
- onSuccess: () => {
48
- navigate({
49
- to: "/",
50
- });
38
+ <DropdownMenuGroup>
39
+ <DropdownMenuLabel>My Account</DropdownMenuLabel>
40
+ <DropdownMenuSeparator />
41
+ <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
42
+ <DropdownMenuItem>
43
+ <Button
44
+ variant="destructive"
45
+ className="w-full"
46
+ onClick={() => {
47
+ authClient.signOut({
48
+ fetchOptions: {
49
+ onSuccess: () => {
50
+ navigate({
51
+ to: "/",
52
+ });
53
+ },
51
54
  },
52
- },
53
- });
54
- }}
55
- >
56
- Sign Out
57
- </Button>
58
- </DropdownMenuItem>
55
+ });
56
+ }}
57
+ >
58
+ Sign Out
59
+ </Button>
60
+ </DropdownMenuItem>
61
+ </DropdownMenuGroup>
59
62
  </DropdownMenuContent>
60
63
  </DropdownMenu>
61
64
  );
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  DropdownMenu,
3
3
  DropdownMenuContent,
4
+ DropdownMenuGroup,
4
5
  DropdownMenuItem,
5
6
  DropdownMenuLabel,
6
7
  DropdownMenuSeparator,
@@ -22,7 +23,7 @@ export default function UserMenu() {
22
23
 
23
24
  if (!session) {
24
25
  return (
25
- <Button variant="outline" asChild>
26
+ <Button variant="outline">
26
27
  <Link to="/login">Sign In</Link>
27
28
  </Button>
28
29
  );
@@ -30,32 +31,34 @@ export default function UserMenu() {
30
31
 
31
32
  return (
32
33
  <DropdownMenu>
33
- <DropdownMenuTrigger asChild>
34
+ <DropdownMenuTrigger>
34
35
  <Button variant="outline">{session.user.name}</Button>
35
36
  </DropdownMenuTrigger>
36
37
  <DropdownMenuContent className="bg-card">
37
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
38
- <DropdownMenuSeparator />
39
- <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
40
- <DropdownMenuItem asChild>
41
- <Button
42
- variant="destructive"
43
- className="w-full"
44
- onClick={() => {
45
- authClient.signOut({
46
- fetchOptions: {
47
- onSuccess: () => {
48
- navigate({
49
- to: "/",
50
- });
38
+ <DropdownMenuGroup>
39
+ <DropdownMenuLabel>My Account</DropdownMenuLabel>
40
+ <DropdownMenuSeparator />
41
+ <DropdownMenuItem>{session.user.email}</DropdownMenuItem>
42
+ <DropdownMenuItem>
43
+ <Button
44
+ variant="destructive"
45
+ className="w-full"
46
+ onClick={() => {
47
+ authClient.signOut({
48
+ fetchOptions: {
49
+ onSuccess: () => {
50
+ navigate({
51
+ to: "/",
52
+ });
53
+ },
51
54
  },
52
- },
53
- });
54
- }}
55
- >
56
- Sign Out
57
- </Button>
58
- </DropdownMenuItem>
55
+ });
56
+ }}
57
+ >
58
+ Sign Out
59
+ </Button>
60
+ </DropdownMenuItem>
61
+ </DropdownMenuGroup>
59
62
  </DropdownMenuContent>
60
63
  </DropdownMenu>
61
64
  );
@@ -3,20 +3,21 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "next dev",
6
+ "dev": "next dev --port 3001",
7
7
  "build": "next build",
8
8
  "start": "next start"
9
9
  },
10
10
  "dependencies": {
11
- "radix-ui": "^1.4.2",
11
+ "@base-ui/react": "^1.0.0",
12
+ "shadcn": "^3.6.2",
12
13
  "@tanstack/react-form": "^1.27.3",
13
14
  "class-variance-authority": "^0.7.1",
14
15
  "clsx": "^2.1.1",
15
16
  "lucide-react": "^0.546.0",
16
- "next": "^16.0.10",
17
+ "next": "^16.1.0",
17
18
  "next-themes": "^0.4.6",
18
- "react": "19.2.3",
19
- "react-dom": "19.2.3",
19
+ "react": "^19.2.3",
20
+ "react-dom": "^19.2.3",
20
21
  "sonner": "^2.0.5",
21
22
  "tailwind-merge": "^3.3.1",
22
23
  "tw-animate-css": "^1.3.4",
@@ -25,8 +26,8 @@
25
26
  "devDependencies": {
26
27
  "@tailwindcss/postcss": "^4.1.10",
27
28
  "@types/node": "^20",
28
- "@types/react": "19.2.7",
29
- "@types/react-dom": "19.2.3",
29
+ "@types/react": "^19.2.7",
30
+ "@types/react-dom": "^19.2.3",
30
31
  "tailwindcss": "^4.1.10",
31
32
  "typescript": "^5"
32
33
  }
@@ -2,7 +2,10 @@ import type { Metadata } from "next";
2
2
  import { Geist, Geist_Mono } from "next/font/google";
3
3
  import "../index.css";
4
4
  {{#if (eq auth "clerk")}}{{#if (eq backend "convex")}}import { ClerkProvider } from "@clerk/nextjs";
5
- {{/if}}{{/if}}import Providers from "@/components/providers";
5
+ {{/if}}{{/if}}{{#if (and (eq backend "convex") (eq auth "better-auth"))}}
6
+ import { getToken } from "@/lib/auth-server";
7
+ {{/if}}
8
+ import Providers from "@/components/providers";
6
9
  import Header from "@/components/header";
7
10
 
8
11
  const geistSans = Geist({
@@ -20,6 +23,29 @@ export const metadata: Metadata = {
20
23
  description: "{{projectName}}",
21
24
  };
22
25
 
26
+ {{#if (and (eq backend "convex") (eq auth "better-auth"))}}
27
+ export default async function RootLayout({
28
+ children,
29
+ }: Readonly<{
30
+ children: React.ReactNode;
31
+ }>) {
32
+ const token = await getToken();
33
+ return (
34
+ <html lang="en" suppressHydrationWarning>
35
+ <body
36
+ className={`${geistSans.variable} ${geistMono.variable} antialiased`}
37
+ >
38
+ <Providers initialToken={token}>
39
+ <div className="grid grid-rows-[auto_1fr] h-svh">
40
+ <Header />
41
+ {children}
42
+ </div>
43
+ </Providers>
44
+ </body>
45
+ </html>
46
+ );
47
+ }
48
+ {{else}}
23
49
  export default function RootLayout({
24
50
  children,
25
51
  }: Readonly<{
@@ -47,3 +73,4 @@ export default function RootLayout({
47
73
  </html>
48
74
  );
49
75
  }
76
+ {{/if}}