create-lx2-app 0.11.4 → 0.11.5-beta.0e175c8
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/index.js +28 -26
- package/package.json +104 -98
- package/template/base/_gitignore +1 -0
- package/template/packages/config/biome.jsonc +46 -9
- package/template/packages/config/prisma.config.ts +14 -0
- package/template/packages/prisma/schema/base.prisma +1 -1
- package/template/packages/prisma/schema/with-authjs.prisma +1 -1
- package/template/packages/prisma/schema/with-better-auth.prisma +1 -1
- package/template/packages/src/app/api/trpc/[trpc]/route.ts +34 -0
- package/template/packages/src/app/layout/with-trpc.tsx +37 -0
- package/template/packages/src/app/page/base.tsx +4 -1
- package/template/packages/src/app/page/with-authjs-drizzle.tsx +4 -1
- package/template/packages/src/app/page/with-authjs-prisma.tsx +10 -1
- package/template/packages/src/app/page/with-authjs.tsx +4 -1
- package/template/packages/src/app/page/with-better-auth-drizzle.tsx +4 -1
- package/template/packages/src/app/page/with-better-auth-prisma.tsx +10 -1
- package/template/packages/src/app/page/with-better-auth.tsx +4 -1
- package/template/packages/src/app/page/with-drizzle.tsx +4 -1
- package/template/packages/src/app/page/with-payload.tsx +4 -1
- package/template/packages/src/app/page/with-prisma.tsx +10 -1
- package/template/packages/src/app/page/with-trpc.tsx +118 -0
- package/template/packages/src/components/greeting.tsx +21 -0
- package/template/packages/src/env/with-better-auth-db.js +2 -2
- package/template/packages/src/env/with-better-auth.js +2 -2
- package/template/packages/src/env/with-trpc-authjs-db.js +55 -0
- package/template/packages/src/env/with-trpc-authjs.js +53 -0
- package/template/packages/src/env/with-trpc-better-auth-db.js +52 -0
- package/template/packages/src/env/with-trpc-better-auth.js +50 -0
- package/template/packages/src/env/with-trpc-db.js +46 -0
- package/template/packages/src/env/with-trpc.js +44 -0
- package/template/packages/src/lib/api/client.tsx +85 -0
- package/template/packages/src/lib/api/query-client.ts +22 -0
- package/template/packages/src/lib/api/server.ts +31 -0
- package/template/packages/src/lib/auth/better-auth-client.ts +1 -1
- package/template/packages/src/lib/utils.ts +7 -0
- package/template/packages/src/server/api/init/base.ts +103 -0
- package/template/packages/src/server/api/init/with-authjs-db.ts +132 -0
- package/template/packages/src/server/api/init/with-authjs.ts +130 -0
- package/template/packages/src/server/api/init/with-betterauth-db.ts +134 -0
- package/template/packages/src/server/api/init/with-betterauth.ts +132 -0
- package/template/packages/src/server/api/init/with-db.ts +106 -0
- package/template/packages/src/server/api/root.ts +23 -0
- package/template/packages/src/server/api/routers/post/base.ts +46 -0
- package/template/packages/src/server/api/routers/post/with-auth-drizzle.ts +44 -0
- package/template/packages/src/server/api/routers/post/with-auth-prisma.ts +47 -0
- package/template/packages/src/server/api/routers/post/with-auth.ts +43 -0
- package/template/packages/src/server/api/routers/post/with-drizzle.ts +36 -0
- package/template/packages/src/server/api/routers/post/with-prisma.ts +37 -0
- package/template/packages/src/server/auth/better-auth-with-drizzle.ts +1 -1
- package/template/packages/src/server/auth/better-auth-with-prisma.ts +1 -1
- package/template/packages/src/server/auth/better-auth.ts +1 -0
- package/template/packages/src/server/auth/config/authjs-with-drizzle.ts +1 -1
- package/template/packages/src/server/auth/config/authjs-with-prisma.ts +1 -1
- package/template/packages/src/server/auth/config/authjs.ts +1 -1
- package/template/packages/src/server/db/{db-prisma.ts → prisma/with-mysql.ts} +5 -1
- package/template/packages/src/server/db/prisma/with-postgresql.ts +29 -0
- package/template/packages/src/server/db/prisma/with-sqlite-bun.ts +29 -0
- package/template/packages/src/server/db/prisma/with-sqlite.ts +29 -0
- package/template/packages/src/server/db/schema-drizzle/with-authjs-mysql.ts +1 -1
- package/template/packages/src/server/db/schema-drizzle/with-authjs-postgresql.ts +1 -1
- package/template/packages/src/server/db/schema-drizzle/with-authjs-sqlite.ts +1 -1
- package/LICENSE.md +0 -20
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
3
3
|
"assist": {
|
|
4
4
|
"actions": {
|
|
5
|
+
"recommended": true,
|
|
5
6
|
"source": {
|
|
6
7
|
"organizeImports": {
|
|
7
8
|
"level": "on",
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
"identifierOrder": "natural",
|
|
17
18
|
},
|
|
18
19
|
},
|
|
20
|
+
"recommended": true,
|
|
19
21
|
"useSortedAttributes": "on",
|
|
20
22
|
"useSortedKeys": "on",
|
|
21
23
|
"useSortedProperties": "on",
|
|
@@ -23,9 +25,35 @@
|
|
|
23
25
|
},
|
|
24
26
|
"enabled": true,
|
|
25
27
|
},
|
|
28
|
+
"css": {
|
|
29
|
+
"assist": {
|
|
30
|
+
"enabled": true,
|
|
31
|
+
},
|
|
32
|
+
"formatter": {
|
|
33
|
+
"enabled": true,
|
|
34
|
+
},
|
|
35
|
+
"linter": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
},
|
|
38
|
+
"parser": {
|
|
39
|
+
"cssModules": true,
|
|
40
|
+
"tailwindDirectives": true,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
26
43
|
"files": {
|
|
27
44
|
"ignoreUnknown": true,
|
|
28
|
-
"includes": [
|
|
45
|
+
"includes": [
|
|
46
|
+
"**",
|
|
47
|
+
"!node_modules",
|
|
48
|
+
"!.next",
|
|
49
|
+
"!dist",
|
|
50
|
+
"!build",
|
|
51
|
+
"!out",
|
|
52
|
+
"!package-lock.json",
|
|
53
|
+
"!pnpm-lock.yaml",
|
|
54
|
+
"!bun.lock",
|
|
55
|
+
"!yarn.lock",
|
|
56
|
+
],
|
|
29
57
|
},
|
|
30
58
|
"formatter": {
|
|
31
59
|
"bracketSpacing": true,
|
|
@@ -36,7 +64,15 @@
|
|
|
36
64
|
"lineWidth": 80,
|
|
37
65
|
"useEditorconfig": true,
|
|
38
66
|
},
|
|
67
|
+
"html": {
|
|
68
|
+
"formatter": {
|
|
69
|
+
"enabled": true,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
39
72
|
"javascript": {
|
|
73
|
+
"assist": {
|
|
74
|
+
"enabled": true,
|
|
75
|
+
},
|
|
40
76
|
"formatter": {
|
|
41
77
|
"arrowParentheses": "always",
|
|
42
78
|
"enabled": true,
|
|
@@ -45,14 +81,16 @@
|
|
|
45
81
|
"semicolons": "asNeeded",
|
|
46
82
|
"trailingCommas": "all",
|
|
47
83
|
},
|
|
84
|
+
"linter": {
|
|
85
|
+
"enabled": true,
|
|
86
|
+
},
|
|
48
87
|
},
|
|
49
88
|
"linter": {
|
|
50
|
-
"domains": {
|
|
51
|
-
"next": "recommended",
|
|
52
|
-
"react": "recommended",
|
|
53
|
-
},
|
|
54
89
|
"enabled": true,
|
|
55
90
|
"rules": {
|
|
91
|
+
"a11y": {
|
|
92
|
+
"noLabelWithoutControl": "warn",
|
|
93
|
+
},
|
|
56
94
|
"complexity": {
|
|
57
95
|
"noExtraBooleanCast": "warn",
|
|
58
96
|
"noUselessFragments": "warn",
|
|
@@ -63,8 +101,7 @@
|
|
|
63
101
|
"fix": "safe",
|
|
64
102
|
"level": "warn",
|
|
65
103
|
"options": {
|
|
66
|
-
"
|
|
67
|
-
"functions": ["cn", "clsx", "classnames"],
|
|
104
|
+
"functions": ["clsx", "cva", "cn"],
|
|
68
105
|
},
|
|
69
106
|
},
|
|
70
107
|
},
|
|
@@ -82,7 +119,7 @@
|
|
|
82
119
|
"useShorthandAssign": "error",
|
|
83
120
|
},
|
|
84
121
|
"suspicious": {
|
|
85
|
-
"
|
|
122
|
+
"noArrayIndexKey": "off",
|
|
86
123
|
},
|
|
87
124
|
},
|
|
88
125
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "dotenv/config"
|
|
2
|
+
|
|
3
|
+
import { defineConfig, env } from "prisma/config"
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
schema: "prisma/schema.prisma",
|
|
7
|
+
migrations: {
|
|
8
|
+
path: "prisma/migrations",
|
|
9
|
+
// seed: "tsx prisma/seed.ts",
|
|
10
|
+
},
|
|
11
|
+
datasource: {
|
|
12
|
+
url: env("DATABASE_URL"),
|
|
13
|
+
},
|
|
14
|
+
})
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
generator client {
|
|
5
5
|
provider = "prisma-client-js"
|
|
6
|
+
output = "../src/generated/prisma"
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
datasource db {
|
|
@@ -11,7 +12,6 @@ datasource db {
|
|
|
11
12
|
// Further reading:
|
|
12
13
|
// https://authjs.dev/getting-started/adapters/prisma#schema
|
|
13
14
|
// https://www.prisma.io/docs/orm/reference/prisma-schema-reference#string
|
|
14
|
-
url = env("DATABASE_URL")
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
model Post {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { fetchRequestHandler } from "@trpc/server/adapters/fetch"
|
|
2
|
+
import { type NextRequest } from "next/server"
|
|
3
|
+
|
|
4
|
+
import { env } from "@/env"
|
|
5
|
+
import { createTRPCContext } from "@/server/api/init"
|
|
6
|
+
import { appRouter } from "@/server/api/root"
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when
|
|
10
|
+
* handling a HTTP request (e.g. when you make requests from Client Components).
|
|
11
|
+
*/
|
|
12
|
+
async function createContext(req: NextRequest) {
|
|
13
|
+
return createTRPCContext({
|
|
14
|
+
headers: req.headers,
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const handler = (req: NextRequest) =>
|
|
19
|
+
fetchRequestHandler({
|
|
20
|
+
endpoint: "/api/trpc",
|
|
21
|
+
req,
|
|
22
|
+
router: appRouter,
|
|
23
|
+
createContext: () => createContext(req),
|
|
24
|
+
onError:
|
|
25
|
+
env.NODE_ENV === "development"
|
|
26
|
+
? ({ path, error }) => {
|
|
27
|
+
console.error(
|
|
28
|
+
`[tRPC] Error on ${path ?? "<no-path>"}: ${error.message}`
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
: undefined,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export { handler as GET, handler as POST }
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Metadata } from "next"
|
|
2
|
+
import { Geist, Geist_Mono } from "next/font/google"
|
|
3
|
+
|
|
4
|
+
import { TRPCReactProvider } from "@/lib/api/client"
|
|
5
|
+
|
|
6
|
+
import "@/styles/globals.css"
|
|
7
|
+
|
|
8
|
+
const geistSans = Geist({
|
|
9
|
+
variable: "--font-geist-sans",
|
|
10
|
+
subsets: ["latin"],
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const geistMono = Geist_Mono({
|
|
14
|
+
variable: "--font-geist-mono",
|
|
15
|
+
subsets: ["latin"],
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export const metadata: Metadata = {
|
|
19
|
+
title: "Create Lx2 App",
|
|
20
|
+
description: "Generated by create lx2 app",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default function RootLayout({
|
|
24
|
+
children,
|
|
25
|
+
}: Readonly<{
|
|
26
|
+
children: React.ReactNode
|
|
27
|
+
}>) {
|
|
28
|
+
return (
|
|
29
|
+
<html lang="en">
|
|
30
|
+
<body
|
|
31
|
+
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
32
|
+
>
|
|
33
|
+
<TRPCReactProvider>{children}</TRPCReactProvider>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
@@ -4,7 +4,7 @@ export default function HomePage() {
|
|
|
4
4
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
5
5
|
|
|
6
6
|
return (
|
|
7
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
7
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
8
8
|
<div className="flex grow flex-col items-center justify-center">
|
|
9
9
|
{/* Logo */}
|
|
10
10
|
<picture className="relative">
|
|
@@ -45,6 +45,7 @@ export default function HomePage() {
|
|
|
45
45
|
strokeLinejoin="round"
|
|
46
46
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
47
47
|
>
|
|
48
|
+
<title>Docs</title>
|
|
48
49
|
<path d="M7 7h10v10" />
|
|
49
50
|
<path d="M7 17 17 7" />
|
|
50
51
|
</svg>
|
|
@@ -63,6 +64,7 @@ export default function HomePage() {
|
|
|
63
64
|
strokeLinejoin="round"
|
|
64
65
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
65
66
|
>
|
|
67
|
+
<title>Discord</title>
|
|
66
68
|
<path d="M7 7h10v10" />
|
|
67
69
|
<path d="M7 17 17 7" />
|
|
68
70
|
</svg>
|
|
@@ -81,6 +83,7 @@ export default function HomePage() {
|
|
|
81
83
|
strokeLinejoin="round"
|
|
82
84
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
83
85
|
>
|
|
86
|
+
<title>GitHub</title>
|
|
84
87
|
<path d="M7 7h10v10" />
|
|
85
88
|
<path d="M7 17 17 7" />
|
|
86
89
|
</svg>
|
|
@@ -15,7 +15,7 @@ export default async function HomePage() {
|
|
|
15
15
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
18
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
19
19
|
{/* Header */}
|
|
20
20
|
<header className="ml-auto">
|
|
21
21
|
{user ? (
|
|
@@ -94,6 +94,7 @@ export default async function HomePage() {
|
|
|
94
94
|
strokeLinejoin="round"
|
|
95
95
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
96
96
|
>
|
|
97
|
+
<title>Docs</title>
|
|
97
98
|
<path d="M7 7h10v10" />
|
|
98
99
|
<path d="M7 17 17 7" />
|
|
99
100
|
</svg>
|
|
@@ -112,6 +113,7 @@ export default async function HomePage() {
|
|
|
112
113
|
strokeLinejoin="round"
|
|
113
114
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
114
115
|
>
|
|
116
|
+
<title>Discord</title>
|
|
115
117
|
<path d="M7 7h10v10" />
|
|
116
118
|
<path d="M7 17 17 7" />
|
|
117
119
|
</svg>
|
|
@@ -130,6 +132,7 @@ export default async function HomePage() {
|
|
|
130
132
|
strokeLinejoin="round"
|
|
131
133
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
132
134
|
>
|
|
135
|
+
<title>GitHub</title>
|
|
133
136
|
<path d="M7 7h10v10" />
|
|
134
137
|
<path d="M7 17 17 7" />
|
|
135
138
|
</svg>
|
|
@@ -4,6 +4,12 @@ import { revalidatePath } from "next/cache"
|
|
|
4
4
|
import { auth, signIn, signOut } from "@/server/auth"
|
|
5
5
|
import { db } from "@/server/db"
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Force dynamic rendering for pnpm + prisma
|
|
9
|
+
* @see https://github.com/prisma/prisma/issues/28581
|
|
10
|
+
*/
|
|
11
|
+
export const dynamic = "force-dynamic"
|
|
12
|
+
|
|
7
13
|
export default async function HomePage() {
|
|
8
14
|
const session = await auth()
|
|
9
15
|
const user = session?.user
|
|
@@ -13,7 +19,7 @@ export default async function HomePage() {
|
|
|
13
19
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
14
20
|
|
|
15
21
|
return (
|
|
16
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
22
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
17
23
|
{/* Header */}
|
|
18
24
|
<header className="ml-auto">
|
|
19
25
|
{user ? (
|
|
@@ -92,6 +98,7 @@ export default async function HomePage() {
|
|
|
92
98
|
strokeLinejoin="round"
|
|
93
99
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
94
100
|
>
|
|
101
|
+
<title>Docs</title>
|
|
95
102
|
<path d="M7 7h10v10" />
|
|
96
103
|
<path d="M7 17 17 7" />
|
|
97
104
|
</svg>
|
|
@@ -110,6 +117,7 @@ export default async function HomePage() {
|
|
|
110
117
|
strokeLinejoin="round"
|
|
111
118
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
112
119
|
>
|
|
120
|
+
<title>Discord</title>
|
|
113
121
|
<path d="M7 7h10v10" />
|
|
114
122
|
<path d="M7 17 17 7" />
|
|
115
123
|
</svg>
|
|
@@ -128,6 +136,7 @@ export default async function HomePage() {
|
|
|
128
136
|
strokeLinejoin="round"
|
|
129
137
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
130
138
|
>
|
|
139
|
+
<title>GitHub</title>
|
|
131
140
|
<path d="M7 7h10v10" />
|
|
132
141
|
<path d="M7 17 17 7" />
|
|
133
142
|
</svg>
|
|
@@ -9,7 +9,7 @@ export default async function HomePage() {
|
|
|
9
9
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
12
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
13
13
|
{/* Header */}
|
|
14
14
|
<header className="ml-auto">
|
|
15
15
|
{user ? (
|
|
@@ -88,6 +88,7 @@ export default async function HomePage() {
|
|
|
88
88
|
strokeLinejoin="round"
|
|
89
89
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
90
90
|
>
|
|
91
|
+
<title>Docs</title>
|
|
91
92
|
<path d="M7 7h10v10" />
|
|
92
93
|
<path d="M7 17 17 7" />
|
|
93
94
|
</svg>
|
|
@@ -106,6 +107,7 @@ export default async function HomePage() {
|
|
|
106
107
|
strokeLinejoin="round"
|
|
107
108
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
108
109
|
>
|
|
110
|
+
<title>Discord</title>
|
|
109
111
|
<path d="M7 7h10v10" />
|
|
110
112
|
<path d="M7 17 17 7" />
|
|
111
113
|
</svg>
|
|
@@ -124,6 +126,7 @@ export default async function HomePage() {
|
|
|
124
126
|
strokeLinejoin="round"
|
|
125
127
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
126
128
|
>
|
|
129
|
+
<title>GitHub</title>
|
|
127
130
|
<path d="M7 7h10v10" />
|
|
128
131
|
<path d="M7 17 17 7" />
|
|
129
132
|
</svg>
|
|
@@ -19,7 +19,7 @@ export default async function HomePage() {
|
|
|
19
19
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
22
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
23
23
|
{/* Header */}
|
|
24
24
|
<header className="ml-auto">
|
|
25
25
|
{user ? (
|
|
@@ -110,6 +110,7 @@ export default async function HomePage() {
|
|
|
110
110
|
strokeLinejoin="round"
|
|
111
111
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
112
112
|
>
|
|
113
|
+
<title>Docs</title>
|
|
113
114
|
<path d="M7 7h10v10" />
|
|
114
115
|
<path d="M7 17 17 7" />
|
|
115
116
|
</svg>
|
|
@@ -128,6 +129,7 @@ export default async function HomePage() {
|
|
|
128
129
|
strokeLinejoin="round"
|
|
129
130
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
130
131
|
>
|
|
132
|
+
<title>Discord</title>
|
|
131
133
|
<path d="M7 7h10v10" />
|
|
132
134
|
<path d="M7 17 17 7" />
|
|
133
135
|
</svg>
|
|
@@ -146,6 +148,7 @@ export default async function HomePage() {
|
|
|
146
148
|
strokeLinejoin="round"
|
|
147
149
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
148
150
|
>
|
|
151
|
+
<title>GitHub</title>
|
|
149
152
|
<path d="M7 7h10v10" />
|
|
150
153
|
<path d="M7 17 17 7" />
|
|
151
154
|
</svg>
|
|
@@ -6,6 +6,12 @@ import { redirect } from "next/navigation"
|
|
|
6
6
|
import { auth } from "@/server/auth"
|
|
7
7
|
import { db } from "@/server/db"
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Force dynamic rendering for pnpm + prisma
|
|
11
|
+
* @see https://github.com/prisma/prisma/issues/28581
|
|
12
|
+
*/
|
|
13
|
+
export const dynamic = "force-dynamic"
|
|
14
|
+
|
|
9
15
|
export default async function HomePage() {
|
|
10
16
|
const session = await auth.api.getSession({
|
|
11
17
|
headers: await headers(),
|
|
@@ -17,7 +23,7 @@ export default async function HomePage() {
|
|
|
17
23
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
18
24
|
|
|
19
25
|
return (
|
|
20
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
26
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
21
27
|
{/* Header */}
|
|
22
28
|
<header className="ml-auto">
|
|
23
29
|
{user ? (
|
|
@@ -108,6 +114,7 @@ export default async function HomePage() {
|
|
|
108
114
|
strokeLinejoin="round"
|
|
109
115
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
110
116
|
>
|
|
117
|
+
<title>Docs</title>
|
|
111
118
|
<path d="M7 7h10v10" />
|
|
112
119
|
<path d="M7 17 17 7" />
|
|
113
120
|
</svg>
|
|
@@ -126,6 +133,7 @@ export default async function HomePage() {
|
|
|
126
133
|
strokeLinejoin="round"
|
|
127
134
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
128
135
|
>
|
|
136
|
+
<title>Discord</title>
|
|
129
137
|
<path d="M7 7h10v10" />
|
|
130
138
|
<path d="M7 17 17 7" />
|
|
131
139
|
</svg>
|
|
@@ -144,6 +152,7 @@ export default async function HomePage() {
|
|
|
144
152
|
strokeLinejoin="round"
|
|
145
153
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
146
154
|
>
|
|
155
|
+
<title>GitHub</title>
|
|
147
156
|
<path d="M7 7h10v10" />
|
|
148
157
|
<path d="M7 17 17 7" />
|
|
149
158
|
</svg>
|
|
@@ -13,7 +13,7 @@ export default async function HomePage() {
|
|
|
13
13
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
16
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
17
17
|
{/* Header */}
|
|
18
18
|
<header className="ml-auto">
|
|
19
19
|
{user ? (
|
|
@@ -104,6 +104,7 @@ export default async function HomePage() {
|
|
|
104
104
|
strokeLinejoin="round"
|
|
105
105
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
106
106
|
>
|
|
107
|
+
<title>Docs</title>
|
|
107
108
|
<path d="M7 7h10v10" />
|
|
108
109
|
<path d="M7 17 17 7" />
|
|
109
110
|
</svg>
|
|
@@ -122,6 +123,7 @@ export default async function HomePage() {
|
|
|
122
123
|
strokeLinejoin="round"
|
|
123
124
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
124
125
|
>
|
|
126
|
+
<title>Discord</title>
|
|
125
127
|
<path d="M7 7h10v10" />
|
|
126
128
|
<path d="M7 17 17 7" />
|
|
127
129
|
</svg>
|
|
@@ -140,6 +142,7 @@ export default async function HomePage() {
|
|
|
140
142
|
strokeLinejoin="round"
|
|
141
143
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
142
144
|
>
|
|
145
|
+
<title>GitHub</title>
|
|
143
146
|
<path d="M7 7h10v10" />
|
|
144
147
|
<path d="M7 17 17 7" />
|
|
145
148
|
</svg>
|
|
@@ -11,7 +11,7 @@ export default async function HomePage() {
|
|
|
11
11
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
14
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
15
15
|
<div className="flex grow flex-col items-center justify-center">
|
|
16
16
|
{/* Logo */}
|
|
17
17
|
<picture className="relative">
|
|
@@ -52,6 +52,7 @@ export default async function HomePage() {
|
|
|
52
52
|
strokeLinejoin="round"
|
|
53
53
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
54
54
|
>
|
|
55
|
+
<title>Docs</title>
|
|
55
56
|
<path d="M7 7h10v10" />
|
|
56
57
|
<path d="M7 17 17 7" />
|
|
57
58
|
</svg>
|
|
@@ -70,6 +71,7 @@ export default async function HomePage() {
|
|
|
70
71
|
strokeLinejoin="round"
|
|
71
72
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
72
73
|
>
|
|
74
|
+
<title>Discord</title>
|
|
73
75
|
<path d="M7 7h10v10" />
|
|
74
76
|
<path d="M7 17 17 7" />
|
|
75
77
|
</svg>
|
|
@@ -88,6 +90,7 @@ export default async function HomePage() {
|
|
|
88
90
|
strokeLinejoin="round"
|
|
89
91
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
90
92
|
>
|
|
93
|
+
<title>GitHub</title>
|
|
91
94
|
<path d="M7 7h10v10" />
|
|
92
95
|
<path d="M7 17 17 7" />
|
|
93
96
|
</svg>
|
|
@@ -12,7 +12,7 @@ export default async function HomePage() {
|
|
|
12
12
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
15
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
16
16
|
<div className="flex grow flex-col items-center justify-center">
|
|
17
17
|
{/* Logo */}
|
|
18
18
|
<picture className="relative">
|
|
@@ -86,6 +86,7 @@ export default async function HomePage() {
|
|
|
86
86
|
strokeLinejoin="round"
|
|
87
87
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
88
88
|
>
|
|
89
|
+
<title>Docs</title>
|
|
89
90
|
<path d="M7 7h10v10" />
|
|
90
91
|
<path d="M7 17 17 7" />
|
|
91
92
|
</svg>
|
|
@@ -104,6 +105,7 @@ export default async function HomePage() {
|
|
|
104
105
|
strokeLinejoin="round"
|
|
105
106
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
106
107
|
>
|
|
108
|
+
<title>Discord</title>
|
|
107
109
|
<path d="M7 7h10v10" />
|
|
108
110
|
<path d="M7 17 17 7" />
|
|
109
111
|
</svg>
|
|
@@ -122,6 +124,7 @@ export default async function HomePage() {
|
|
|
122
124
|
strokeLinejoin="round"
|
|
123
125
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
124
126
|
>
|
|
127
|
+
<title>GitHub</title>
|
|
125
128
|
<path d="M7 7h10v10" />
|
|
126
129
|
<path d="M7 17 17 7" />
|
|
127
130
|
</svg>
|
|
@@ -3,13 +3,19 @@ import { revalidatePath } from "next/cache"
|
|
|
3
3
|
|
|
4
4
|
import { db } from "@/server/db"
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Force dynamic rendering for pnpm + prisma
|
|
8
|
+
* @see https://github.com/prisma/prisma/issues/28581
|
|
9
|
+
*/
|
|
10
|
+
export const dynamic = "force-dynamic"
|
|
11
|
+
|
|
6
12
|
export default async function HomePage() {
|
|
7
13
|
const posts = await db.post.findMany()
|
|
8
14
|
|
|
9
15
|
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
10
16
|
|
|
11
17
|
return (
|
|
12
|
-
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-
|
|
18
|
+
<main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-11.25">
|
|
13
19
|
<div className="flex grow flex-col items-center justify-center">
|
|
14
20
|
{/* Logo */}
|
|
15
21
|
<picture className="relative">
|
|
@@ -50,6 +56,7 @@ export default async function HomePage() {
|
|
|
50
56
|
strokeLinejoin="round"
|
|
51
57
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
52
58
|
>
|
|
59
|
+
<title>Docs</title>
|
|
53
60
|
<path d="M7 7h10v10" />
|
|
54
61
|
<path d="M7 17 17 7" />
|
|
55
62
|
</svg>
|
|
@@ -68,6 +75,7 @@ export default async function HomePage() {
|
|
|
68
75
|
strokeLinejoin="round"
|
|
69
76
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
70
77
|
>
|
|
78
|
+
<title>Discord</title>
|
|
71
79
|
<path d="M7 7h10v10" />
|
|
72
80
|
<path d="M7 17 17 7" />
|
|
73
81
|
</svg>
|
|
@@ -86,6 +94,7 @@ export default async function HomePage() {
|
|
|
86
94
|
strokeLinejoin="round"
|
|
87
95
|
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
88
96
|
>
|
|
97
|
+
<title>GitHub</title>
|
|
89
98
|
<path d="M7 7h10v10" />
|
|
90
99
|
<path d="M7 17 17 7" />
|
|
91
100
|
</svg>
|