create-tnt-stack 0.4.3 → 0.4.4-beta.79d5e73

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 CHANGED
@@ -19,6 +19,7 @@ Simply run `npm create tnt-stack@latest` to get started!
19
19
 
20
20
  [![PRs-Welcome][contribute-image]][contribute-url]
21
21
  [![NPM version][npm-image]][npm-url]
22
+ [![NPM beta version][npm-beta-image]][npm-beta-url]
22
23
  [![Downloads][downloads-image]][npm-url]<br />
23
24
  [![Release][release-image]][release-url]
24
25
  [![Prepelease][prerelease-image]][prerelease-url]
@@ -132,6 +133,9 @@ so you understand the branching strategy and local development environment.
132
133
  [npm-image]:
133
134
  https://img.shields.io/npm/v/create-tnt-stack?color=0b7285&logoColor=0b7285
134
135
  [npm-url]: https://www.npmjs.com/package/create-tnt-stack
136
+ [npm-beta-image]:
137
+ https://img.shields.io/npm/v/create-tnt-stack/beta?color=orange&logoColor=orange
138
+ [npm-beta-url]: https://www.npmjs.com/package/create-tnt-stack
135
139
  [license-image]:
136
140
  https://img.shields.io/github/license/SlickYeet/create-tnt-stack?color=red
137
141
  [license-url]: https://github.com/SlickYeet/create-tnt-stack/blob/main/LICENSE
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ Using: ${A.cyan.bold(s)}
51
51
  `).start();if(T.existsSync(n))if(T.readdirSync(n).length===0)e!=="."&&a.info(`${A.cyan.bold(e)} exists but is empty, continuing...
52
52
  `);else{a.stopAndPersist();let l=await it({message:`${A.redBright.bold("Warning:")} ${A.cyan.bold(e)} already exists and isn't empty. How would you like to proceed?`,choices:[{value:"abort",name:"Abort installation (recommended)"},{value:"clear",name:"Clear the directory and continue installation"},{value:"overwrite",name:"Continue installation and overwrite conflicting files"}],default:"abort"});l==="abort"&&(a.fail("Aborting installation..."),process.exit(1)),await st({message:`Are you sure you want to ${l==="clear"?"clear the directory":"overwrite conflicting files"}`,default:!1})||(a.fail("Aborting installation..."),process.exit(1)),l==="clear"&&(a.info(`Emptying ${A.cyan.bold(e)} and creating tnt app...
53
53
  `),T.emptyDirSync(n))}a.start(),T.copySync(t,n),T.renameSync(W.join(n,"_gitignore"),W.join(n,".gitignore"));let i=e==="."?"App":A.cyan.bold(e);a.succeed(`${i} ${A.green.bold("scaffolded successfully!")}
