-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
85 changed files
with
27,881 additions
and
8,208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,3 @@ | |
# DATABASE_URL=mysql://USERNAME:[email protected]/DATABASE_NAME?ssl={"rejectUnauthorized":true} | ||
|
||
# @see https://next-auth.js.org/configuration/options#nextauth_url | ||
AUTH_URL='http://localhost:3000' | ||
|
||
# You can generate the secret via 'openssl rand -base64 32' on Unix | ||
# @see https://next-auth.js.org/configuration/options#secret | ||
AUTH_SECRET='supersecret' | ||
|
||
# Preconfigured Discord OAuth provider, works out-of-the-box | ||
# @see https://next-auth.js.org/providers/discord | ||
AUTH_DISCORD_ID='' | ||
AUTH_DISCORD_SECRET='' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,65 @@ | ||
// Importing env files here to validate on build | ||
import "./src/env.mjs"; | ||
import "@acme/auth/env.mjs"; | ||
|
||
import path from "path"; | ||
import { URL } from "url"; | ||
import { withPayload } from "@payloadcms/next-payload"; | ||
|
||
/** @type {import("next").NextConfig} */ | ||
const config = { | ||
reactStrictMode: true, | ||
/** Enables hot reloading for local packages without a build step */ | ||
transpilePackages: ["@acme/api", "@acme/auth", "@acme/db"], | ||
transpilePackages: ["@acme/api", "@acme/db"], | ||
/** We already do linting and typechecking as separate tasks in CI */ | ||
eslint: { ignoreDuringBuilds: true }, | ||
typescript: { ignoreBuildErrors: true }, | ||
}; | ||
|
||
export default config; | ||
const __dirname = new URL(".", import.meta.url).pathname; | ||
|
||
export default withPayload(config, { | ||
// The second argument to `withPayload` | ||
// allows you to specify paths to your Payload dependencies | ||
// and configure the admin route to your Payload CMS. | ||
|
||
// Point to your Payload config (Required) | ||
configPath: path.resolve(__dirname, "./src/payload/payload.config.ts"), | ||
|
||
// Point to custom Payload CSS (optional) | ||
// cssPath: path.resolve(__dirname, "./css/my-custom-payload-styles.css"), | ||
|
||
// Point to your exported, initialized Payload instance (optional, default shown below`) | ||
payloadPath: path.resolve(process.cwd(), "./src/payload/payloadClient.ts"), | ||
|
||
// Set a custom Payload admin route (optional, default is `/admin`) | ||
// NOTE: Read the "Set a custom admin route" section in the payload/next-payload README. | ||
adminRoute: "/admin", | ||
}); | ||
|
||
// next.config.js | ||
// const path = require("path"); | ||
// const { withPayload } = require("@payloadcms/next-payload"); | ||
|
||
// module.exports = withPayload( | ||
// { | ||
// // your Next config here | ||
// }, | ||
// { | ||
// // The second argument to `withPayload` | ||
// // allows you to specify paths to your Payload dependencies | ||
// // and configure the admin route to your Payload CMS. | ||
|
||
// // Point to your Payload config (Required) | ||
// configPath: path.resolve(__dirname, "./payload/payload.config.ts"), | ||
|
||
// // Point to custom Payload CSS (optional) | ||
// cssPath: path.resolve(__dirname, "./css/my-custom-payload-styles.css"), | ||
|
||
// // Point to your exported, initialized Payload instance (optional, default shown below`) | ||
// payloadPath: path.resolve(process.cwd(), "./payload/payloadClient.ts"), | ||
|
||
// // Set a custom Payload admin route (optional, default is `/admin`) | ||
// // NOTE: Read the "Set a custom admin route" section in the payload/next-payload README. | ||
// adminRoute: "/admin", | ||
// } | ||
// ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"use client"; | ||
|
||
import React from "react"; | ||
import Root from "payload/dist/admin/Root"; | ||
|
||
const PayloadAdmin = () => { | ||
const [mounted, setMounted] = React.useState(false); | ||
|
||
React.useEffect(() => { | ||
setMounted(true); | ||
}, []); | ||
|
||
if (!mounted) return null; | ||
|
||
return ( | ||
<div | ||
className=" | ||
bg-orange-400-100 flex | ||
min-h-screen | ||
flex-col | ||
text-gray-900 | ||
" | ||
/> | ||
); | ||
return <Root />; | ||
}; | ||
|
||
export default PayloadAdmin; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,58 @@ | ||
import { Suspense } from "react"; | ||
|
||
import { AuthShowcase } from "./_components/auth-showcase"; | ||
import { | ||
CreatePostForm, | ||
PostCardSkeleton, | ||
PostList, | ||
} from "./_components/posts"; | ||
|
||
export const runtime = "edge"; | ||
|
||
export default function HomePage() { | ||
return ( | ||
<main className="flex h-screen flex-col items-center bg-gradient-to-b from-[#2e026d] to-[#15162c] text-white"> | ||
<div className="container mt-12 flex flex-col items-center justify-center gap-4 py-8"> | ||
<h1 className="text-5xl font-extrabold tracking-tight sm:text-[5rem]"> | ||
Create <span className="text-pink-400">T3</span> Turbo | ||
// Create me a landing page just to showcase my mobile app and qr codes and links to playstore and appstore | ||
<div className="flex min-h-screen flex-col items-center justify-center py-2"> | ||
<main className="flex flex-1 flex-col items-center justify-center px-20 text-center"> | ||
<h1 className="text-6xl font-bold"> | ||
Welcome to <a href="https://nextjs.org">My App</a> | ||
</h1> | ||
<AuthShowcase /> | ||
|
||
<CreatePostForm /> | ||
<div className="h-[40vh] w-full max-w-2xl overflow-y-scroll"> | ||
<Suspense | ||
fallback={ | ||
<div className="flex w-full flex-col gap-4"> | ||
<PostCardSkeleton /> | ||
<PostCardSkeleton /> | ||
<PostCardSkeleton /> | ||
</div> | ||
} | ||
<div className="mt-6 flex max-w-4xl flex-wrap items-center justify-around sm:w-full"> | ||
<a | ||
href="https://nextjs.org/docs" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<h3 className="text-2xl font-bold">Documentation →</h3> | ||
<p className="mt-4 text-xl"> | ||
Find in-depth information about Next.js features and API. | ||
</p> | ||
</a> | ||
|
||
<a | ||
href="https://nextjs.org/learn" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<h3 className="text-2xl font-bold">Learn →</h3> | ||
<p className="mt-4 text-xl"> | ||
Learn about Next.js in an interactive course with quizzes! | ||
</p> | ||
</a> | ||
|
||
<a | ||
href="" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<h3 className="text-2xl font-bold">Examples →</h3> | ||
<p className="mt-4 text-xl"> | ||
Discover and deploy boilerplate example Next.js projects. | ||
</p> | ||
</a> | ||
|
||
<a | ||
href="" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<PostList /> | ||
</Suspense> | ||
<h3 className="text-2xl font-bold">Deploy →</h3> | ||
<p className="mt-4 text-xl"> | ||
Instantly deploy your Next.js site to a public URL with Vercel. | ||
</p> | ||
</a> | ||
</div> | ||
</div> | ||
</main> | ||
</main> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.