Skip to content

Commit 5800ef7

Browse files
add nextjs example
1 parent 555131e commit 5800ef7

File tree

21 files changed

+8669
-7687
lines changed

21 files changed

+8669
-7687
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ schema.graphql
4646

4747
# macOS
4848
.DS_Store
49+
.env
50+
.env.local

examples/nextjs/.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts

examples/nextjs/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

examples/nextjs/app/favicon.ico

25.3 KB
Binary file not shown.

examples/nextjs/app/globals.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
--font-sans: var(--font-geist-sans);
12+
--font-mono: var(--font-geist-mono);
13+
}
14+
15+
@media (prefers-color-scheme: dark) {
16+
:root {
17+
--background: #0a0a0a;
18+
--foreground: #ededed;
19+
}
20+
}
21+
22+
body {
23+
background: var(--background);
24+
color: var(--foreground);
25+
font-family: Arial, Helvetica, sans-serif;
26+
}

examples/nextjs/app/layout.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { Metadata } from 'next';
2+
import { Geist, Geist_Mono } from 'next/font/google';
3+
import './globals.css';
4+
5+
const geistSans = Geist({
6+
variable: '--font-geist-sans',
7+
subsets: ['latin'],
8+
});
9+
10+
const geistMono = Geist_Mono({
11+
variable: '--font-geist-mono',
12+
subsets: ['latin'],
13+
});
14+
15+
export const metadata: Metadata = {
16+
title: 'Create Next App',
17+
description: 'Generated by create next app',
18+
};
19+
20+
export default function RootLayout({
21+
children,
22+
}: Readonly<{
23+
children: React.ReactNode;
24+
}>) {
25+
return (
26+
<html lang='en'>
27+
<body
28+
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
29+
>
30+
{children}
31+
</body>
32+
</html>
33+
);
34+
}

examples/nextjs/app/page.tsx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import Image from 'next/image';
2+
3+
export default function Home() {
4+
return (
5+
<div className='flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black'>
6+
<main className='flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start'>
7+
<Image
8+
className='dark:invert'
9+
src='/next.svg'
10+
alt='Next.js logo'
11+
width={100}
12+
height={20}
13+
priority
14+
/>
15+
<div className='flex flex-col items-center gap-6 text-center sm:items-start sm:text-left'>
16+
<h1 className='max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50'>
17+
To get started, edit the page.tsx file.
18+
</h1>
19+
<p className='max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400'>
20+
Looking for a starting point or more instructions? Head over to{' '}
21+
<a
22+
href='https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
23+
className='font-medium text-zinc-950 dark:text-zinc-50'
24+
>
25+
Templates
26+
</a>{' '}
27+
or the{' '}
28+
<a
29+
href='https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
30+
className='font-medium text-zinc-950 dark:text-zinc-50'
31+
>
32+
Learning
33+
</a>{' '}
34+
center.
35+
</p>
36+
</div>
37+
<div className='flex flex-col gap-4 text-base font-medium sm:flex-row'>
38+
<a
39+
className='flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]'
40+
href='https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
41+
target='_blank'
42+
rel='noopener noreferrer'
43+
>
44+
<Image
45+
className='dark:invert'
46+
src='/vercel.svg'
47+
alt='Vercel logomark'
48+
width={16}
49+
height={16}
50+
/>
51+
Deploy Now
52+
</a>
53+
<a
54+
className='flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]'
55+
href='https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
56+
target='_blank'
57+
rel='noopener noreferrer'
58+
>
59+
Documentation
60+
</a>
61+
</div>
62+
</main>
63+
</div>
64+
);
65+
}

examples/nextjs/biome.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.2/schema.json",
3+
"extends": ["biome-config-godaddy/biome.json"],
4+
"css": {
5+
"parser": {
6+
"cssModules": true,
7+
"tailwindDirectives": true
8+
}
9+
},
10+
"files": {
11+
"includes": ["**/*", "!!**/src/globals.css"]
12+
},
13+
"linter": {
14+
"rules": {
15+
"correctness": {
16+
"useUniqueElementIds": "off"
17+
}
18+
}
19+
}
20+
}

examples/nextjs/next.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from 'next';
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
6+
7+
export default nextConfig;

examples/nextjs/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "nextjs",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "biome check .",
10+
"lint:fix": "biome check --write --unsafe ."
11+
},
12+
"dependencies": {
13+
"@godaddy/localizations": "workspace:*",
14+
"@godaddy/react": "workspace:*",
15+
"@tanstack/react-query": "^5.66.0",
16+
"@tanstack/react-query-devtools": "^5.76.1",
17+
"react": "19.2.0",
18+
"react-dom": "19.2.0",
19+
"next": "16.0.1"
20+
},
21+
"devDependencies": {
22+
"typescript": "^5",
23+
"@biomejs/biome": "^2",
24+
"@types/node": "^20",
25+
"@types/react": "^19",
26+
"@types/react-dom": "^19",
27+
"@tailwindcss/postcss": "^4",
28+
"biome-config-godaddy": "workspace:*",
29+
"tailwindcss": "^4"
30+
}
31+
}

0 commit comments

Comments
 (0)