54
- `)}import v from"path";import B from"fs-extra";function Pe({packages:e,projectDir:n}){let s=v.join(p,"template/packages/src/app/layout"),o=e.payload.inUse,t="base.tsx";o&&(t="with-payload.tsx");let a=v.join(s,t),i=v.join(n,`src/app/${o?"(frontend)":""}/layout.tsx`);B.copySync(a,i)}function xe({packages:e,projectDir:n}){let s=v.join(p,"template/packages/src/app/page"),o=e.payload.inUse,t="base.tsx";o&&(t="with-payload.tsx");let a=v.join(s,t),i=v.join(n,`src/app/${o?"(frontend)":""}/page.tsx`);B.copySync(a,i)}function _e({packages:e,projectDir:n}){let s=v.join(p,"template/packages/src/app/globals"),o=e.payload.inUse,t="base.css";o&&(t="with-payload.css");let a=v.join(s,t),i=v.join(n,`src/app/${o?"(frontend)":""}/globals.css`);B.copySync(a,i)}async function Se({projectName:e,scopedAppName:n,packages:s,noInstall:o,databaseProvider:t}){let a=h(),i=lt.resolve(process.cwd(),e);return await we({projectName:e,projectDir:i,pkgManager:a,scopedAppName:n,noInstall:o,databaseProvider:t}),ke({projectName:e,scopedAppName:n,projectDir:i,pkgManager:a,packages:s,noInstall:o,databaseProvider:t}),Pe({packages:s,projectDir:i}),xe({packages:s,projectDir:i}),_e({packages:s,projectDir:i}),i}import{execSync as z}from"child_process";import V from"path";import{confirm as Ae}from"@inquirer/prompts";import j from"chalk";import{execa as D}from"execa";import Ie from"fs-extra";import pt from"ora";function ct(e){try{return z("git --version",{cwd:e}),!0}catch{return!1}}function K(e){return Ie.existsSync(V.join(e,".git"))}async function H(e){try{return await D("git",["rev-parse","--is-inside-work-tree"],{cwd:e,stdout:"ignore"}),!0}catch{return!1}}function mt(){let n=z("git --version").toString().trim().split(" ")[2],s=n?.split(".")[0],o=n?.split(".")[1];return{major:Number(s),minor:Number(o)}}function dt(){return z("git config --global init.defaultBranch || echo main").toString().trim()}async function Ce(e){if(r.info("Initializing Git..."),!ct(e)){r.warn("Git is not installed. Skipping Git initialization.");return}let n=pt(`Creating a new git repo...
54
+ `)}import v from"path";import B from"fs-extra";function Pe({packages:e,projectDir:n}){let s=v.join(p,"template/packages/src/app/layout"),o=e.payload.inUse,t="base.tsx";o&&(t="base.tsx");let a=v.join(s,t),i=v.join(n,`src/app/${o?"(frontend)":""}/layout.tsx`);B.copySync(a,i)}function xe({packages:e,projectDir:n}){let s=v.join(p,"template/packages/src/app/page"),o=e.payload.inUse,t="base.tsx";o&&(t="with-payload.tsx");let a=v.join(s,t),i=v.join(n,`src/app/${o?"(frontend)":""}/page.tsx`);B.copySync(a,i)}function _e({packages:e,projectDir:n}){let s=v.join(p,"template/packages/src/app/globals"),o=e.payload.inUse,t="base.css";o&&(t="base.css");let a=v.join(s,t),i=v.join(n,`src/app/${o?"(frontend)":""}/globals.css`);B.copySync(a,i)}async function Se({projectName:e,scopedAppName:n,packages:s,noInstall:o,databaseProvider:t}){let a=h(),i=lt.resolve(process.cwd(),e);return await we({projectName:e,projectDir:i,pkgManager:a,scopedAppName:n,noInstall:o,databaseProvider:t}),ke({projectName:e,scopedAppName:n,projectDir:i,pkgManager:a,packages:s,noInstall:o,databaseProvider:t}),Pe({packages:s,projectDir:i}),xe({packages:s,projectDir:i}),_e({packages:s,projectDir:i}),i}import{execSync as z}from"child_process";import V from"path";import{confirm as Ae}from"@inquirer/prompts";import j from"chalk";import{execa as D}from"execa";import Ie from"fs-extra";import pt from"ora";function ct(e){try{return z("git --version",{cwd:e}),!0}catch{return!1}}function K(e){return Ie.existsSync(V.join(e,".git"))}async function H(e){try{return await D("git",["rev-parse","--is-inside-work-tree"],{cwd:e,stdout:"ignore"}),!0}catch{return!1}}function mt(){let n=z("git --version").toString().trim().split(" ")[2],s=n?.split(".")[0],o=n?.split(".")[1];return{major:Number(s),minor:Number(o)}}function dt(){return z("git config --global init.defaultBranch || echo main").toString().trim()}async function Ce(e){if(r.info("Initializing Git..."),!ct(e)){r.warn("Git is not installed. Skipping Git initialization.");return}let n=pt(`Creating a new git repo...
55
55
  `).start(),s=K(e),o=await H(e),t=V.parse(e).name;if(o&&s){if(n.stop(),!await Ae({message:`${j.redBright.bold("Warning:")} Git is already initialized in "${t}". Initializing a new git repository would delete the previous history. Would you like to continue anyways?`,default:!1})){n.info("Skipping Git initialization.");return}Ie.removeSync(V.join(e,".git"))}else if(o&&!s&&(n.stop(),!await Ae({message:`${j.redBright.bold("Warning:")} "${t}" is already in a git worktree. Would you still like to initialize a new git repository in this directory?`,default:!1}))){n.info("Skipping Git initialization.");return}try{let a=dt(),{major:i,minor:l}=mt();i<2||i==2&&l<28?(await D("git",["init"],{cwd:e}),await D("git",["symbolic-ref","HEAD",`refs/heads/${a}`],{cwd:e})):await D("git",["init",`--initial-branch=${a}`],{cwd:e}),await D("git",["add","."],{cwd:e}),n.succeed(`${j.green("Successfully initialized and staged")} ${j.green.bold("git")}
