create-lx2-app 0.7.0
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/README.md +151 -0
- package/dist/index.js +68 -0
- package/package.json +92 -0
- package/template/base/README.md +57 -0
- package/template/base/_gitignore +41 -0
- package/template/base/next-env.d.ts +5 -0
- package/template/base/next.config.mjs +12 -0
- package/template/base/package.json +20 -0
- package/template/base/postcss.config.mjs +5 -0
- package/template/base/public/favicon.ico +0 -0
- package/template/base/src/env.js +40 -0
- package/template/packages/config/eslint.config.mjs +16 -0
- package/template/packages/config/payload/with-postgres.ts +39 -0
- package/template/packages/config/payload/with-sqlite.ts +42 -0
- package/template/packages/config/prettier.config.mjs +23 -0
- package/template/packages/config/tsconfig/base.json +42 -0
- package/template/packages/config/tsconfig/with-payload.json +43 -0
- package/template/packages/prisma/schema/base.prisma +21 -0
- package/template/packages/prisma/schema/with-authjs.prisma +86 -0
- package/template/packages/prisma/schema/with-better-auth.prisma +85 -0
- package/template/packages/src/app/(payload)/admin/[[...segments]]/not-found.tsx +27 -0
- package/template/packages/src/app/(payload)/admin/[[...segments]]/page.tsx +27 -0
- package/template/packages/src/app/(payload)/admin/importMap.js +1 -0
- package/template/packages/src/app/(payload)/api/[...slug]/route.ts +20 -0
- package/template/packages/src/app/(payload)/api/graphql/route.ts +8 -0
- package/template/packages/src/app/(payload)/api/graphql-playground/route.ts +8 -0
- package/template/packages/src/app/(payload)/custom.scss +0 -0
- package/template/packages/src/app/(payload)/layout.tsx +35 -0
- package/template/packages/src/app/api/auth/[...betterauth]/route.ts +5 -0
- package/template/packages/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/template/packages/src/app/globals/base.css +27 -0
- package/template/packages/src/app/layout/base.tsx +35 -0
- package/template/packages/src/app/page/base.tsx +98 -0
- package/template/packages/src/app/page/with-authjs-prisma.tsx +221 -0
- package/template/packages/src/app/page/with-authjs.tsx +126 -0
- package/template/packages/src/app/page/with-better-auth-prisma.tsx +245 -0
- package/template/packages/src/app/page/with-better-auth.tsx +151 -0
- package/template/packages/src/app/page/with-payload.tsx +136 -0
- package/template/packages/src/app/page/with-prisma.tsx +177 -0
- package/template/packages/src/env/with-authjs-db.js +52 -0
- package/template/packages/src/env/with-authjs.js +51 -0
- package/template/packages/src/env/with-better-auth-db.js +51 -0
- package/template/packages/src/env/with-better-auth.js +48 -0
- package/template/packages/src/env/with-db.js +44 -0
- package/template/packages/src/env/with-payload.js +46 -0
- package/template/packages/src/lib/auth/better-auth-client.ts +9 -0
- package/template/packages/src/payload/collections/Media.ts +16 -0
- package/template/packages/src/payload/collections/Users.ts +13 -0
- package/template/packages/src/server/auth/authjs.ts +5 -0
- package/template/packages/src/server/auth/config/authjs-with-prisma.ts +30 -0
- package/template/packages/src/server/auth/config/authjs.ts +27 -0
- package/template/packages/src/server/auth/config/better-auth-with-prisma.ts +21 -0
- package/template/packages/src/server/auth/config/better-auth.ts +16 -0
- package/template/packages/src/server/db/db-prisma.ts +23 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions &
|
|
3
|
+
* import("@ianvs/prettier-plugin-sort-imports").PluginConfig}
|
|
4
|
+
*/
|
|
5
|
+
const config = {
|
|
6
|
+
arrowParens: "always",
|
|
7
|
+
printWidth: 80,
|
|
8
|
+
singleQuote: false,
|
|
9
|
+
jsxSingleQuote: false,
|
|
10
|
+
semi: false,
|
|
11
|
+
trailingComma: "all",
|
|
12
|
+
tabWidth: 2,
|
|
13
|
+
proseWrap: "always",
|
|
14
|
+
plugins: [
|
|
15
|
+
"@ianvs/prettier-plugin-sort-imports",
|
|
16
|
+
"prettier-plugin-tailwindcss", // This MUST come last
|
|
17
|
+
],
|
|
18
|
+
importOrder: ["<THIRD_PARTY_MODULES>", "", "^@/", "", "^[.][.]/", "^[.]/"],
|
|
19
|
+
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
|
|
20
|
+
importOrderTypeScriptVersion: "5.0.0",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default config
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Base Options: */
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"target": "ES2017",
|
|
7
|
+
"allowJs": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
|
|
11
|
+
/* Strictness */
|
|
12
|
+
"strict": true,
|
|
13
|
+
"checkJs": true,
|
|
14
|
+
|
|
15
|
+
/* Bundled projects */
|
|
16
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
17
|
+
"noEmit": true,
|
|
18
|
+
"module": "esnext",
|
|
19
|
+
"moduleResolution": "bundler",
|
|
20
|
+
"jsx": "preserve",
|
|
21
|
+
"incremental": true,
|
|
22
|
+
"plugins": [
|
|
23
|
+
{
|
|
24
|
+
"name": "next"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
|
|
28
|
+
/* Path Aliases */
|
|
29
|
+
"baseUrl": ".",
|
|
30
|
+
"paths": {
|
|
31
|
+
"@/*": ["./src/*"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"include": [
|
|
35
|
+
"next-env.d.ts",
|
|
36
|
+
"**/*.ts",
|
|
37
|
+
"**/*.tsx",
|
|
38
|
+
"**/*.js",
|
|
39
|
+
".next/types/**/*.ts"
|
|
40
|
+
],
|
|
41
|
+
"exclude": ["node_modules"]
|
|
42
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Base Options: */
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"target": "ES2017",
|
|
7
|
+
"allowJs": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
|
|
11
|
+
/* Strictness */
|
|
12
|
+
"strict": true,
|
|
13
|
+
"checkJs": true,
|
|
14
|
+
|
|
15
|
+
/* Bundled projects */
|
|
16
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
17
|
+
"noEmit": true,
|
|
18
|
+
"module": "esnext",
|
|
19
|
+
"moduleResolution": "bundler",
|
|
20
|
+
"jsx": "preserve",
|
|
21
|
+
"incremental": true,
|
|
22
|
+
"plugins": [
|
|
23
|
+
{
|
|
24
|
+
"name": "next"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
|
|
28
|
+
/* Path Aliases */
|
|
29
|
+
"baseUrl": ".",
|
|
30
|
+
"paths": {
|
|
31
|
+
"@/*": ["./src/*"],
|
|
32
|
+
"@payload-config": ["./payload.config.ts"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"include": [
|
|
36
|
+
"next-env.d.ts",
|
|
37
|
+
"**/*.ts",
|
|
38
|
+
"**/*.tsx",
|
|
39
|
+
"**/*.js",
|
|
40
|
+
".next/types/**/*.ts"
|
|
41
|
+
],
|
|
42
|
+
"exclude": ["node_modules"]
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// This is your Prisma schema file,
|
|
2
|
+
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
+
|
|
4
|
+
generator client {
|
|
5
|
+
provider = "prisma-client-js"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
datasource db {
|
|
9
|
+
provider = "sqlite"
|
|
10
|
+
url = env("DATABASE_URL")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
model Post {
|
|
14
|
+
id String @id @default(cuid())
|
|
15
|
+
name String
|
|
16
|
+
|
|
17
|
+
createdAt DateTime @default(now())
|
|
18
|
+
updatedAt DateTime @updatedAt
|
|
19
|
+
|
|
20
|
+
@@index([name])
|
|
21
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// This is your Prisma schema file,
|
|
2
|
+
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
+
|
|
4
|
+
generator client {
|
|
5
|
+
provider = "prisma-client-js"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
datasource db {
|
|
9
|
+
provider = "sqlite"
|
|
10
|
+
// NOTE: When using mysql or sqlserver, uncomment the @db.Text annotations in model Account below
|
|
11
|
+
// Further reading:
|
|
12
|
+
// https://authjs.dev/getting-started/adapters/prisma#schema
|
|
13
|
+
// https://www.prisma.io/docs/orm/reference/prisma-schema-reference#string
|
|
14
|
+
url = env("DATABASE_URL")
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
model Post {
|
|
18
|
+
id String @id @default(cuid())
|
|
19
|
+
name String
|
|
20
|
+
|
|
21
|
+
createdBy User @relation(fields: [createdById], references: [id])
|
|
22
|
+
createdById String
|
|
23
|
+
|
|
24
|
+
createdAt DateTime @default(now())
|
|
25
|
+
updatedAt DateTime @updatedAt
|
|
26
|
+
|
|
27
|
+
@@index([name])
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Necessary for Next auth
|
|
31
|
+
model Account {
|
|
32
|
+
id String @id @default(cuid())
|
|
33
|
+
|
|
34
|
+
type String
|
|
35
|
+
scope String?
|
|
36
|
+
session_state String?
|
|
37
|
+
provider String
|
|
38
|
+
providerAccountId String
|
|
39
|
+
|
|
40
|
+
id_token String? // @db.Text
|
|
41
|
+
token_type String?
|
|
42
|
+
access_token String? // @db.Text
|
|
43
|
+
refresh_token String? // @db.Text
|
|
44
|
+
refresh_token_expires_in Int?
|
|
45
|
+
|
|
46
|
+
userId String
|
|
47
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
48
|
+
|
|
49
|
+
expires_at Int?
|
|
50
|
+
|
|
51
|
+
@@unique([provider, providerAccountId])
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
model Session {
|
|
55
|
+
id String @id @default(cuid())
|
|
56
|
+
|
|
57
|
+
sessionToken String @unique
|
|
58
|
+
|
|
59
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
60
|
+
userId String
|
|
61
|
+
|
|
62
|
+
expires DateTime
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
model User {
|
|
66
|
+
id String @id @default(cuid())
|
|
67
|
+
|
|
68
|
+
name String?
|
|
69
|
+
email String? @unique
|
|
70
|
+
emailVerified DateTime?
|
|
71
|
+
|
|
72
|
+
image String?
|
|
73
|
+
|
|
74
|
+
accounts Account[]
|
|
75
|
+
sessions Session[]
|
|
76
|
+
posts Post[]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
model VerificationToken {
|
|
80
|
+
token String @unique
|
|
81
|
+
identifier String
|
|
82
|
+
|
|
83
|
+
expires DateTime
|
|
84
|
+
|
|
85
|
+
@@unique([identifier, token])
|
|
86
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// This is your Prisma schema file,
|
|
2
|
+
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
+
|
|
4
|
+
generator client {
|
|
5
|
+
provider = "prisma-client-js"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
datasource db {
|
|
9
|
+
provider = "sqlite"
|
|
10
|
+
url = env("DATABASE_URL")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
model Post {
|
|
14
|
+
id String @id @default(cuid())
|
|
15
|
+
name String
|
|
16
|
+
|
|
17
|
+
createdBy User @relation(fields: [createdById], references: [id])
|
|
18
|
+
createdById String
|
|
19
|
+
|
|
20
|
+
createdAt DateTime @default(now())
|
|
21
|
+
updatedAt DateTime @updatedAt
|
|
22
|
+
|
|
23
|
+
@@index([name])
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
model User {
|
|
27
|
+
id String @id
|
|
28
|
+
name String
|
|
29
|
+
email String
|
|
30
|
+
emailVerified Boolean
|
|
31
|
+
image String?
|
|
32
|
+
createdAt DateTime
|
|
33
|
+
updatedAt DateTime
|
|
34
|
+
sessions Session[]
|
|
35
|
+
accounts Account[]
|
|
36
|
+
Post Post[]
|
|
37
|
+
|
|
38
|
+
@@unique([email])
|
|
39
|
+
@@map("user")
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
model Session {
|
|
43
|
+
id String @id
|
|
44
|
+
expiresAt DateTime
|
|
45
|
+
token String
|
|
46
|
+
createdAt DateTime
|
|
47
|
+
updatedAt DateTime
|
|
48
|
+
ipAddress String?
|
|
49
|
+
userAgent String?
|
|
50
|
+
userId String
|
|
51
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
52
|
+
|
|
53
|
+
@@unique([token])
|
|
54
|
+
@@map("session")
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
model Account {
|
|
58
|
+
id String @id
|
|
59
|
+
accountId String
|
|
60
|
+
providerId String
|
|
61
|
+
userId String
|
|
62
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
63
|
+
accessToken String?
|
|
64
|
+
refreshToken String?
|
|
65
|
+
idToken String?
|
|
66
|
+
accessTokenExpiresAt DateTime?
|
|
67
|
+
refreshTokenExpiresAt DateTime?
|
|
68
|
+
scope String?
|
|
69
|
+
password String?
|
|
70
|
+
createdAt DateTime
|
|
71
|
+
updatedAt DateTime
|
|
72
|
+
|
|
73
|
+
@@map("account")
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
model Verification {
|
|
77
|
+
id String @id
|
|
78
|
+
identifier String
|
|
79
|
+
value String
|
|
80
|
+
expiresAt DateTime
|
|
81
|
+
createdAt DateTime?
|
|
82
|
+
updatedAt DateTime?
|
|
83
|
+
|
|
84
|
+
@@map("verification")
|
|
85
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
|
3
|
+
import config from "@payload-config"
|
|
4
|
+
import { generatePageMetadata, NotFoundPage } from "@payloadcms/next/views"
|
|
5
|
+
import type { Metadata } from "next"
|
|
6
|
+
|
|
7
|
+
import { importMap } from "../importMap"
|
|
8
|
+
|
|
9
|
+
type Args = {
|
|
10
|
+
params: Promise<{
|
|
11
|
+
segments: string[]
|
|
12
|
+
}>
|
|
13
|
+
searchParams: Promise<{
|
|
14
|
+
[key: string]: string | string[]
|
|
15
|
+
}>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const generateMetadata = ({
|
|
19
|
+
params,
|
|
20
|
+
searchParams,
|
|
21
|
+
}: Args): Promise<Metadata> =>
|
|
22
|
+
generatePageMetadata({ config, params, searchParams })
|
|
23
|
+
|
|
24
|
+
const NotFound = ({ params, searchParams }: Args) =>
|
|
25
|
+
NotFoundPage({ config, params, searchParams, importMap })
|
|
26
|
+
|
|
27
|
+
export default NotFound
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
|
3
|
+
import config from "@payload-config"
|
|
4
|
+
import { generatePageMetadata, RootPage } from "@payloadcms/next/views"
|
|
5
|
+
import type { Metadata } from "next"
|
|
6
|
+
|
|
7
|
+
import { importMap } from "../importMap"
|
|
8
|
+
|
|
9
|
+
type Args = {
|
|
10
|
+
params: Promise<{
|
|
11
|
+
segments: string[]
|
|
12
|
+
}>
|
|
13
|
+
searchParams: Promise<{
|
|
14
|
+
[key: string]: string | string[]
|
|
15
|
+
}>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const generateMetadata = ({
|
|
19
|
+
params,
|
|
20
|
+
searchParams,
|
|
21
|
+
}: Args): Promise<Metadata> =>
|
|
22
|
+
generatePageMetadata({ config, params, searchParams })
|
|
23
|
+
|
|
24
|
+
const Page = ({ params, searchParams }: Args) =>
|
|
25
|
+
RootPage({ config, params, searchParams, importMap })
|
|
26
|
+
|
|
27
|
+
export default Page
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const importMap = {}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
|
3
|
+
import config from "@payload-config"
|
|
4
|
+
import {
|
|
5
|
+
REST_DELETE,
|
|
6
|
+
REST_GET,
|
|
7
|
+
REST_OPTIONS,
|
|
8
|
+
REST_PATCH,
|
|
9
|
+
REST_POST,
|
|
10
|
+
REST_PUT,
|
|
11
|
+
} from "@payloadcms/next/routes"
|
|
12
|
+
|
|
13
|
+
import "@payloadcms/next/css"
|
|
14
|
+
|
|
15
|
+
export const GET = REST_GET(config)
|
|
16
|
+
export const POST = REST_POST(config)
|
|
17
|
+
export const DELETE = REST_DELETE(config)
|
|
18
|
+
export const PATCH = REST_PATCH(config)
|
|
19
|
+
export const PUT = REST_PUT(config)
|
|
20
|
+
export const OPTIONS = REST_OPTIONS(config)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
|
3
|
+
import config from "@payload-config"
|
|
4
|
+
import { GRAPHQL_POST, REST_OPTIONS } from "@payloadcms/next/routes"
|
|
5
|
+
|
|
6
|
+
export const POST = GRAPHQL_POST(config)
|
|
7
|
+
|
|
8
|
+
export const OPTIONS = REST_OPTIONS(config)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
|
3
|
+
import config from "@payload-config"
|
|
4
|
+
import { GRAPHQL_PLAYGROUND_GET } from "@payloadcms/next/routes"
|
|
5
|
+
|
|
6
|
+
import "@payloadcms/next/css"
|
|
7
|
+
|
|
8
|
+
export const GET = GRAPHQL_PLAYGROUND_GET(config)
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
|
2
|
+
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
|
3
|
+
import config from "@payload-config"
|
|
4
|
+
import { handleServerFunctions, RootLayout } from "@payloadcms/next/layouts"
|
|
5
|
+
import type { ServerFunctionClient } from "payload"
|
|
6
|
+
|
|
7
|
+
import { importMap } from "./admin/importMap.js"
|
|
8
|
+
|
|
9
|
+
import "@payloadcms/next/css"
|
|
10
|
+
import "./custom.scss"
|
|
11
|
+
|
|
12
|
+
type Args = {
|
|
13
|
+
children: React.ReactNode
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const serverFunction: ServerFunctionClient = async function (args) {
|
|
17
|
+
"use server"
|
|
18
|
+
return handleServerFunctions({
|
|
19
|
+
...args,
|
|
20
|
+
config,
|
|
21
|
+
importMap,
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const Layout = ({ children }: Args) => (
|
|
26
|
+
<RootLayout
|
|
27
|
+
config={config}
|
|
28
|
+
importMap={importMap}
|
|
29
|
+
serverFunction={serverFunction}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
</RootLayout>
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
export default Layout
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--background: #ffffff;
|
|
5
|
+
--foreground: #171717;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@theme inline {
|
|
9
|
+
--color-background: var(--background);
|
|
10
|
+
--color-foreground: var(--foreground);
|
|
11
|
+
|
|
12
|
+
--font-sans: var(--font-geist-sans);
|
|
13
|
+
--font-mono: var(--font-geist-mono);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-color-scheme: dark) {
|
|
17
|
+
:root {
|
|
18
|
+
--background: #0a0a0a;
|
|
19
|
+
--foreground: #ededed;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
background: var(--background);
|
|
25
|
+
color: var(--foreground);
|
|
26
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
27
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Metadata } from "next"
|
|
2
|
+
import { Geist, Geist_Mono } from "next/font/google"
|
|
3
|
+
|
|
4
|
+
import "./globals.css"
|
|
5
|
+
|
|
6
|
+
const geistSans = Geist({
|
|
7
|
+
variable: "--font-geist-sans",
|
|
8
|
+
subsets: ["latin"],
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const geistMono = Geist_Mono({
|
|
12
|
+
variable: "--font-geist-mono",
|
|
13
|
+
subsets: ["latin"],
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export const metadata: Metadata = {
|
|
17
|
+
title: "Create Lx2 App",
|
|
18
|
+
description: "Generated by create lx2 app",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default function RootLayout({
|
|
22
|
+
children,
|
|
23
|
+
}: Readonly<{
|
|
24
|
+
children: React.ReactNode
|
|
25
|
+
}>) {
|
|
26
|
+
return (
|
|
27
|
+
<html lang="en">
|
|
28
|
+
<body
|
|
29
|
+
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { fileURLToPath } from "url"
|
|
2
|
+
|
|
3
|
+
export default function HomePage() {
|
|
4
|
+
const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
|
|
5
|
+
|
|
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-[45px]">
|
|
8
|
+
<div className="flex grow flex-col items-center justify-center">
|
|
9
|
+
{/* Logo */}
|
|
10
|
+
<picture className="relative">
|
|
11
|
+
<div className="absolute inset-0 animate-pulse rounded-xl bg-gradient-to-r from-purple-500 to-cyan-500 opacity-20 blur-xl dark:from-purple-800 dark:to-cyan-800" />
|
|
12
|
+
<source srcSet="https://github.com/SlickYeet/create-lx2-app/blob/main/docs/public/logo.light.png?raw=true" />
|
|
13
|
+
<img
|
|
14
|
+
src="https://github.com/SlickYeet/create-lx2-app/blob/main/docs/public/logo.light.png?raw=true"
|
|
15
|
+
alt="Logo"
|
|
16
|
+
width={65}
|
|
17
|
+
height={65}
|
|
18
|
+
className="block h-auto max-w-full"
|
|
19
|
+
/>
|
|
20
|
+
</picture>
|
|
21
|
+
|
|
22
|
+
<h1 className="mt-6 bg-gradient-to-r from-purple-500 to-cyan-500 bg-clip-text text-center text-4xl leading-10 text-transparent sm:text-5xl sm:leading-14 md:text-6xl md:leading-20 lg:mt-10 lg:text-7xl lg:font-bold">
|
|
23
|
+
Lx2 Next.js App
|
|
24
|
+
</h1>
|
|
25
|
+
<p className="mt-4 text-center text-lg text-neutral-700 md:text-xl lg:mt-6 dark:text-neutral-300">
|
|
26
|
+
Build modern web applications with today's most popular tools
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<div className="mt-12 flex items-center gap-3">
|
|
30
|
+
<a
|
|
31
|
+
href="https://create.lx2.dev"
|
|
32
|
+
target="_blank"
|
|
33
|
+
rel="noopener noreferrer"
|
|
34
|
+
className="flex items-center rounded-md border border-white px-2 py-1 outline-none focus:opacity-80 active:opacity-70"
|
|
35
|
+
>
|
|
36
|
+
Website
|
|
37
|
+
<svg
|
|
38
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
+
viewBox="0 0 24 24"
|
|
40
|
+
strokeLinecap="round"
|
|
41
|
+
strokeLinejoin="round"
|
|
42
|
+
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
43
|
+
>
|
|
44
|
+
<path d="M7 7h10v10" />
|
|
45
|
+
<path d="M7 17 17 7" />
|
|
46
|
+
</svg>
|
|
47
|
+
</a>
|
|
48
|
+
<a
|
|
49
|
+
href="https://create.lx2.dev/docs"
|
|
50
|
+
target="_blank"
|
|
51
|
+
rel="noopener noreferrer"
|
|
52
|
+
className="flex items-center rounded-md border border-white px-2 py-1 outline-none focus:opacity-80 active:opacity-70"
|
|
53
|
+
>
|
|
54
|
+
Docs
|
|
55
|
+
<svg
|
|
56
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
57
|
+
viewBox="0 0 24 24"
|
|
58
|
+
strokeLinecap="round"
|
|
59
|
+
strokeLinejoin="round"
|
|
60
|
+
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
61
|
+
>
|
|
62
|
+
<path d="M7 7h10v10" />
|
|
63
|
+
<path d="M7 17 17 7" />
|
|
64
|
+
</svg>
|
|
65
|
+
</a>
|
|
66
|
+
<a
|
|
67
|
+
href="https://github.com/SlickYeet/create-lx2-app"
|
|
68
|
+
target="_blank"
|
|
69
|
+
rel="noopener noreferrer"
|
|
70
|
+
className="flex items-center rounded-md border border-white px-2 py-1 outline-none focus:opacity-80 active:opacity-70"
|
|
71
|
+
>
|
|
72
|
+
GitHub
|
|
73
|
+
<svg
|
|
74
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
75
|
+
viewBox="0 0 24 24"
|
|
76
|
+
strokeLinecap="round"
|
|
77
|
+
strokeLinejoin="round"
|
|
78
|
+
className="mb-1.5 size-4 fill-none stroke-current stroke-2"
|
|
79
|
+
>
|
|
80
|
+
<path d="M7 7h10v10" />
|
|
81
|
+
<path d="M7 17 17 7" />
|
|
82
|
+
</svg>
|
|
83
|
+
</a>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div className="flex flex-col items-center gap-1 text-sm text-neutral-600 lg:flex-row lg:gap-2 dark:text-neutral-400">
|
|
88
|
+
<p className="m-0">Get started by editing </p>
|
|
89
|
+
<a
|
|
90
|
+
href={fileURL}
|
|
91
|
+
className="rounded-md bg-neutral-200 px-2 py-1 dark:bg-neutral-800"
|
|
92
|
+
>
|
|
93
|
+
<code>src/app/page.tsx</code>
|
|
94
|
+
</a>
|
|
95
|
+
</div>
|
|
96
|
+
</main>
|
|
97
|
+
)
|
|
98
|
+
}
|