56
56
  `)}catch{n.fail(`${j.bold.red("Failed:")} could not initialize git. Update git to the latest version!
57
57
  `)}}import ft from"chalk";import{execa as Oe}from"execa";import Te from"ora";var Y=async(e,n,s)=>{let{onDataHandle:o,args:t=["install"],stdout:a="pipe"}=s,i=Te(`Running ${n} install...`).start(),l=Oe(n,t,{cwd:e,stdout:a});return await new Promise((d,g)=>{o&&l.stdout?.on("data",o(i)),l.on("error",u=>g(u)),l.on("close",()=>d())}),i},gt=async(e,n)=>{switch(e){case"npm":return await Oe(e,["install"],{cwd:n,stderr:"inherit"}),null;case"pnpm":return Y(n,e,{onDataHandle:s=>o=>{let t=o.toString();t.includes("Progress")&&(s.text=t.includes("|")?t.split(" | ")[1]??"":t)}});case"yarn":return Y(n,e,{onDataHandle:s=>o=>{s.text=o.toString()}});case"bun":return Y(n,e,{stdout:"ignore"})}},je=async({projectDir:e})=>{r.info("Installing dependencies...");let n=h();(await gt(n,e)??Te()).succeed(ft.green(`Successfully installed dependencies!
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
1
  {
2
- "name": "create-tnt-stack",
3
- "version": "0.4.3",
4
- "description": "Create web application with the TNT-Powered stack",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/slickyeet/create-tnt-stack",
9
- "directory": "cli"
10
- },
11
- "keywords": [
12
- "create-tnt-stack",
13
- "tnt-stack",
14
- "typescript",
15
- "next.js",
16
- "tailwind"
17
- ],
18
- "type": "module",
19
- "exports": "./dist/index.js",
20
- "bin": {
21
- "create-tnt-stack": "./dist/index.js"
22
- },
23
- "files": [
24
- "dist",
25
- "template",
26
- "README.md",
27
- "LICENSE",
28
- "package.json"
29
- ],
30
- "engines": {
31
- "node": ">=18"
32
- },
33
- "scripts": {
34
- "dev": "tsup --watch",
35
- "build": "tsup",
36
- "start": "node dist/index.js",
37
- "format": "prettier '**/*.{cjs,mjs,ts,tsx,md,json}' --ignore-path ../.gitignore --ignore-unknown --no-error-on-unmatched-pattern --write",
38
- "format:check": "prettier '**/*.{cjs,mjs,ts,tsx,md,json}' --ignore-path ../.gitignore --ignore-unknown --no-error-on-unmatched-pattern --check",
39
- "typecheck": "tsc",
40
- "clean": "rm -rf dist .turbo node_modules",
41
- "release": "changeset version",
42
- "pub:beta": "bun run build && npm publish --tag beta",
43
- "pub:release": "bun run build && npm publish"
44
- },
45
- "dependencies": {
46
- "@inquirer/prompts": "^7.4.0",
47
- "chalk": "^5.4.1",
48
- "commander": "^13.1.0",
49
- "execa": "^9.5.2",
50
- "fs-extra": "^11.3.0",
51
- "gradient-string": "^3.0.0",
52
- "ora": "^8.2.0",
53
- "sort-package-json": "^3.0.0"
54
- },
55
- "devDependencies": {
56
- "@auth/prisma-adapter": "^2.8.0",
57
- "@eslint/eslintrc": "^3.3.1",
58
- "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
59
- "@payloadcms/db-sqlite": "^3.33.0",
60
- "@payloadcms/db-vercel-postgres": "^3.33.0",
61
- "@payloadcms/next": "^3.33.0",
62
- "@payloadcms/payload-cloud": "^3.33.0",
63
- "@payloadcms/richtext-lexical": "^3.33.0",
64
- "@prisma/client": "^6.5.0",
65
- "@t3-oss/env-nextjs": "^0.12.0",
66
- "@types/fs-extra": "^11.0.4",
67
- "@types/node": "^22",
68
- "@types/react": "^19",
69
- "@types/react-dom": "^19",
70
- "eslint": "^9.22.0",
71
- "eslint-config-next": "^15.2.4",
72
- "graphql": "^16.10.0",
73
- "next": "^15.2.4",
74
- "next-auth": "^4.24.11",
75
- "payload": "^3.33.0",
76
- "prettier": "^3.5.3",
77
- "prettier-plugin-tailwindcss": "^0.6.11",
78
- "prisma": "^6.5.0",
79
- "react": "^19.0.0",
80
- "react-dom": "^19.0.0",
81
- "sharp": "^0.34.1",
82
- "tailwindcss": "^4.0.17",
83
- "tsup": "^8.4.0",
84
- "type-fest": "^4.37.0",
85
- "typescript": "^5.8.2",
86
- "zod": "^3.24.2"
87
- }
2
+ "name": "create-tnt-stack",
3
+ "version": "0.4.4-beta.79d5e73",
4
+ "description": "Create web application with the TNT-Powered stack",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/slickyeet/create-tnt-stack",
9
+ "directory": "cli"
10
+ },
11
+ "keywords": [
12
+ "create-tnt-stack",
13
+ "tnt-stack",
14
+ "typescript",
15
+ "next.js",
16
+ "tailwind"
17
+ ],
18
+ "type": "module",
19
+ "exports": "./dist/index.js",
20
+ "bin": {
21
+ "create-tnt-stack": "./dist/index.js"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "template",
26
+ "README.md",
27
+ "LICENSE",
28
+ "package.json"
29
+ ],
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "scripts": {
34
+ "dev": "tsup --watch",
35
+ "build": "tsup",
36
+ "start": "node dist/index.js",
37
+ "format": "prettier '**/*.{cjs,mjs,ts,tsx,md,json}' --ignore-path ../.gitignore --ignore-unknown --no-error-on-unmatched-pattern --write",
38
+ "format:check": "prettier '**/*.{cjs,mjs,ts,tsx,md,json}' --ignore-path ../.gitignore --ignore-unknown --no-error-on-unmatched-pattern --check",
39
+ "typecheck": "tsc",
40
+ "clean": "rm -rf dist .turbo node_modules",
41
+ "release": "changeset version",
42
+ "pub:beta": "bun run build && npm publish --tag beta",
43
+ "pub:release": "bun run build && npm publish"
44
+ },
45
+ "dependencies": {
46
+ "@inquirer/prompts": "^7.4.0",
47
+ "chalk": "^5.4.1",
48
+ "commander": "^13.1.0",
49
+ "execa": "^9.5.2",
50
+ "fs-extra": "^11.3.0",
51
+ "gradient-string": "^3.0.0",
52
+ "ora": "^8.2.0",
53
+ "sort-package-json": "^3.0.0"
54
+ },
55
+ "devDependencies": {
56
+ "@auth/prisma-adapter": "^2.8.0",
57
+ "@eslint/eslintrc": "^3.3.1",
58
+ "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
59
+ "@payloadcms/db-sqlite": "^3.33.0",
60
+ "@payloadcms/db-vercel-postgres": "^3.33.0",
61
+ "@payloadcms/next": "^3.33.0",
62
+ "@payloadcms/payload-cloud": "^3.33.0",
63
+ "@payloadcms/richtext-lexical": "^3.33.0",
64
+ "@prisma/client": "^6.5.0",
65
+ "@t3-oss/env-nextjs": "^0.12.0",
66
+ "@types/fs-extra": "^11.0.4",
67
+ "@types/node": "^22",
68
+ "@types/react": "^19",
69
+ "@types/react-dom": "^19",
70
+ "eslint": "^9.22.0",
71
+ "eslint-config-next": "^15.2.4",
72
+ "graphql": "^16.10.0",
73
+ "next": "^15.2.4",
74
+ "next-auth": "^4.24.11",
75
+ "payload": "^3.33.0",
76
+ "prettier": "^3.5.3",
77
+ "prettier-plugin-tailwindcss": "^0.6.11",
78
+ "prisma": "^6.5.0",
79
+ "react": "^19.0.0",
80
+ "react-dom": "^19.0.0",
81
+ "sharp": "^0.34.1",
82
+ "tailwindcss": "^4.0.17",
83
+ "tsup": "^8.4.0",
84
+ "type-fest": "^4.37.0",
85
+ "typescript": "^5.8.2",
86
+ "zod": "^3.24.2"
87
+ }
88
88
  }
@@ -14,8 +14,8 @@ const geistMono = Geist_Mono({
14
14
  })
15
15
 
16
16
  export const metadata: Metadata = {
17
- title: "Create Next App",
18
- description: "Generated by create next app",
17
+ title: "Create TNT Stack",
18
+ description: "Generated by create tnt stack",
19
19
  }
20
20
 
21
21
  export default function RootLayout({
@@ -1,105 +1,97 @@
1
- import Link from "next/link"
1
+ import { fileURLToPath } from "url"
2
2
 
3
3
  export default function HomePage() {
4
+ const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
5
+
4
6
  return (
5
- <main className="flex min-h-screen flex-col items-center justify-center px-4 text-center">
6
- {/* Logo */}
7
- <div className="mb-8">
8
- <div className="relative flex h-24 w-24 items-center justify-center">
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">
9
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" />
10
- <svg
11
- xmlns="http://www.w3.org/2000/svg"
12
- width="80"
13
- height="80"
14
- viewBox="0 0 24 24"
15
- fill="none"
16
- stroke="currentColor"
17
- strokeWidth="2"
18
- strokeLinecap="round"
19
- strokeLinejoin="round"
20
- className="rounded-lg bg-gradient-to-r from-purple-500 to-cyan-500 dark:from-purple-800 dark:to-cyan-800"
21
- >
22
- <polyline points="4 17 10 11 4 5" />
23
- <line x1="12" x2="20" y1="19" y2="19" />
24
- </svg>
25
- </div>
26
- </div>
12
+ <source srcSet="https://github.com/SlickYeet/create-tnt-stack/blob/main/docs/public/logo.light.png?raw=true" />
13
+ <img
14
+ src="https://github.com/SlickYeet/create-tnt-stack/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>
27
21
 
28
- <div className="max-w-xl text-balance">
29
- <h1 className="mb-8 bg-gradient-to-r from-purple-500 to-cyan-500 bg-clip-text pb-1.5 text-6xl font-bold tracking-tighter text-transparent md:text-7xl lg:text-8xl">
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">
30
23
  TNT-Powered Next.js App
31
24
  </h1>
32
- <p className="mb-12 text-xl text-neutral-700 md:text-2xl dark:text-neutral-300">
25
+ <p className="mt-4 text-center text-lg text-neutral-700 md:text-xl lg:mt-6 dark:text-neutral-300">
33
26
  Build modern web applications with today&apos;s most popular tools
34
27
  </p>
35
- </div>
36
28
 
37
- <div className="mb-12 flex flex-col gap-10 sm:flex-row">
38
- <Link
39
- href="https://create.tntstack.org"
40
- target="_blank"
41
- referrerPolicy="no-referrer"
42
- className="hover:text-primary relative flex items-center justify-center gap-2 text-lg font-medium"
43
- >
44
- Website
45
- <svg
46
- xmlns="http://www.w3.org/2000/svg"
47
- viewBox="0 0 24 24"
48
- strokeLinecap="round"
49
- strokeLinejoin="round"
50
- className="absolute top-0 -right-4 size-4 fill-none stroke-current stroke-2"
29
+ <div className="mt-12 flex items-center gap-3">
30
+ <a
31
+ href="https://create.tntstack.org"
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"
51
35
  >
52
- <path d="M7 7h10v10" />
53
- <path d="M7 17 17 7" />
54
- </svg>
55
- </Link>
56
-
57
- <Link
58
- href="https://create.tntstack.org/introduction"
59
- target="_blank"
60
- referrerPolicy="no-referrer"
61
- className="hover:text-primary relative flex items-center justify-center gap-2 text-lg font-medium"
62
- >
63
- Docs
64
- <svg
65
- xmlns="http://www.w3.org/2000/svg"
66
- viewBox="0 0 24 24"
67
- strokeLinecap="round"
68
- strokeLinejoin="round"
69
- className="absolute top-0 -right-4 size-4 fill-none stroke-current stroke-2"
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.tntstack.org/introduction"
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"
70
53
  >
71
- <path d="M7 7h10v10" />
72
- <path d="M7 17 17 7" />
73
- </svg>
74
- </Link>
75
-
76
- <Link
77
- href="https://github.com/SlickYeet/create-tnt-stack"
78
- target="_blank"
79
- referrerPolicy="no-referrer"
80
- className="hover:text-primary relative flex items-center justify-center gap-2 text-lg font-medium"
81
- >
82
- GitHub
83
- <svg
84
- xmlns="http://www.w3.org/2000/svg"
85
- viewBox="0 0 24 24"
86
- strokeLinecap="round"
87
- strokeLinejoin="round"
88
- className="absolute top-0 -right-4 size-4 fill-none stroke-current stroke-2"
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-tnt-stack"
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"
89
71
  >
90
- <path d="M7 7h10v10" />
91
- <path d="M7 17 17 7" />
92
- </svg>
93
- </Link>
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>
94
85
  </div>
95
86
 
96
- <div className="mt-16 text-sm text-neutral-600 dark:text-neutral-400">
97
- <p>
98
- Get started by editing{" "}
99
- <code className="rounded-md bg-neutral-200 px-2 py-1 dark:bg-neutral-800">
100
- src/app/page.tsx
101
- </code>
102
- </p>
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>
103
95
  </div>
104
96
  </main>
105
97
  )
@@ -1,7 +1,6 @@
1
1
  import { fileURLToPath } from "url"
2
2
  import config from "@payload-config"
3
3
  import { headers as getHeaders } from "next/headers.js"
4
- import Image from "next/image"
5
4
  import { getPayload } from "payload"
6
5
 
7
6
  import "./globals.css"
@@ -15,44 +14,123 @@ export default async function HomePage() {
15
14
  const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
16
15
 
17
16
  return (
18
- <div className="home">
19
- <div className="content">
20
- <picture>
21
- <source srcSet="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-favicon.svg" />
22
- <Image
23
- alt="Payload Logo"
24
- height={65}
25
- src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-favicon.svg"
17
+ <main className="mx-auto flex h-screen max-w-5xl flex-col items-center justify-between overflow-hidden p-6 sm:p-[45px]">
18
+ <div className="flex grow flex-col items-center justify-center">
19
+ {/* Logo */}
20
+ <picture className="relative">
21
+ <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" />
22
+ <source srcSet="https://github.com/SlickYeet/create-tnt-stack/blob/main/docs/public/logo.light.png?raw=true" />
23
+ <img
24
+ src="https://github.com/SlickYeet/create-tnt-stack/blob/main/docs/public/logo.light.png?raw=true"
25
+ alt="Logo"
26
26
  width={65}
27
+ height={65}
28
+ className="block h-auto max-w-full"
27
29
  />
28
30
  </picture>
29
- {!user && <h1>Welcome to your new project.</h1>}
30
- {user && <h1>Welcome back, {user.email}</h1>}
31
- <div className="links">
31
+
32
+ {!user && (
33
+ <>
34
+ <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">
35
+ TNT-Powered Next.js App
36
+ </h1>
37
+ <p className="mt-4 text-center text-lg text-neutral-700 md:text-xl lg:mt-6 dark:text-neutral-300">
38
+ Build modern web applications with today&apos;s most popular tools
39
+ </p>
40
+ </>
41
+ )}
42
+ {user && (
43
+ <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">
44
+ Welcome back, {user.email}
45
+ </h1>
46
+ )}
47
+
48
+ <div className="mt-12 flex items-center gap-3">
32
49
  <a
33
- className="admin"
34
50
  href={payloadConfig.routes.admin}
35
51
  rel="noopener noreferrer"
36
52
  target="_blank"
53
+ className="rounded-md bg-white px-2 py-1 text-black focus:opacity-80 focus:outline-none active:opacity-70 active:outline-none"
37
54
  >
38
55
  Go to admin panel
39
56
  </a>
40
57
  <a
41
- className="docs"
42
58
  href="https://payloadcms.com/docs"
43
59
  rel="noopener noreferrer"
44
60
  target="_blank"
61
+ className="rounded-md border border-white px-2 py-1 text-white focus:opacity-80 focus:outline-none active:opacity-70 active:outline-none"
62
+ >
63
+ Payload Docs
64
+ </a>
65
+ </div>
66
+
67
+ <div className="mt-12 flex items-center gap-3">
68
+ <a
69
+ href="https://create.tntstack.org"
70
+ target="_blank"
71
+ rel="noopener noreferrer"
72
+ className="flex items-center rounded-md border border-white px-2 py-1 outline-none focus:opacity-80 active:opacity-70"
73
+ >
74
+ Website
75
+ <svg
76
+ xmlns="http://www.w3.org/2000/svg"
77
+ viewBox="0 0 24 24"
78
+ strokeLinecap="round"
79
+ strokeLinejoin="round"
80
+ className="mb-1.5 size-4 fill-none stroke-current stroke-2"
81
+ >
82
+ <path d="M7 7h10v10" />
83
+ <path d="M7 17 17 7" />
84
+ </svg>
85
+ </a>
86
+ <a
87
+ href="https://create.tntstack.org/introduction"
88
+ target="_blank"
89
+ rel="noopener noreferrer"
90
+ className="flex items-center rounded-md border border-white px-2 py-1 outline-none focus:opacity-80 active:opacity-70"
45
91
  >
46
- Documentation
92
+ Docs
93
+ <svg
94
+ xmlns="http://www.w3.org/2000/svg"
95
+ viewBox="0 0 24 24"
96
+ strokeLinecap="round"
97
+ strokeLinejoin="round"
98
+ className="mb-1.5 size-4 fill-none stroke-current stroke-2"
99
+ >
100
+ <path d="M7 7h10v10" />
101
+ <path d="M7 17 17 7" />
102
+ </svg>
103
+ </a>
104
+ <a
105
+ href="https://github.com/SlickYeet/create-tnt-stack"
106
+ target="_blank"
107
+ rel="noopener noreferrer"
108
+ className="flex items-center rounded-md border border-white px-2 py-1 outline-none focus:opacity-80 active:opacity-70"
109
+ >
110
+ GitHub
111
+ <svg
112
+ xmlns="http://www.w3.org/2000/svg"
113
+ viewBox="0 0 24 24"
114
+ strokeLinecap="round"
115
+ strokeLinejoin="round"
116
+ className="mb-1.5 size-4 fill-none stroke-current stroke-2"
117
+ >
118
+ <path d="M7 7h10v10" />
119
+ <path d="M7 17 17 7" />
120
+ </svg>
47
121
  </a>
48
122
  </div>
49
123
  </div>
50
- <div className="footer">
51
- <p>Update this page by editing</p>
52
- <a className="codeLink" href={fileURL}>
53
- <code>app/(frontend)/page.tsx</code>
124
+
125
+ <div className="flex flex-col items-center gap-1 text-sm text-neutral-600 lg:flex-row lg:gap-2 dark:text-neutral-400">
126
+ <p className="m-0">Get started by editing </p>
127
+ <a
128
+ href={fileURL}
129
+ className="rounded-md bg-neutral-200 px-2 py-1 dark:bg-neutral-800"
130
+ >
131
+ <code>src/app/(frontend)/page.tsx</code>
54
132
  </a>
55
133
  </div>
56
- </div>
134
+ </main>
57
135
  )
58
136
  }
@@ -1,166 +0,0 @@
1
- @import "tailwindcss";
2
-
3
- :root {
4
- --font-mono: "Roboto Mono", monospace;
5
- }
6
-
7
- * {
8
- box-sizing: border-box;
9
- }
10
-
11
- html {
12
- font-size: 18px;
13
- line-height: 32px;
14
-
15
- background: rgb(0, 0, 0);
16
- -webkit-font-smoothing: antialiased;
17
- }
18
-
19
- html,
20
- body,
21
- #app {
22
- height: 100%;
23
- }
24
-
25
- body {
26
- font-family: system-ui;
27
- font-size: 18px;
28
- line-height: 32px;
29
-
30
- margin: 0;
31
- color: rgb(1000, 1000, 1000);
32
-
33
- @media (max-width: 1024px) {
34
- font-size: 15px;
35
- line-height: 24px;
36
- }
37
- }
38
-
39
- img {
40
- max-width: 100%;
41
- height: auto;
42
- display: block;
43
- }
44
-
45
- h1 {
46
- margin: 40px 0;
47
- font-size: 64px;
48
- line-height: 70px;
49
- font-weight: bold;
50
-
51
- @media (max-width: 1024px) {
52
- margin: 24px 0;
53
- font-size: 42px;
54
- line-height: 42px;
55
- }
56
-
57
- @media (max-width: 768px) {
58
- font-size: 38px;
59
- line-height: 38px;
60
- }
61
-
62
- @media (max-width: 400px) {
63
- font-size: 32px;
64
- line-height: 32px;
65
- }
66
- }
67
-
68
- p {
69
- margin: 24px 0;
70
-
71
- @media (max-width: 1024px) {
72
- margin: calc(var(--base) * 0.75) 0;
73
- }
74
- }
75
-
76
- a {
77
- color: currentColor;
78
-
79
- &:focus {
80
- opacity: 0.8;
81
- outline: none;
82
- }
83
-
84
- &:active {
85
- opacity: 0.7;
86
- outline: none;
87
- }
88
- }
89
-
90
- svg {
91
- vertical-align: middle;
92
- }
93
-
94
- .home {
95
- display: flex;
96
- flex-direction: column;
97
- justify-content: space-between;
98
- align-items: center;
99
- height: 100vh;
100
- padding: 45px;
101
- max-width: 1024px;
102
- margin: 0 auto;
103
- overflow: hidden;
104
-
105
- @media (max-width: 400px) {
106
- padding: 24px;
107
- }
108
-
109
- .content {
110
- display: flex;
111
- flex-direction: column;
112
- align-items: center;
113
- justify-content: center;
114
- flex-grow: 1;
115
-
116
- h1 {
117
- text-align: center;
118
- }
119
- }
120
-
121
- .links {
122
- display: flex;
123
- align-items: center;
124
- gap: 12px;
125
-
126
- a {
127
- text-decoration: none;
128
- padding: 0.25rem 0.5rem;
129
- border-radius: 4px;
130
- }
131
-
132
- .admin {
133
- color: rgb(0, 0, 0);
134
- background: rgb(1000, 1000, 1000);
135
- border: 1px solid rgb(0, 0, 0);
136
- }
137
-
138
- .docs {
139
- color: rgb(1000, 1000, 1000);
140
- background: rgb(0, 0, 0);
141
- border: 1px solid rgb(1000, 1000, 1000);
142
- }
143
- }
144
-
145
- .footer {
146
- display: flex;
147
- align-items: center;
148
- gap: 8px;
149
-
150
- @media (max-width: 1024px) {
151
- flex-direction: column;
152
- gap: 6px;
153
- }
154
-
155
- p {
156
- margin: 0;
157
- }
158
-
159
- .codeLink {
160
- text-decoration: none;
161
- padding: 0 0.5rem;
162
- background: rgb(60, 60, 60);
163
- border-radius: 4px;
164
- }
165
- }
166
- }
@@ -1,20 +0,0 @@
1
- import type { Metadata } from "next"
2
-
3
- import "./globals.css"
4
-
5
- export const metadata: Metadata = {
6
- description: "A blank template using Payload in a Next.js app.",
7
- title: "Payload Blank Template",
8
- }
9
-
10
- export default function RootLayout({
11
- children,
12
- }: Readonly<{
13
- children: React.ReactNode
14
- }>) {
15
- return (
16
- <html lang="en">
17
- <body className="antialiased">{children}</body>
18
- </html>
19
- )
20
- }