Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

Stub Advent of TS platform (#1497)

bautistaaa804605c2456b
diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml
index 04a0a057..d30180ce 100644
--- a/.github/workflows/quality.yml
+++ b/.github/workflows/quality.yml
@@ -95,8 +95,9 @@ jobs:
env:
GITHUB_ID: ' '
GITHUB_SECRET: ' '
+ GITHUB_AOT_ID: ' '
+ GITHUB_AOT_SECRET: ' '
NEXTAUTH_SECRET: 'kGvjABB9ZZsxhYFyxMT4ApohaIvfuNSRMIthI+usjA0='
- NEXTAUTH_URL: http://localhost:3000
- name: Run Playwright tests
run: turbo test:e2e --continue
@@ -104,8 +105,9 @@ jobs:
DATABASE_URL: mysql://dev:dev@localhost/typehero
GITHUB_ID: ' '
GITHUB_SECRET: ' '
+ GITHUB_AOT_ID: ' '
+ GITHUB_AOT_SECRET: ' '
NEXTAUTH_SECRET: 'kGvjABB9ZZsxhYFyxMT4ApohaIvfuNSRMIthI+usjA0='
- NEXTAUTH_URL: http://localhost:3000
- name: Upload report
if: always()
diff --git a/apps/admin/package.json b/apps/admin/package.json
index d91f26f9..85f466df 100644
--- a/apps/admin/package.json
+++ b/apps/admin/package.json
@@ -21,7 +21,7 @@
"@repo/lint": "workspace:*",
"@repo/monaco": "workspace:*",
"@repo/ui": "workspace:*",
- "@tanstack/react-query": "^5.8.1",
+ "@tanstack/react-query": "5.51.21",
"@tanstack/react-table": "^8.9.3",
"clsx": "^2.0.0",
"million": "2.6.0-beta.12",
@@ -35,7 +35,7 @@
"react-select": "^5.7.4",
"tailwindcss": "3.4.7",
"tailwindcss-animate": "^1.0.6",
- "zod": "^3.21.4"
+ "zod": "3.23.3"
},
"devDependencies": {
"@repo/tsconfig": "workspace:*",
diff --git a/apps/admin/src/app/api/auth/[...nextauth]/route.ts b/apps/admin/src/app/api/auth/[...nextauth]/route.ts
index 36cd532e..0a6c906a 100644
--- a/apps/admin/src/app/api/auth/[...nextauth]/route.ts
+++ b/apps/admin/src/app/api/auth/[...nextauth]/route.ts
@@ -1 +1,3 @@
-export { GET, POST } from '@repo/auth/server';
+import { handlers } from '~/server/auth';
+
+export const { GET, POST } = handlers;
diff --git a/apps/admin/src/app/dashboard/images/page.tsx b/apps/admin/src/app/dashboard/images/page.tsx
index dd9c2462..025d0abc 100644
--- a/apps/admin/src/app/dashboard/images/page.tsx
+++ b/apps/admin/src/app/dashboard/images/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { assertAdmin } from '~/utils/auth-guards';
import { ImageList } from './image-list';
diff --git a/apps/admin/src/app/dashboard/reports/[id]/_actions.ts b/apps/admin/src/app/dashboard/reports/[id]/_actions.ts
index 85ec6895..dad03690 100644
--- a/apps/admin/src/app/dashboard/reports/[id]/_actions.ts
+++ b/apps/admin/src/app/dashboard/reports/[id]/_actions.ts
@@ -1,5 +1,5 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { type Prisma, type Report } from '@repo/db/types';
import { cache } from 'react';
diff --git a/apps/admin/src/app/dashboard/reports/[id]/page.tsx b/apps/admin/src/app/dashboard/reports/[id]/page.tsx
index 45f860d8..91617f22 100644
--- a/apps/admin/src/app/dashboard/reports/[id]/page.tsx
+++ b/apps/admin/src/app/dashboard/reports/[id]/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { Alert, AlertDescription, AlertTitle } from '@repo/ui/components/alert';
import { Markdown } from '@repo/ui/components/markdown';
import { Text } from '@repo/ui/components/typography/typography';
diff --git a/apps/admin/src/app/dashboard/reports/_actions.tsx b/apps/admin/src/app/dashboard/reports/_actions.tsx
index f59c08b4..7b8752a5 100644
--- a/apps/admin/src/app/dashboard/reports/_actions.tsx
+++ b/apps/admin/src/app/dashboard/reports/_actions.tsx
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { assertAdmin } from '~/utils/auth-guards';
diff --git a/apps/admin/src/app/dashboard/reports/page.tsx b/apps/admin/src/app/dashboard/reports/page.tsx
index f1136dcd..e5ea9723 100644
--- a/apps/admin/src/app/dashboard/reports/page.tsx
+++ b/apps/admin/src/app/dashboard/reports/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { DataTable } from '@repo/ui/components/data-table';
import { assertAdmin } from '~/utils/auth-guards';
import { getReports } from './_actions';
diff --git a/apps/admin/src/app/dashboard/tracks/[trackId]/_actions/update-track.action.ts b/apps/admin/src/app/dashboard/tracks/[trackId]/_actions/update-track.action.ts
index bd141f32..2f17b8c0 100644
--- a/apps/admin/src/app/dashboard/tracks/[trackId]/_actions/update-track.action.ts
+++ b/apps/admin/src/app/dashboard/tracks/[trackId]/_actions/update-track.action.ts
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { assertAdmin } from '~/utils/auth-guards';
import type { FormSchema } from '../_components/update-track-form';
diff --git a/apps/admin/src/app/dashboard/tracks/[trackId]/page.tsx b/apps/admin/src/app/dashboard/tracks/[trackId]/page.tsx
index 62753cd5..6ec7569f 100644
--- a/apps/admin/src/app/dashboard/tracks/[trackId]/page.tsx
+++ b/apps/admin/src/app/dashboard/tracks/[trackId]/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { assertAdmin } from '~/utils/auth-guards';
import { UpdateTrackForm } from './_components/update-track-form';
diff --git a/apps/admin/src/app/dashboard/tracks/page.tsx b/apps/admin/src/app/dashboard/tracks/page.tsx
index db4c66e4..338db034 100644
--- a/apps/admin/src/app/dashboard/tracks/page.tsx
+++ b/apps/admin/src/app/dashboard/tracks/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { DataTable } from '@repo/ui/components/data-table';
import { assertAdmin } from '~/utils/auth-guards';
import { ActionBar } from './_components/action-bar';
diff --git a/apps/admin/src/app/dashboard/tracks/tracks.actions.ts b/apps/admin/src/app/dashboard/tracks/tracks.actions.ts
index 2916d1d4..193eff29 100644
--- a/apps/admin/src/app/dashboard/tracks/tracks.actions.ts
+++ b/apps/admin/src/app/dashboard/tracks/tracks.actions.ts
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { type Prisma } from '@repo/db/types';
import { assertAdmin } from '~/utils/auth-guards';
diff --git a/apps/admin/src/app/dashboard/users/_actions.ts b/apps/admin/src/app/dashboard/users/_actions.ts
index 8daf9204..070d3463 100644
--- a/apps/admin/src/app/dashboard/users/_actions.ts
+++ b/apps/admin/src/app/dashboard/users/_actions.ts
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { revalidatePath } from 'next/cache';
import { assertAdmin } from '~/utils/auth-guards';
diff --git a/apps/admin/src/app/dashboard/users/page.tsx b/apps/admin/src/app/dashboard/users/page.tsx
index 3d8e3680..adbb2150 100644
--- a/apps/admin/src/app/dashboard/users/page.tsx
+++ b/apps/admin/src/app/dashboard/users/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { DataTable } from '@repo/ui/components/data-table';
import { assertAdmin } from '~/utils/auth-guards';
import { getBannedUsers } from './_actions';
diff --git a/apps/admin/src/app/page.tsx b/apps/admin/src/app/page.tsx
index dda12f43..4dae2d54 100644
--- a/apps/admin/src/app/page.tsx
+++ b/apps/admin/src/app/page.tsx
@@ -1,7 +1,7 @@
-import { auth } from '@repo/auth/server';
import { RoleTypes } from '@repo/db/types';
import { Lock } from '@repo/ui/icons';
import { redirect } from 'next/navigation';
+import { auth } from '~/server/auth';
async function Admin() {
const session = await auth();
diff --git a/apps/admin/src/server/auth.ts b/apps/admin/src/server/auth.ts
new file mode 100644
index 00000000..dce50369
--- /dev/null
+++ b/apps/admin/src/server/auth.ts
@@ -0,0 +1,35 @@
+import NextAuth from '@repo/auth/next-auth';
+
+import { baseNextAuthConfig, createGitHubProvider } from '@repo/auth/server';
+
+if (!process.env.GITHUB_ID) {
+ throw new Error('No GITHUB_ID has been provided.');
+}
+
+if (!process.env.GITHUB_SECRET) {
+ throw new Error('No GITHUB_SECRET has been provided.');
+}
+
+const useSecureCookies = process.env.VERCEL_ENV === 'production';
+const cookiePrefix = useSecureCookies ? '__Secure-' : '';
+const cookieDomain = useSecureCookies ? 'typehero.dev' : undefined;
+
+export const authOptions = {
+ ...baseNextAuthConfig,
+ cookies: {
+ sessionToken: {
+ name: `${cookiePrefix}next-auth.session-token`,
+ options: {
+ httpOnly: true,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ sameSite: 'lax' as any,
+ path: '/',
+ domain: cookieDomain,
+ secure: useSecureCookies,
+ },
+ },
+ },
+ providers: [createGitHubProvider(process.env.GITHUB_ID, process.env.GITHUB_SECRET)],
+};
+
+export const { handlers, auth } = NextAuth(authOptions);
diff --git a/apps/aot/package.json b/apps/aot/package.json
index 10f7e726..f7bda73f 100644
--- a/apps/aot/package.json
+++ b/apps/aot/package.json
@@ -2,6 +2,7 @@
"name": "aot",
"version": "0.1.0",
"private": true,
+ "packageManager": "[email protected]",
"scripts": {
"build": "dotenv -e ../../.env next build",
"clean": "rm -rf .next dist node_modules",
@@ -14,13 +15,28 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
+ "@tanstack/react-query": "5.51.21",
+ "@trpc/client": "^11.0.0-rc.446",
+ "@trpc/react-query": "^11.0.0-rc.446",
+ "@trpc/server": "^11.0.0-rc.446",
+ "@vercel/edge-config": "^0.2.1",
+ "clsx": "^2.0.0",
"next": "14.2.5",
+ "next-themes": "^0.2.1",
"react": "18.2.0",
- "react-dom": "18.2.0"
+ "react-dom": "18.2.0",
+ "server-only": "^0.0.1",
+ "superjson": "^2.2.1",
+ "zod": "3.23.3"
},
"devDependencies": {
+ "@repo/auth": "workspace:*",
+ "@repo/db": "workspace:*",
"@repo/lint": "workspace:*",
+ "@repo/monaco": "workspace:*",
+ "@repo/og-image": "workspace:*",
"@repo/tsconfig": "workspace:*",
+ "@repo/ui": "workspace:*",
"@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/typography": "^0.5.9",
"@types/node": "^20.4.2",
diff --git a/apps/aot/src/app/about/page.tsx b/apps/aot/src/app/about/page.tsx
new file mode 100644
index 00000000..fd09e1e2
--- /dev/null
+++ b/apps/aot/src/app/about/page.tsx
@@ -0,0 +1,4 @@
+// `app/page.tsx` is the UI for the `/` URL
+export default function Page() {
+ return <h1>about</h1>;
+}
diff --git a/apps/aot/src/app/api/auth/[...nextauth]/route.ts b/apps/aot/src/app/api/auth/[...nextauth]/route.ts
new file mode 100644
index 00000000..0a6c906a
--- /dev/null
+++ b/apps/aot/src/app/api/auth/[...nextauth]/route.ts
@@ -0,0 +1,3 @@
+import { handlers } from '~/server/auth';
+
+export const { GET, POST } = handlers;
diff --git a/apps/aot/src/app/api/trpc/[trpc]/route.ts b/apps/aot/src/app/api/trpc/[trpc]/route.ts
new file mode 100644
index 00000000..e88d58c0
--- /dev/null
+++ b/apps/aot/src/app/api/trpc/[trpc]/route.ts
@@ -0,0 +1,31 @@
+import { fetchRequestHandler } from '@trpc/server/adapters/fetch';
+import { type NextRequest } from 'next/server';
+
+import { appRouter } from '~/server/api/root';
+import { createTRPCContext } from '~/server/api/trpc';
+
+/**
+ * This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when
+ * handling a HTTP request (e.g. when you make requests from Client Components).
+ */
+const createContext = async (req: NextRequest) => {
+ return createTRPCContext({
+ headers: req.headers,
+ });
+};
+
+const handler = (req: NextRequest) =>
+ fetchRequestHandler({
+ endpoint: '/api/trpc',
+ req,
+ router: appRouter,
+ createContext: () => createContext(req),
+ onError:
+ process.env.NODE_ENV === 'development'
+ ? ({ path, error }) => {
+ console.error(`❌ tRPC failed on ${path ?? '<no-path>'}: ${error.message}`);
+ }
+ : undefined,
+ });
+
+export { handler as GET, handler as POST };
diff --git a/apps/aot/src/app/coming-soon.tsx b/apps/aot/src/app/coming-soon.tsx
new file mode 100644
index 00000000..975c1133
--- /dev/null
+++ b/apps/aot/src/app/coming-soon.tsx
@@ -0,0 +1,55 @@
+// import { CodeXml, ExternalLink } from 'lucide-react';
+
+export function ComingSoon() {
+ return (
+ <main className="flex min-h-screen flex-col items-center justify-center gap-8 p-8">
+ {/* bottom light */}
+ <div className="fixed bottom-0 h-12 w-screen translate-y-1/2 animate-pulse rounded-[100%] bg-white/50 blur-3xl" />
+ {/* background timer */}
+ <div className="absolute left-1/2 top-1/2 grid -translate-x-1/2 -translate-y-1/2 grid-cols-4 opacity-30">
+ <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
+ <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
+ 0
+ </div>
+ </div>
+ <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
+ <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
+ 69
+ </div>
+ </div>
+ <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
+ <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
+ 69
+ </div>
+ </div>
+ <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
+ <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
+ 69
+ </div>
+ </div>
+ </div>
+
+ <div className="z-10 rounded-full bg-gradient-to-r from-blue-400 to-blue-600 p-[1px]">
+ <div className="rounded-full bg-black">
+ <div className="rounded-full bg-gradient-to-r from-blue-300/40 to-blue-500/40 px-3 py-1">
+ <div className="flex items-center gap-2 bg-gradient-to-r from-blue-300 to-blue-500 bg-clip-text text-transparent">
+ {/* <CodeXml className="h-4 w-4 stroke-blue-300" /> */}
+ AoT 2024
+ </div>
+ </div>
+ </div>
+ </div>
+ <h1 className="z-10 my-12 text-4xl sm:text-6xl">Coming Soon</h1>
+ <p className="z-10 font-mono text-lg font-light text-white/50">
+ Practice on{' '}
+ <a
+ href="https://typehero.dev"
+ className="group inline-flex items-center gap-2 duration-300 hover:text-blue-400 hover:underline"
+ >
+ TypeHero.dev
+ {/* <ExternalLink className="h-4 w-4 opacity-0 -translate-x-1 translate-y-1 scale-75 duration-300 group-hover:opacity-100 group-hover:translate-x-0 group-hover:translate-y-0 group-hover:scale-100" /> */}
+ </a>
+ </p>
+ </main>
+ );
+}
diff --git a/apps/aot/src/app/events/page.tsx b/apps/aot/src/app/events/page.tsx
new file mode 100644
index 00000000..c2e64531
--- /dev/null
+++ b/apps/aot/src/app/events/page.tsx
@@ -0,0 +1,13 @@
+import { api } from '~/trpc/server';
+
+export default async function Page() {
+ const events = await api.event.getAll();
+ return (
+ <div>
+ {events.map((event) => {
+ const name = event.slug.split('-').at(-1);
+ return <div key={event.id}>{name}</div>;
+ })}
+ </div>
+ );
+}
diff --git a/apps/aot/src/app/layout.tsx b/apps/aot/src/app/layout.tsx
index 56a81126..f46f390d 100644
--- a/apps/aot/src/app/layout.tsx
+++ b/apps/aot/src/app/layout.tsx
@@ -1,22 +1,44 @@
+import './globals.css';
+
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
-import './globals.css';
+import { Navigation } from '~/components/navigation';
+import { Providers } from './providers';
+import { getAllFlags } from '~/utils/feature-flag';
+import { ComingSoon } from './coming-soon';
const inter = Inter({ subsets: ['latin'] });
export const metadata: Metadata = {
- title: 'Create Next App',
- description: 'Generated by create next app',
+ title: 'Advent of TypeScript',
};
-export default function RootLayout({
+export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
+ const { enableAotPlatform } = await getAllFlags();
+
+ if (!enableAotPlatform) {
+ return (
+ <html lang="en" className="bg-black text-white">
+ <body className={inter.className}>
+ <main>
+ <ComingSoon />
+ </main>
+ </body>
+ </html>
+ );
+ }
return (
<html lang="en" className="bg-black text-white">
- <body className={inter.className}>{children}</body>
+ <body className={inter.className}>
+ <Providers>
+ <Navigation />
+ <main>{children}</main>
+ </Providers>
+ </body>
</html>
);
}
diff --git a/apps/aot/src/app/leaderboard/page.tsx b/apps/aot/src/app/leaderboard/page.tsx
new file mode 100644
index 00000000..4841ad99
--- /dev/null
+++ b/apps/aot/src/app/leaderboard/page.tsx
@@ -0,0 +1,4 @@
+// `app/page.tsx` is the UI for the `/` URL
+export default function Page() {
+ return <h1>leaderboard</h1>;
+}
diff --git a/apps/aot/src/app/page.tsx b/apps/aot/src/app/page.tsx
index 20e264d1..d6c46610 100644
--- a/apps/aot/src/app/page.tsx
+++ b/apps/aot/src/app/page.tsx
@@ -1,55 +1,5 @@
// import { CodeXml, ExternalLink } from 'lucide-react';
export default function Home() {
- return (
- <main className="flex min-h-screen flex-col items-center justify-center gap-8 p-8">
- {/* bottom light */}
- <div className="fixed bottom-0 h-12 w-screen translate-y-1/2 animate-pulse rounded-[100%] bg-white/50 blur-3xl" />
- {/* background timer */}
- <div className="absolute left-1/2 top-1/2 grid -translate-x-1/2 -translate-y-1/2 grid-cols-4 opacity-30">
- <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
- <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
- 0
- </div>
- </div>
- <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
- <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
- 69
- </div>
- </div>
- <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
- <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
- 69
- </div>
- </div>
- <div className="h-48 w-36 rounded-3xl bg-white/30 p-1">
- <div className="grid h-full w-full place-items-center rounded-2xl bg-gradient-to-b from-white/30 to-black/30 text-7xl font-black text-neutral-300">
- 69
- </div>
- </div>
- </div>
-
- <div className="z-10 rounded-full bg-gradient-to-r from-blue-400 to-blue-600 p-[1px]">
- <div className="rounded-full bg-black">
- <div className="rounded-full bg-gradient-to-r from-blue-300/40 to-blue-500/40 px-3 py-1">
- <div className="flex items-center gap-2 bg-gradient-to-r from-blue-300 to-blue-500 bg-clip-text text-transparent">
- {/* <CodeXml className="h-4 w-4 stroke-blue-300" /> */}
- AoT 2024
- </div>
- </div>
- </div>
- </div>
- <h1 className="z-10 my-12 text-4xl sm:text-6xl">Coming Soon</h1>
- <p className="z-10 font-mono text-lg font-light text-white/50">
- Practice on{' '}
- <a
- href="https://typehero.dev"
- className="group inline-flex items-center gap-2 duration-300 hover:text-blue-400 hover:underline"
- >
- TypeHero.dev
- {/* <ExternalLink className="h-4 w-4 opacity-0 -translate-x-1 translate-y-1 scale-75 duration-300 group-hover:opacity-100 group-hover:translate-x-0 group-hover:translate-y-0 group-hover:scale-100" /> */}
- </a>
- </p>
- </main>
- );
+ return <div>Some landing page</div>;
}
diff --git a/apps/aot/src/app/providers.tsx b/apps/aot/src/app/providers.tsx
new file mode 100644
index 00000000..6c913ae1
--- /dev/null
+++ b/apps/aot/src/app/providers.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import { SessionProvider } from '@repo/auth/react';
+import { TooltipProvider } from '@repo/ui/components/tooltip';
+import { ThemeProvider } from 'next-themes';
+import { TRPCReactProvider } from '~/trpc/react';
+
+interface Props {
+ children: React.ReactNode;
+}
+
+export function Providers({ children }: Props) {
+ return (
+ <SessionProvider>
+ <TRPCReactProvider>
+ <ThemeProvider attribute="class">
+ <TooltipProvider>{children}</TooltipProvider>
+ </ThemeProvider>
+ </TRPCReactProvider>
+ </SessionProvider>
+ );
+}
diff --git a/apps/aot/src/components/navigation/index.tsx b/apps/aot/src/components/navigation/index.tsx
new file mode 100644
index 00000000..836ed058
--- /dev/null
+++ b/apps/aot/src/components/navigation/index.tsx
@@ -0,0 +1,152 @@
+'use client';
+
+import { signIn, signOut, useSession } from '@repo/auth/react';
+import { Button } from '@repo/ui/components/button';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuTrigger,
+} from '@repo/ui/components/dropdown-menu';
+import { Loader2, LogIn, Moon, Sun, User } from '@repo/ui/icons';
+import { useTheme } from 'next-themes';
+import { useEffect, useState } from 'react';
+import { NavLink } from './nav-link';
+
+export function Navigation() {
+ return (
+ <header className="z-0 w-full">
+ <nav className="flex h-14 items-center px-4">
+ <div className="flex w-full items-center justify-between">
+ <div className="relative flex gap-3">
+ <a className="flex items-center space-x-2 duration-300" href="/">
+ <svg
+ className="h-8 w-8 rounded-md bg-[#3178C6] p-[2px]"
+ viewBox="0 0 38 38"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <rect width="38" height="38" rx="4.5" fill="#3178C6" />
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ d="M15.6947 20.9344H20V18H8V20.9344H12.2842V34H15.6947V20.9344Z"
+ fill="white"
+ />
+ <path
+ d="M22 34V18H25.4511V24.6309H30.5405V18H34V34H30.5405V27.3458H25.4511V34H22Z"
+ fill="white"
+ />
+ </svg>
+
+ <span className="font-bold leading-3">
+ type
+ <br />
+ hero
+ </span>
+ </a>
+ </div>
+ <div className="items-center md:ml-4 md:flex md:gap-4">
+ <NavLink title="About" href="/about" />
+ <NavLink title="Events" href="/events" />
+ <NavLink title="Leaderboard" href="/leaderboard" />
+ </div>
+ <div className="flex">
+ <div className="flex items-center justify-end gap-2">
+ <ThemeButton />
+ <LoginButton />
+ </div>
+ </div>
+ </div>
+ </nav>
+ </header>
+ );
+}
+
+function ThemeButton() {
+ const [mounted, setMounted] = useState(false);
+ const { setTheme, resolvedTheme } = useTheme();
+
+ useEffect(() => {
+ setMounted(true);
+ }, []);
+
+ return (
+ <>
+ {mounted ? (
+ <button
+ aria-label="theme button"
+ className="focus:bg-accent rounded-lg p-2 duration-300 focus:outline-none"
+ onClick={() => {
+ setTheme(resolvedTheme === 'dark' ? 'light' : 'dark');
+ }}
+ type="button"
+ >
+ {resolvedTheme === 'dark' && <Moon aria-hidden="true" className="h-5 w-5" />}
+ {resolvedTheme === 'light' && <Sun aria-hidden="true" className="h-5 w-5" />}
+ </button>
+ ) : null}
+ </>
+ );
+}
+
+function LoginButton() {
+ const [loading, setLoading] = useState(false);
+ const { data: session, status } = useSession();
+
+ // NOTE: 1. loading == true -> 2. signIn() -> 3. session status == 'loading' (loading == false)
+ const handleSignIn = async () => {
+ try {
+ setLoading(true);
+ // page reloads after sign in, so no need to setLoading(false), othersiwe ugly visual glitch
+ await signIn('github', { redirect: false });
+ } catch (error) {
+ // only set loading to false if there was an error and page didn't reload after sign in
+ setLoading(false);
+ }
+ };
+ const handleSignOut = async () => {
+ await signOut({ redirect: false });
+ // whatever
+ window.location.reload();
+ };
+
+ return session ? (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <button
+ aria-label="profile button"
+ className="focus:bg-accent rounded-lg p-2 duration-300 focus:outline-none"
+ >
+ <User className="h-5 w-5" />
+ </button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ align="end"
+ className="mt-[0.33rem] w-56 rounded-xl bg-white/50 backdrop-blur-sm dark:bg-neutral-950/50"
+ >
+ <Button
+ className="h-8 w-full justify-start rounded-b-lg rounded-t-sm bg-opacity-50 px-2 text-red-500 hover:bg-red-500/20 hover:text-red-500"
+ onClick={handleSignOut}
+ variant="ghost"
+ >
+ <span className="text-red-500">Log out</span>
+ </Button>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ ) : (
+ <Button
+ className="focus:bg-accent w-20 rounded-lg bg-transparent p-2 text-black duration-300 hover:bg-gray-200 focus:outline-none dark:text-white hover:dark:bg-gray-800"
+ disabled={loading || status === 'loading'}
+ onClick={handleSignIn}
+ >
+ {loading || status === 'loading' ? (
+ <Loader2 className="h-5 w-5 animate-spin" />
+ ) : (
+ <div className="flex items-center space-x-2">
+ <LogIn className="h-5 w-5" />
+ <span className="dark:text-white">Login</span>
+ </div>
+ )}
+ </Button>
+ );
+}
diff --git a/apps/aot/src/components/navigation/nav-link.tsx b/apps/aot/src/components/navigation/nav-link.tsx
new file mode 100644
index 00000000..aea77a03
--- /dev/null
+++ b/apps/aot/src/components/navigation/nav-link.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import clsx from 'clsx';
+import Link from 'next/link';
+import { usePathname } from 'next/navigation';
+
+export function NavLink({ href, title }: { href: string; title: string }) {
+ const pathname = usePathname();
+ return (
+ <Link href={href}>
+ <div
+ className={clsx('hover:text-foreground text-foreground/80 transition-colors', {
+ '!text-foreground': pathname === href,
+ })}
+ >
+ {title}
+ </div>
+ </Link>
+ );
+}
diff --git a/apps/aot/src/server/api/root.ts b/apps/aot/src/server/api/root.ts
new file mode 100644
index 00000000..06c7d9df
--- /dev/null
+++ b/apps/aot/src/server/api/root.ts
@@ -0,0 +1,23 @@
+import { createCallerFactory, createTRPCRouter } from '~/server/api/trpc';
+import { eventRouter } from './routers/event';
+
+/**
+ * This is the primary router for your server.
+ *
+ * All routers added in /api/routers should be manually added here.
+ */
+export const appRouter = createTRPCRouter({
+ event: eventRouter,
+});
+
+// export type definition of API
+export type AppRouter = typeof appRouter;
+
+/**
+ * Create a server-side caller for the tRPC API.
+ * @example
+ * const trpc = createCaller(createContext);
+ * const res = await trpc.post.all();
+ * ^? Post[]
+ */
+export const createCaller = createCallerFactory(appRouter);
diff --git a/apps/aot/src/server/api/routers/challenge.ts b/apps/aot/src/server/api/routers/challenge.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/apps/aot/src/server/api/routers/event.ts b/apps/aot/src/server/api/routers/event.ts
new file mode 100644
index 00000000..9d99f666
--- /dev/null
+++ b/apps/aot/src/server/api/routers/event.ts
@@ -0,0 +1,15 @@
+import { createTRPCRouter, publicProcedure } from '~/server/api/trpc';
+
+const AOT_TRACKS = ['advent-of-typescript-2023'];
+export const eventRouter = createTRPCRouter({
+ getAll: publicProcedure.query(async ({ ctx }) => {
+ const aotEvents = await ctx.db.track.findMany({
+ where: {
+ slug: {
+ in: AOT_TRACKS,
+ },
+ },
+ });
+ return aotEvents;
+ }),
+});
diff --git a/apps/aot/src/server/api/trpc.ts b/apps/aot/src/server/api/trpc.ts
new file mode 100644
index 00000000..a0264fd5
--- /dev/null
+++ b/apps/aot/src/server/api/trpc.ts
@@ -0,0 +1,98 @@
+/**
+ * YOU PROBABLY DON'T NEED TO EDIT THIS FILE, UNLESS:
+ * 1. You want to modify request context (see Part 1).
+ * 2. You want to create a new middleware or type of procedure (see Part 3).
+ *
+ * TL;DR - This is where all the tRPC server stuff is created and plugged in. The pieces you will
+ * need to use are documented accordingly near the end.
+ */
+
+import { initTRPC, TRPCError } from '@trpc/server';
+import superjson from 'superjson';
+import { ZodError } from 'zod';
+
+import { auth } from '~/server/auth';
+import { prisma } from '@repo/db';
+
+/**
+ * 1. CONTEXT
+ *
+ * This section defines the "contexts" that are available in the backend API.
+ *
+ * These allow you to access things when processing a request, like the database, the session, etc.
+ *
+ * This helper generates the "internals" for a tRPC context. The API handler and RSC clients each
+ * wrap this and provides the required context.
+ *
+ * @see https://trpc.io/docs/server/context
+ */
+export const createTRPCContext = async (opts: { headers: Headers }) => {
+ const session = await auth();
+ return {
+ db: prisma,
+ session,
+ ...opts,
+ };
+};
+
+/**
+ * 2. INITIALIZATION
+ *
+ * This is where the tRPC API is initialized, connecting the context and transformer. We also parse
+ * ZodErrors so that you get typesafety on the frontend if your procedure fails due to validation
+ * errors on the backend.
+ */
+const t = initTRPC.context<typeof createTRPCContext>().create({
+ transformer: superjson,
+ errorFormatter({ shape, error }) {
+ return {
+ ...shape,
+ data: {
+ ...shape.data,
+ zodError: error.cause instanceof ZodError ? error.cause.flatten() : null,
+ },
+ };
+ },
+});
+
+/**
+ * Create a server-side caller.
+ *
+ * @see https://trpc.io/docs/server/server-side-calls
+ */
+export const createCallerFactory = t.createCallerFactory;
+
+/**
+ * 3. ROUTER & PROCEDURE (THE IMPORTANT BIT)
+ *
+ * These are the pieces you use to build your tRPC API. You should import these a lot in the
+ * "/src/server/api/routers" directory.
+ */
+
+/**
+ * This is how you create new routers and sub-routers in your tRPC API.
+ *
+ * @see https://trpc.io/docs/router
+ */
+export const createTRPCRouter = t.router;
+export const publicProcedure = t.procedure;
+
+/**
+ * Protected (authenticated) procedure
+ *
+ * If you want a query or mutation to ONLY be accessible to logged in users, use this. It verifies
+ * the session is valid and guarantees `ctx.session.user` is not null.
+ *
+ * @see https://trpc.io/docs/procedures
+ */
+export const protectedProcedure = t.procedure.use(({ ctx, next }) => {
+ if (!ctx.session || !ctx.session.user) {
+ throw new TRPCError({ code: 'UNAUTHORIZED' });
+ }
+ return next({
+ ctx: {
+ // infers the `session` as non-nullable
+ session: { ...ctx.session, user: ctx.session.user },
+ },
+ });
+});
diff --git a/apps/aot/src/server/auth.ts b/apps/aot/src/server/auth.ts
new file mode 100644
index 00000000..9b10f816
--- /dev/null
+++ b/apps/aot/src/server/auth.ts
@@ -0,0 +1,18 @@
+import NextAuth from '@repo/auth/next-auth';
+
+import { baseNextAuthConfig, createGitHubProvider } from '@repo/auth/server';
+
+if (!process.env.GITHUB_AOT_ID) {
+ throw new Error('No GITHUB_AOT_ID has been provided.');
+}
+
+if (!process.env.GITHUB_AOT_SECRET) {
+ throw new Error('No GITHUB__AOT_SECRET has been provided.');
+}
+
+export const authOptions = {
+ ...baseNextAuthConfig,
+ providers: [createGitHubProvider(process.env.GITHUB_AOT_ID, process.env.GITHUB_AOT_SECRET)],
+};
+
+export const { handlers, auth } = NextAuth(authOptions);
diff --git a/apps/aot/src/trpc/query-client.ts b/apps/aot/src/trpc/query-client.ts
new file mode 100644
index 00000000..5a08288d
--- /dev/null
+++ b/apps/aot/src/trpc/query-client.ts
@@ -0,0 +1,21 @@
+import { defaultShouldDehydrateQuery, QueryClient } from '@tanstack/react-query';
+import { default as SuperJSON } from 'superjson';
+
+export const createQueryClient = () =>
+ new QueryClient({
+ defaultOptions: {
+ queries: {
+ // With SSR, we usually want to set some default staleTime
+ // above 0 to avoid refetching immediately on the client
+ staleTime: 30 * 1000,
+ },
+ dehydrate: {
+ serializeData: SuperJSON.serialize,
+ shouldDehydrateQuery: (query) =>
+ defaultShouldDehydrateQuery(query) || query.state.status === 'pending',
+ },
+ hydrate: {
+ deserializeData: SuperJSON.deserialize,
+ },
+ },
+ });
diff --git a/apps/aot/src/trpc/react.tsx b/apps/aot/src/trpc/react.tsx
new file mode 100644
index 00000000..96cbfa63
--- /dev/null
+++ b/apps/aot/src/trpc/react.tsx
@@ -0,0 +1,76 @@
+'use client';
+
+import { QueryClientProvider, type QueryClient } from '@tanstack/react-query';
+import { loggerLink, unstable_httpBatchStreamLink } from '@trpc/client';
+import { createTRPCReact } from '@trpc/react-query';
+import { type inferRouterInputs, type inferRouterOutputs } from '@trpc/server';
+import { useState } from 'react';
+import { default as SuperJSON } from 'superjson';
+
+import { type AppRouter } from '~/server/api/root';
+import { createQueryClient } from './query-client';
+
+let clientQueryClientSingleton: QueryClient | undefined;
+const getQueryClient = () => {
+ if (typeof window === 'undefined') {
+ // Server: always make a new query client
+ return createQueryClient();
+ }
+ // Browser: use singleton pattern to keep the same query client
+ return (clientQueryClientSingleton ??= createQueryClient());
+};
+
+export const api = createTRPCReact<AppRouter>();
+
+/**
+ * Inference helper for inputs.
+ *
+ * @example type HelloInput = RouterInputs['example']['hello']
+ */
+export type RouterInputs = inferRouterInputs<AppRouter>;
+
+/**
+ * Inference helper for outputs.
+ *
+ * @example type HelloOutput = RouterOutputs['example']['hello']
+ */
+export type RouterOutputs = inferRouterOutputs<AppRouter>;
+
+export function TRPCReactProvider(props: { children: React.ReactNode }) {
+ const queryClient = getQueryClient();
+
+ const [trpcClient] = useState(() =>
+ api.createClient({
+ links: [
+ loggerLink({
+ enabled: (op) =>
+ process.env.NODE_ENV === 'development' ||
+ (op.direction === 'down' && op.result instanceof Error),
+ }),
+ unstable_httpBatchStreamLink({
+ transformer: SuperJSON,
+ url: `${getBaseUrl()}/api/trpc`,
+ headers: () => {
+ const headers = new Headers();
+ headers.set('x-trpc-source', 'nextjs-react');
+ return headers;
+ },
+ }),
+ ],
+ }),
+ );
+
+ return (
+ <QueryClientProvider client={queryClient}>
+ <api.Provider client={trpcClient} queryClient={queryClient}>
+ {props.children}
+ </api.Provider>
+ </QueryClientProvider>
+ );
+}
+
+function getBaseUrl() {
+ if (typeof window !== 'undefined') return window.location.origin;
+ if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
+ return `http://localhost:${process.env.PORT ?? 3000}`;
+}
diff --git a/apps/aot/src/trpc/server.ts b/apps/aot/src/trpc/server.ts
new file mode 100644
index 00000000..d02a95db
--- /dev/null
+++ b/apps/aot/src/trpc/server.ts
@@ -0,0 +1,30 @@
+import 'server-only';
+
+import { createHydrationHelpers } from '@trpc/react-query/rsc';
+import { headers } from 'next/headers';
+import { cache } from 'react';
+
+import { createCaller, type AppRouter } from '~/server/api/root';
+import { createTRPCContext } from '~/server/api/trpc';
+import { createQueryClient } from './query-client';
+
+/**
+ * This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when
+ * handling a tRPC call from a React Server Component.
+ */
+const createContext = cache(() => {
+ const heads = new Headers(headers());
+ heads.set('x-trpc-source', 'rsc');
+
+ return createTRPCContext({
+ headers: heads,
+ });
+});
+
+const getQueryClient = cache(createQueryClient);
+const caller = createCaller(createContext);
+
+export const { trpc: api, HydrateClient } = createHydrationHelpers<AppRouter>(
+ caller,
+ getQueryClient,
+);
diff --git a/apps/aot/src/utils/feature-flag.ts b/apps/aot/src/utils/feature-flag.ts
new file mode 100644
index 00000000..d3f03b98
--- /dev/null
+++ b/apps/aot/src/utils/feature-flag.ts
@@ -0,0 +1,18 @@
+import { createClient } from '@vercel/edge-config';
+
+export const mockFlags = {
+ enableLogin: true,
+ enableExplore: true,
+ enableTracks: true,
+ enableEarlyAccess: false,
+ enableInChallengeTrack: true,
+ enableHolidayEvent: true,
+ enableAotPlatform: true,
+};
+
+export async function getAllFlags() {
+ const allFeatureFlag = process.env.EDGE_CONFIG
+ ? await createClient(process.env.EDGE_CONFIG).getAll<typeof mockFlags>()
+ : mockFlags;
+ return allFeatureFlag;
+}
diff --git a/apps/og-image/package.json b/apps/og-image/package.json
index 3d279c9d..348c8333 100644
--- a/apps/og-image/package.json
+++ b/apps/og-image/package.json
@@ -25,7 +25,7 @@
"next": "14.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
- "zod": "^3.21.4"
+ "zod": "3.23.3"
},
"devDependencies": {
"@repo/lint": "workspace:*",
diff --git a/apps/web/package.json b/apps/web/package.json
index 6d5ec0c6..67e4afc4 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -35,8 +35,8 @@
"@repo/ui": "workspace:*",
"@sentry/nextjs": "^7.73.0",
"@t3-oss/env-nextjs": "^0.6.0",
- "@tanstack/react-query": "^5.8.1",
- "@tanstack/react-query-devtools": "^5.8.1",
+ "@tanstack/react-query": "5.51.21",
+ "@tanstack/react-query-devtools": "5.51.21",
"@tanstack/react-table": "^8.9.3",
"@uiw/react-md-editor": "^3.23.3",
"@uploadthing/react": "^6.2.2",
@@ -76,7 +76,7 @@
"unified": "^10.1.2",
"unist-util-visit": "^5.0.0",
"uploadthing": "6.3.1",
- "zod": "^3.21.4",
+ "zod": "3.23.3",
"zustand": "^4.3.9"
},
"devDependencies": {
diff --git a/apps/web/src/app/(email)/newsletter/_components/index.tsx b/apps/web/src/app/(email)/newsletter/_components/index.tsx
index d8a8e12c..b24507c3 100644
--- a/apps/web/src/app/(email)/newsletter/_components/index.tsx
+++ b/apps/web/src/app/(email)/newsletter/_components/index.tsx
@@ -12,7 +12,7 @@ export function Newsletter({ params: { locale } }: { params: { locale: string }
/>
<div className="container grid h-full place-items-center">
<div className="mx-auto flex max-w-[700px] flex-col items-center justify-center gap-8 text-center">
- <h1 className="text-3xl font-bold text-neutral-950 dark:text-neutral-50 md:text-5xl">
+ <h1 className="text-3xl font-bold text-neutral-950 md:text-5xl dark:text-neutral-50">
<Balancer>
Subscribe to be part of the{' '}
<span className="bg-gradient-to-r from-[#3178c6] to-black bg-clip-text font-black text-transparent dark:from-blue-400 dark:to-emerald-400">
diff --git a/apps/web/src/app/(playgrounds)/challenge-playground/layout.tsx b/apps/web/src/app/(playgrounds)/challenge-playground/layout.tsx
index 9c5d676f..faddaea7 100644
--- a/apps/web/src/app/(playgrounds)/challenge-playground/layout.tsx
+++ b/apps/web/src/app/(playgrounds)/challenge-playground/layout.tsx
@@ -2,7 +2,7 @@ import { ForceRenderUntilClient } from '@repo/ui/components/force-render-until-c
import { isAdminOrModerator } from '~/utils/auth-guards';
import { redirect } from 'next/navigation';
import { ChallengePlaygroundLayoutWrapper } from './challenge-playground-layout-wrapper';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
export default async function LayoutData({ children }: { children: React.ReactNode }) {
const session = await auth();
diff --git a/apps/web/src/app/(playgrounds)/challenge-playground/page.tsx b/apps/web/src/app/(playgrounds)/challenge-playground/page.tsx
index 4aeffdf1..172012c5 100644
--- a/apps/web/src/app/(playgrounds)/challenge-playground/page.tsx
+++ b/apps/web/src/app/(playgrounds)/challenge-playground/page.tsx
@@ -1,7 +1,7 @@
import { notFound } from 'next/navigation';
import { isAdminOrModerator } from '~/utils/auth-guards';
import { Description } from './description';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
export default async function ChallengePlaygroundPage() {
const session = await auth();
diff --git a/apps/web/src/app/(profile)/[username]/_components/dashboard/index.tsx b/apps/web/src/app/(profile)/[username]/_components/dashboard/index.tsx
index 91e22cd1..fcdf5d03 100644
--- a/apps/web/src/app/(profile)/[username]/_components/dashboard/index.tsx
+++ b/apps/web/src/app/(profile)/[username]/_components/dashboard/index.tsx
@@ -118,7 +118,7 @@ export function Dashboard({ user, isOwnProfile, badges, children }: Props) {
)}
<div className="flex gap-4 md:w-full md:flex-col">
<VerticalTabsTrigger
- className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 md:justify-normal md:px-3"
+ className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 md:justify-normal md:px-3 dark:hover:bg-neutral-700/50"
value="overview"
onClick={() => {
router.push(`/@${user.name}`);
@@ -129,7 +129,7 @@ export function Dashboard({ user, isOwnProfile, badges, children }: Props) {
</VerticalTabsTrigger>
{Boolean(isOwnProfile) && (
<VerticalTabsTrigger
- className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 md:justify-normal md:px-3"
+ className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 md:justify-normal md:px-3 dark:hover:bg-neutral-700/50"
value="completed"
onClick={() => {
router.push(`/@${user.name}/completed`);
@@ -141,7 +141,7 @@ export function Dashboard({ user, isOwnProfile, badges, children }: Props) {
)}
{Boolean(isOwnProfile) && (
<VerticalTabsTrigger
- className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 md:justify-normal md:px-3"
+ className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 md:justify-normal md:px-3 dark:hover:bg-neutral-700/50"
value="in-progress"
onClick={() => {
router.push(`/@${user.name}/in-progress`);
@@ -152,7 +152,7 @@ export function Dashboard({ user, isOwnProfile, badges, children }: Props) {
</VerticalTabsTrigger>
)}
<VerticalTabsTrigger
- className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 md:justify-normal md:px-3"
+ className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 md:justify-normal md:px-3 dark:hover:bg-neutral-700/50"
value="shared-solutions"
onClick={() => {
router.push(`/@${user.name}/shared-solutions`);
@@ -164,7 +164,7 @@ export function Dashboard({ user, isOwnProfile, badges, children }: Props) {
{Boolean(isOwnProfile) && (
<>
<VerticalTabsTrigger
- className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 md:justify-normal md:px-3"
+ className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 md:justify-normal md:px-3 dark:hover:bg-neutral-700/50"
value="bookmarks"
onClick={() => {
router.push(`/@${user.name}/bookmarks`);
@@ -175,7 +175,7 @@ export function Dashboard({ user, isOwnProfile, badges, children }: Props) {
</VerticalTabsTrigger>
<Link
href="/settings"
- className="border-border dark:border-ring data-[state=active]:bg-border ring-offset-background focus-visible:ring-ring data-[state=active]:text-foreground flex items-center justify-center gap-3 whitespace-nowrap rounded-xl border px-1.5 py-1.5 text-sm font-medium transition-all duration-300 hover:bg-neutral-200/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm dark:hover:bg-neutral-700/50 md:justify-normal md:px-3"
+ className="border-border dark:border-ring data-[state=active]:bg-border ring-offset-background focus-visible:ring-ring data-[state=active]:text-foreground flex items-center justify-center gap-3 whitespace-nowrap rounded-xl border px-1.5 py-1.5 text-sm font-medium transition-all duration-300 hover:bg-neutral-200/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm md:justify-normal md:px-3 dark:hover:bg-neutral-700/50"
>
<Settings className="h-4 w-4" />
<span className="hidden md:block">Settings</span>
diff --git a/apps/web/src/app/(profile)/[username]/_components/profile-skeleton.tsx b/apps/web/src/app/(profile)/[username]/_components/profile-skeleton.tsx
index b07334a6..f7cf454d 100644
--- a/apps/web/src/app/(profile)/[username]/_components/profile-skeleton.tsx
+++ b/apps/web/src/app/(profile)/[username]/_components/profile-skeleton.tsx
@@ -4,12 +4,12 @@ export function PageContentSkeleton() {
return (
<div className="relative flex w-full shrink grow flex-col gap-8">
<div className=" flex h-1/2 shrink grow flex-col items-center justify-center space-y-4 rounded-3xl border border-zinc-700 py-10 md:h-2/5 md:w-4/5">
- <Skeleton className="max-w-80 h-4 w-5/6 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
+ <Skeleton className="h-4 w-5/6 max-w-80 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-60 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-20 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
</div>
<div className="relative flex shrink grow flex-col items-center justify-center space-y-4 rounded-3xl border border-zinc-700 py-20 md:h-3/5">
- <Skeleton className="max-w-80 h-4 w-5/6 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
+ <Skeleton className="h-4 w-5/6 max-w-80 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-60 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-20 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
</div>
@@ -21,7 +21,7 @@ export function TableSkeleton() {
return (
<div className="relative flex h-[300px] w-full shrink grow flex-col gap-8 md:h-[600px]">
<div className="relative flex shrink grow flex-col items-center justify-center space-y-4 rounded-3xl border border-zinc-700 py-20 md:h-3/5">
- <Skeleton className="max-w-80 h-4 w-5/6 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
+ <Skeleton className="h-4 w-5/6 max-w-80 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-60 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-20 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
</div>
diff --git a/apps/web/src/app/(profile)/[username]/_components/profile.tsx b/apps/web/src/app/(profile)/[username]/_components/profile.tsx
index ae23a5dc..cdedf628 100644
--- a/apps/web/src/app/(profile)/[username]/_components/profile.tsx
+++ b/apps/web/src/app/(profile)/[username]/_components/profile.tsx
@@ -2,7 +2,7 @@ import { prisma } from '@repo/db';
import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { Dashboard } from './dashboard';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { getBadges } from './dashboard/_actions';
interface Props {
diff --git a/apps/web/src/app/(profile)/[username]/bookmarks/page.tsx b/apps/web/src/app/(profile)/[username]/bookmarks/page.tsx
index 370bf241..50b50f73 100644
--- a/apps/web/src/app/(profile)/[username]/bookmarks/page.tsx
+++ b/apps/web/src/app/(profile)/[username]/bookmarks/page.tsx
@@ -11,7 +11,7 @@ import { withUnstableCache } from '~/utils/withUnstableCache';
import { createCacheKeyForBookmarksTab } from '../../../challenge/_components/bookmark.action';
import { DataTable } from '@repo/ui/components/data-table';
import { bookmarkedChallengedColumns } from './_components/bookmarked-challenges-columns';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
interface Props {
params: {
diff --git a/apps/web/src/app/(profile)/[username]/completed/page.tsx b/apps/web/src/app/(profile)/[username]/completed/page.tsx
index 0844a2b5..887c6c18 100644
--- a/apps/web/src/app/(profile)/[username]/completed/page.tsx
+++ b/apps/web/src/app/(profile)/[username]/completed/page.tsx
@@ -11,7 +11,7 @@ import { createCompletedSubmissionCacheKey } from '~/app/challenge/[slug]/submis
import { withUnstableCache } from '~/utils/withUnstableCache';
import { getChallengeHistoryByCategory } from '../_components/dashboard/_actions';
import ChallengeHistory from '../_components/dashboard/challenge-history';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
interface Props {
params: {
diff --git a/apps/web/src/app/(profile)/[username]/in-progress/page.tsx b/apps/web/src/app/(profile)/[username]/in-progress/page.tsx
index 69836564..cfe24700 100644
--- a/apps/web/src/app/(profile)/[username]/in-progress/page.tsx
+++ b/apps/web/src/app/(profile)/[username]/in-progress/page.tsx
@@ -11,7 +11,7 @@ import { createInProgressSubmissionCacheKey } from '~/app/challenge/[slug]/submi
import { withUnstableCache } from '~/utils/withUnstableCache';
import { getChallengeHistoryByCategory } from '../_components/dashboard/_actions';
import ChallengeHistory from '../_components/dashboard/challenge-history';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
interface Props {
params: {
diff --git a/apps/web/src/app/(profile)/[username]/shared-solutions/page.tsx b/apps/web/src/app/(profile)/[username]/shared-solutions/page.tsx
index 96b21e2d..f0523c30 100644
--- a/apps/web/src/app/(profile)/[username]/shared-solutions/page.tsx
+++ b/apps/web/src/app/(profile)/[username]/shared-solutions/page.tsx
@@ -11,7 +11,7 @@ import { notFound } from 'next/navigation';
import { withUnstableCache } from '~/utils/withUnstableCache';
import { createCacheKeyForSharedSolutionsTab } from '../../../challenge/[slug]/solutions/_components/_actions';
import { sharedSolutionsColumns } from './_components/shared-solutions-columns';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
interface Props {
params: {
diff --git a/apps/web/src/app/_components/community/community.tsx b/apps/web/src/app/_components/community/community.tsx
index 9d02acba..37156e86 100644
--- a/apps/web/src/app/_components/community/community.tsx
+++ b/apps/web/src/app/_components/community/community.tsx
@@ -91,7 +91,7 @@ export function Community() {
<h2 className="mt-2 text-center text-4xl font-bold lg:text-left">
Built by the community
</h2>
- <p className="max-w-[55ch] bg-transparent px-8 text-center leading-8 text-black/60 dark:text-white/50 lg:px-0 lg:text-left">
+ <p className="max-w-[55ch] bg-transparent px-8 text-center leading-8 text-black/60 lg:px-0 lg:text-left dark:text-white/50">
TypeHero is free, open-source, and built by developers just like you. These are
some\nof the contributors who made this possible so far.
</p>
@@ -145,7 +145,7 @@ export function Community() {
</div>
{/* autoscrolled */}
<div className="pb-16 sm:pb-24 lg:pb-0 lg:pl-8 xl:hidden">
- <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] dark:hover:shadow-[0_0_10rem_10rem_#0008] lg:w-[25rem] xl:w-[35rem]">
+ <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] lg:w-[25rem] xl:w-[35rem] dark:hover:shadow-[0_0_10rem_10rem_#0008]">
<div
ref={innerScrollerRef}
className="infinite-scroll-x relative flex w-max flex-nowrap py-1.5"
@@ -155,7 +155,7 @@ export function Community() {
))}
</div>
</div>
- <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] dark:hover:shadow-[0_0_10rem_10rem_#0008] lg:w-[25rem] xl:w-[35rem]">
+ <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] lg:w-[25rem] xl:w-[35rem] dark:hover:shadow-[0_0_10rem_10rem_#0008]">
<div
ref={innerScrollerRef2}
className="infinite-scroll-x-reverse relative flex w-max flex-nowrap py-1.5"
@@ -167,7 +167,7 @@ export function Community() {
))}
</div>
</div>
- <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] dark:hover:shadow-[0_0_10rem_10rem_#0008] lg:w-[25rem] xl:w-[35rem]">
+ <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] lg:w-[25rem] xl:w-[35rem] dark:hover:shadow-[0_0_10rem_10rem_#0008]">
<div
ref={innerScrollerRef3}
className="infinite-scroll-x relative flex w-max flex-nowrap py-1.5"
@@ -179,7 +179,7 @@ export function Community() {
))}
</div>
</div>
- <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] dark:hover:shadow-[0_0_10rem_10rem_#0008] lg:w-[25rem] xl:w-[35rem]">
+ <div className="infinite-scroll-x-container mx-auto hover:shadow-[0_0_10rem_10rem_#fff8] lg:w-[25rem] xl:w-[35rem] dark:hover:shadow-[0_0_10rem_10rem_#0008]">
<div
ref={innerScrollerRef4}
className="infinite-scroll-x-reverse relative flex w-max flex-nowrap py-1.5"
diff --git a/apps/web/src/app/_components/feature-card.tsx b/apps/web/src/app/_components/feature-card.tsx
index ffeb1b8a..7b152039 100644
--- a/apps/web/src/app/_components/feature-card.tsx
+++ b/apps/web/src/app/_components/feature-card.tsx
@@ -76,7 +76,7 @@ function FeatureCard({
<div className="m-6 min-h-[330px] w-full sm:m-10 md:min-h-[450px]">
<div className="flex w-5/6 flex-col gap-3 sm:w-4/6 md:w-4/5 xl:w-4/6">
<h2 className="text-xl font-bold tracking-tight md:text-xl">{title}</h2>
- <p className="text-sm leading-5 text-zinc-600 dark:text-zinc-400 sm:text-base sm:leading-7">
+ <p className="text-sm leading-5 text-zinc-600 sm:text-base sm:leading-7 dark:text-zinc-400">
{description}
</p>
</div>
diff --git a/apps/web/src/app/_components/features.tsx b/apps/web/src/app/_components/features.tsx
index 3368bab2..ed5af081 100644
--- a/apps/web/src/app/_components/features.tsx
+++ b/apps/web/src/app/_components/features.tsx
@@ -30,7 +30,7 @@ export async function Features() {
<div className="flex flex-col items-center justify-center gap-16">
<div className="mt-1 flex flex-col gap-3 px-4 text-center sm:px-0">
<a
- className="mx-auto hidden rounded-full bg-gradient-to-r from-[#31bdc6] to-[#3178c6] p-[1px] brightness-90 contrast-150 focus:outline-none focus:ring-blue-600 focus-visible:ring-2 dark:brightness-125 dark:contrast-100 sm:block"
+ className="mx-auto hidden rounded-full bg-gradient-to-r from-[#31bdc6] to-[#3178c6] p-[1px] brightness-90 contrast-150 focus:outline-none focus:ring-blue-600 focus-visible:ring-2 sm:block dark:brightness-125 dark:contrast-100"
href="#features"
>
<div className="group relative overflow-hidden rounded-full bg-white/80 px-3 py-1 duration-300 hover:pr-9 dark:bg-black/80">
diff --git a/apps/web/src/app/_components/hero.tsx b/apps/web/src/app/_components/hero.tsx
index 67a83a4d..5665140b 100644
--- a/apps/web/src/app/_components/hero.tsx
+++ b/apps/web/src/app/_components/hero.tsx
@@ -3,7 +3,7 @@ import Link from 'next/link';
import { Balancer } from 'react-wrap-balancer';
import { Button } from '@repo/ui/components/button';
import { HeroIllustration, BackgroundGrid } from './hero-illustration';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
function TypeHeroLogo3D() {
return (
@@ -170,14 +170,14 @@ export async function Hero() {
<div className="absolute left-1/2 top-1/2 -z-10 hidden h-56 w-56 -translate-x-[15%] -translate-y-[50%] rounded-full bg-slate-400/10 blur-3xl dark:block" />
<div className="absolute right-1/2 top-1/2 -z-10 hidden h-56 w-56 -translate-y-[40%] rounded-full bg-[#3178c6]/20 blur-3xl dark:block" />
<TypeHeroLogo3D />
- <h1 className="animate-bg-gradient-to-center-title dark:to-69% select-none bg-gradient-to-br from-[#3178c6] from-[69%] to-black/0 bg-clip-text bg-right-bottom text-6xl font-extrabold text-transparent dark:from-white dark:from-30% dark:via-[#3178c6] dark:to-[#3178c6] dark:bg-[length:300%_300%] sm:text-8xl sm:leading-[5.5rem]">
+ <h1 className="animate-bg-gradient-to-center-title dark:to-69% select-none bg-gradient-to-br from-[#3178c6] from-[69%] to-black/0 bg-clip-text bg-right-bottom text-6xl font-extrabold text-transparent sm:text-8xl sm:leading-[5.5rem] dark:from-white dark:from-30% dark:via-[#3178c6] dark:to-[#3178c6] dark:bg-[length:300%_300%]">
type
<br />
hero
</h1>
</div>
- <p className="max-w-[55ch] bg-transparent text-center font-medium leading-8 text-black/60 dark:text-white/50 sm:px-8 lg:px-0 lg:text-left">
+ <p className="max-w-[55ch] bg-transparent text-center font-medium leading-8 text-black/60 sm:px-8 lg:px-0 lg:text-left dark:text-white/50">
<Balancer>
Connect, collaborate, and grow with a community of TypeScript developers. Elevate your
skills through interactive coding challenges, discussions, and knowledge sharing
@@ -186,7 +186,7 @@ export async function Hero() {
<div className="flex flex-col-reverse gap-3 md:flex-row">
<Button
asChild
- className="hero-join-button-dark group relative mx-auto hidden w-fit overflow-hidden rounded-xl p-[1px] font-bold transition-all duration-300 dark:block dark:hover:shadow-[0_0_2rem_-0.5rem_#fff8] md:mr-0 lg:mr-auto"
+ className="hero-join-button-dark group relative mx-auto hidden w-fit overflow-hidden rounded-xl p-[1px] font-bold transition-all duration-300 md:mr-0 lg:mr-auto dark:block dark:hover:shadow-[0_0_2rem_-0.5rem_#fff8]"
variant="outline"
>
<Link href="/explore">
diff --git a/apps/web/src/app/aot-2023/_components/card-grid.tsx b/apps/web/src/app/aot-2023/_components/card-grid.tsx
index 52f8f5b6..cea0c2e4 100644
--- a/apps/web/src/app/aot-2023/_components/card-grid.tsx
+++ b/apps/web/src/app/aot-2023/_components/card-grid.tsx
@@ -1,7 +1,8 @@
import { prisma } from '@repo/db';
import { TiltableCard } from './tiltable-card';
-import { auth, type Session } from '@repo/auth/server';
+import { type Session } from '@repo/auth/server';
import { daysAfterDecemberFirst } from '~/utils/aot';
+import { auth } from '~/server/auth';
export async function CardGrid() {
const session = await auth();
diff --git a/apps/web/src/app/aot-2023/_components/index.tsx b/apps/web/src/app/aot-2023/_components/index.tsx
index edd1b0a6..1ee5aff1 100644
--- a/apps/web/src/app/aot-2023/_components/index.tsx
+++ b/apps/web/src/app/aot-2023/_components/index.tsx
@@ -18,8 +18,8 @@ export async function AotLandingPage() {
<div className="flex flex-col gap-5 pb-8 md:gap-10 md:py-5">
<div className="container">
<div className="relative mx-auto w-fit text-center">
- <div className="absolute left-0 top-0 -z-10 hidden h-full w-full transform-gpu bg-gradient-to-r from-red-500 via-red-600 to-green-500 opacity-70 blur-3xl dark:block sm:opacity-40" />
- <h1 className="mb-10 mt-16 text-4xl font-bold tracking-tighter text-black dark:text-white sm:text-8xl">
+ <div className="absolute left-0 top-0 -z-10 hidden h-full w-full transform-gpu bg-gradient-to-r from-red-500 via-red-600 to-green-500 opacity-70 blur-3xl sm:opacity-40 dark:block" />
+ <h1 className="mb-10 mt-16 text-4xl font-bold tracking-tighter text-black sm:text-8xl dark:text-white">
<span>Advent</span> of <span className="text-red-600">TypeScript</span>
</h1>
</div>
@@ -36,7 +36,7 @@ export async function AotLandingPage() {
target="_blank"
rel="noreferrer"
href="https://chat.typehero.dev"
- className="group flex w-full items-center justify-center gap-2 rounded-xl bg-[#5865F2] px-3 py-2 text-sm font-bold text-white duration-300 dark:bg-[#5865F2] md:mx-auto md:w-auto"
+ className="group flex w-full items-center justify-center gap-2 rounded-xl bg-[#5865F2] px-3 py-2 text-sm font-bold text-white duration-300 md:mx-auto md:w-auto dark:bg-[#5865F2]"
>
<svg
className="h-4 w-4 fill-current group-hover:rotate-[360deg]"
@@ -53,7 +53,7 @@ export async function AotLandingPage() {
<About className="w-full md:w-auto" />
<Button
asChild
- className="flex w-full items-center justify-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white md:w-auto"
+ className="flex w-full items-center justify-center gap-2 rounded-xl border-2 px-4 py-2 md:w-auto dark:text-white"
variant="outline"
>
<a
diff --git a/apps/web/src/app/aot-2023/wrapped/_components/least-solved.tsx b/apps/web/src/app/aot-2023/wrapped/_components/least-solved.tsx
index 8f4f27f4..462d71b3 100644
--- a/apps/web/src/app/aot-2023/wrapped/_components/least-solved.tsx
+++ b/apps/web/src/app/aot-2023/wrapped/_components/least-solved.tsx
@@ -29,7 +29,7 @@ export function LeastSolved({ leastSolved }: Props) {
<div className="flex h-screen w-full justify-center gap-2 bg-gradient-to-l from-red-100 to-30% dark:from-red-950">
<div className="flex flex-col items-center justify-center gap-4 pt-20">
<div className="relative">
- <p className="mb-10 text-5xl font-bold tracking-tighter text-red-950 dark:text-red-50 sm:mx-[-130px] sm:text-8xl">
+ <p className="mb-10 text-5xl font-bold tracking-tighter text-red-950 sm:mx-[-130px] sm:text-8xl dark:text-red-50">
LEAST SOLVED
</p>
<Image
diff --git a/apps/web/src/app/aot-2023/wrapped/_components/most-solved.tsx b/apps/web/src/app/aot-2023/wrapped/_components/most-solved.tsx
index f0831fc7..4c52528e 100644
--- a/apps/web/src/app/aot-2023/wrapped/_components/most-solved.tsx
+++ b/apps/web/src/app/aot-2023/wrapped/_components/most-solved.tsx
@@ -29,7 +29,7 @@ export function MostSolved({ mostSolved }: Props) {
<div className="flex h-screen w-full justify-center gap-2 bg-gradient-to-l from-green-100 to-30% dark:from-green-950">
<div className="flex flex-col items-center justify-center gap-4 pt-20">
<div className="relative">
- <p className="mb-10 text-5xl font-bold tracking-tighter text-green-950 dark:text-green-50 sm:mx-[-130px] sm:text-8xl">
+ <p className="mb-10 text-5xl font-bold tracking-tighter text-green-950 sm:mx-[-130px] sm:text-8xl dark:text-green-50">
MOST SOLVED
</p>
<Image
diff --git a/apps/web/src/app/api/auth/[...nextauth]/route.ts b/apps/web/src/app/api/auth/[...nextauth]/route.ts
index 36cd532e..0a6c906a 100644
--- a/apps/web/src/app/api/auth/[...nextauth]/route.ts
+++ b/apps/web/src/app/api/auth/[...nextauth]/route.ts
@@ -1 +1,3 @@
-export { GET, POST } from '@repo/auth/server';
+import { handlers } from '~/server/auth';
+
+export const { GET, POST } = handlers;
diff --git a/apps/web/src/app/api/uploadthing/core.ts b/apps/web/src/app/api/uploadthing/core.ts
index 010a2468..ea31f42b 100644
--- a/apps/web/src/app/api/uploadthing/core.ts
+++ b/apps/web/src/app/api/uploadthing/core.ts
@@ -1,6 +1,6 @@
import { createUploadthing, type FileRouter } from 'uploadthing/next';
import { prisma } from '@repo/db';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
const f = createUploadthing({
/**
diff --git a/apps/web/src/app/challenge/[slug]/comments/[commentId]/page.tsx b/apps/web/src/app/challenge/[slug]/comments/[commentId]/page.tsx
index bb2a463c..60b9b602 100644
--- a/apps/web/src/app/challenge/[slug]/comments/[commentId]/page.tsx
+++ b/apps/web/src/app/challenge/[slug]/comments/[commentId]/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { Comments } from '../../../_components/comments';
import { getPreselectedCommentMetadata } from '../../../_components/comments/getCommentRouteData';
import { Description } from '../../../_components/description';
diff --git a/apps/web/src/app/challenge/[slug]/context-providers.tsx b/apps/web/src/app/challenge/[slug]/context-providers.tsx
index 50e4908f..a3c0f74c 100644
--- a/apps/web/src/app/challenge/[slug]/context-providers.tsx
+++ b/apps/web/src/app/challenge/[slug]/context-providers.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { getAllChallenges } from '~/app/explore/_components/explore.action';
import { isEnrolledInAnyTrack } from './getChallengeRouteData';
import { AllChallengesProvider } from './all-challenges.hook';
diff --git a/apps/web/src/app/challenge/[slug]/layout.tsx b/apps/web/src/app/challenge/[slug]/layout.tsx
index 754bee59..6bea3489 100644
--- a/apps/web/src/app/challenge/[slug]/layout.tsx
+++ b/apps/web/src/app/challenge/[slug]/layout.tsx
@@ -1,6 +1,6 @@
import { ChallengeLayoutWrapper } from '~/app/challenge/_components/challenge-layout-wrapper';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { ForceRenderUntilClient } from '@repo/ui/components/force-render-until-client';
import { getChallengeRouteData } from './getChallengeRouteData';
diff --git a/apps/web/src/app/challenge/[slug]/page.tsx b/apps/web/src/app/challenge/[slug]/page.tsx
index 6b182f83..b16239b8 100644
--- a/apps/web/src/app/challenge/[slug]/page.tsx
+++ b/apps/web/src/app/challenge/[slug]/page.tsx
@@ -1,10 +1,11 @@
-import { auth, type Session } from '@repo/auth/server';
+import { type Session } from '@repo/auth/server';
import { buildMetaForChallenge, buildMetaForEventPage } from '~/app/metadata';
import { getRelativeTime } from '~/utils/relativeTime';
import { Comments } from '../_components/comments';
import { Description } from '../_components/description';
import { AOT_CHALLENGES } from './aot-slugs';
import { getChallengeRouteData } from './getChallengeRouteData';
+import { auth } from '~/server/auth';
interface Props {
params: {
diff --git a/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsx b/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsx
index d74a83ff..179ebda1 100644
--- a/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsx
+++ b/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { SolutionDetails } from '~/app/challenge/[slug]/solutions/_components/solution-detail';
import { Comments } from '~/app/challenge/_components/comments';
import { getPreselectedSolutionCommentMetadata } from '~/app/challenge/_components/comments/getCommentRouteData';
diff --git a/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/page.tsx b/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/page.tsx
index 962aee79..b51b0688 100644
--- a/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/page.tsx
+++ b/apps/web/src/app/challenge/[slug]/solutions/[solutionId]/page.tsx
@@ -1,6 +1,6 @@
import { prisma } from '@repo/db';
import { SolutionDetails } from '../_components/solution-detail';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { Comments } from '~/app/challenge/_components/comments';
import { getSolutionIdRouteData } from './getSolutionIdRouteData';
diff --git a/apps/web/src/app/challenge/[slug]/solutions/_components/_actions.ts b/apps/web/src/app/challenge/[slug]/solutions/_components/_actions.ts
index 6dbe2b08..5a1abd5e 100644
--- a/apps/web/src/app/challenge/[slug]/solutions/_components/_actions.ts
+++ b/apps/web/src/app/challenge/[slug]/solutions/_components/_actions.ts
@@ -1,5 +1,5 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { revalidateTag } from 'next/cache';
import { isAdminOrModerator, isAuthor } from '~/utils/auth-guards';
diff --git a/apps/web/src/app/challenge/[slug]/solutions/getSolutionRouteData.ts b/apps/web/src/app/challenge/[slug]/solutions/getSolutionRouteData.ts
index 1207d1ee..9d202bf0 100644
--- a/apps/web/src/app/challenge/[slug]/solutions/getSolutionRouteData.ts
+++ b/apps/web/src/app/challenge/[slug]/solutions/getSolutionRouteData.ts
@@ -1,6 +1,6 @@
'use server';
import { prisma } from '@repo/db';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import type { SortKey, SortOrder } from '~/utils/sorting';
import { orderBy } from '~/utils/sorting';
diff --git a/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/page.tsx b/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/page.tsx
index 97a0a8e8..9d0b60f1 100644
--- a/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/page.tsx
+++ b/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { notFound } from 'next/navigation';
import { cache } from 'react';
diff --git a/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/save-submission.action.ts b/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/save-submission.action.ts
index 60983c77..8f6501f7 100644
--- a/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/save-submission.action.ts
+++ b/apps/web/src/app/challenge/[slug]/submissions/[[...catchAll]]/save-submission.action.ts
@@ -1,5 +1,5 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { revalidateTag } from 'next/cache';
import type { ChallengeRouteData } from '../../getChallengeRouteData';
diff --git a/apps/web/src/app/challenge/_components/challenge-layout.tsx b/apps/web/src/app/challenge/_components/challenge-layout.tsx
index e884e071..3affb885 100644
--- a/apps/web/src/app/challenge/_components/challenge-layout.tsx
+++ b/apps/web/src/app/challenge/_components/challenge-layout.tsx
@@ -302,10 +302,10 @@ export function ChallengeLayout({
}
ref={resizer}
>
- <div className="group-hover:bg-primary group-active:bg-primary group-hover:dark:bg-primary absolute left-1/2 top-1/2 h-1 w-24 -translate-x-1/2 -translate-y-1/2 rounded-full bg-neutral-400 duration-300 group-active:duration-75 dark:bg-neutral-700 lg:h-24 lg:w-1" />
+ <div className="group-hover:bg-primary group-active:bg-primary group-hover:dark:bg-primary absolute left-1/2 top-1/2 h-1 w-24 -translate-x-1/2 -translate-y-1/2 rounded-full bg-neutral-400 duration-300 group-active:duration-75 lg:h-24 lg:w-1 dark:bg-neutral-700" />
</div>
<div
- className="flex min-h-[90px] w-full flex-1 flex-grow flex-col overflow-hidden rounded-2xl border border-zinc-300 dark:border-zinc-700 lg:min-w-[500px]"
+ className="flex min-h-[90px] w-full flex-1 flex-grow flex-col overflow-hidden rounded-2xl border border-zinc-300 lg:min-w-[500px] dark:border-zinc-700"
ref={rightSide}
>
{right}
diff --git a/apps/web/src/app/challenge/_components/comments/comment.action.ts b/apps/web/src/app/challenge/_components/comments/comment.action.ts
index 5e8ea66e..2714042f 100644
--- a/apps/web/src/app/challenge/_components/comments/comment.action.ts
+++ b/apps/web/src/app/challenge/_components/comments/comment.action.ts
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import type { Comment, CommentRoot, PrismaClient } from '@repo/db/types';
import { isAdminOrModerator, isAuthor } from '~/utils/auth-guards';
diff --git a/apps/web/src/app/challenge/_components/comments/getCommentRouteData.ts b/apps/web/src/app/challenge/_components/comments/getCommentRouteData.ts
index e011eda2..5bd4e2ff 100644
--- a/apps/web/src/app/challenge/_components/comments/getCommentRouteData.ts
+++ b/apps/web/src/app/challenge/_components/comments/getCommentRouteData.ts
@@ -1,5 +1,5 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import type { CommentRoot } from '@repo/db/types';
import { orderBy, type SortKey, type SortOrder } from '~/utils/sorting';
diff --git a/apps/web/src/app/challenge/_components/description/suggestions-skeleton.tsx b/apps/web/src/app/challenge/_components/description/suggestions-skeleton.tsx
index f85a7a82..03b76027 100644
--- a/apps/web/src/app/challenge/_components/description/suggestions-skeleton.tsx
+++ b/apps/web/src/app/challenge/_components/description/suggestions-skeleton.tsx
@@ -3,15 +3,15 @@ import { Skeleton } from '@repo/ui/components/skeleton';
export function SuggestionsSkeleton() {
return (
<div className="mt-2 flex flex-col gap-2">
- <div className="flex h-10 w-full items-center justify-between rounded-3xl bg-neutral-500/10 px-3 dark:from-neutral-900/70 lg:rounded-lg">
+ <div className="flex h-10 w-full items-center justify-between rounded-3xl bg-neutral-500/10 px-3 lg:rounded-lg dark:from-neutral-900/70">
<Skeleton className="h-6 w-1/2 rounded bg-zinc-300 dark:bg-zinc-700" />
<Skeleton className="h-6 w-14 rounded-full bg-zinc-300 dark:bg-zinc-700" />
</div>
- <div className="flex h-10 w-full items-center justify-between rounded-3xl bg-neutral-500/10 px-3 dark:from-neutral-900/70 lg:rounded-lg">
+ <div className="flex h-10 w-full items-center justify-between rounded-3xl bg-neutral-500/10 px-3 lg:rounded-lg dark:from-neutral-900/70">
<Skeleton className="h-6 w-1/2 rounded bg-zinc-300 dark:bg-zinc-700" />
<Skeleton className="h-6 w-14 rounded-full bg-zinc-300 dark:bg-zinc-700" />
</div>
- <div className="flex h-10 w-full items-center justify-between rounded-3xl bg-neutral-500/10 px-3 dark:from-neutral-900/70 lg:rounded-lg">
+ <div className="flex h-10 w-full items-center justify-between rounded-3xl bg-neutral-500/10 px-3 lg:rounded-lg dark:from-neutral-900/70">
<Skeleton className="h-6 w-1/2 rounded bg-zinc-300 dark:bg-zinc-700" />
<Skeleton className="h-6 w-14 rounded-full bg-zinc-300 dark:bg-zinc-700" />
</div>
diff --git a/apps/web/src/app/challenge/increment.action.ts b/apps/web/src/app/challenge/increment.action.ts
index f67ce291..45ec9e1e 100644
--- a/apps/web/src/app/challenge/increment.action.ts
+++ b/apps/web/src/app/challenge/increment.action.ts
@@ -1,5 +1,5 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import type { VoteType } from '@repo/db/types';
diff --git a/apps/web/src/app/explore/_components/explore-section.tsx b/apps/web/src/app/explore/_components/explore-section.tsx
index 681081e9..fb241635 100644
--- a/apps/web/src/app/explore/_components/explore-section.tsx
+++ b/apps/web/src/app/explore/_components/explore-section.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import type { Difficulty, Tags } from '@repo/db/types';
import Link from 'next/link';
import { ExploreChallengesProgression } from '~/app/explore/_components/explore-challenges-progress';
diff --git a/apps/web/src/app/explore/_components/explore.action.ts b/apps/web/src/app/explore/_components/explore.action.ts
index 51b6a020..f7ff814c 100644
--- a/apps/web/src/app/explore/_components/explore.action.ts
+++ b/apps/web/src/app/explore/_components/explore.action.ts
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { Tags, type Difficulty } from '@repo/db/types';
import { AOT_CHALLENGES } from '../../challenge/[slug]/aot-slugs';
diff --git a/apps/web/src/app/explore/_components/index.tsx b/apps/web/src/app/explore/_components/index.tsx
index 7a9910be..99283fa2 100644
--- a/apps/web/src/app/explore/_components/index.tsx
+++ b/apps/web/src/app/explore/_components/index.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { Suspense } from 'react';
import { Footsies } from '~/components/footsies';
import { ExploreSection } from './explore-section';
diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx
index d3963738..96c81613 100644
--- a/apps/web/src/app/layout.tsx
+++ b/apps/web/src/app/layout.tsx
@@ -1,6 +1,6 @@
import { Toaster } from '@repo/ui/components/toaster';
import { Analytics } from '@vercel/analytics/react';
-import { SpeedInsights } from "@vercel/speed-insights/next"
+import { SpeedInsights } from '@vercel/speed-insights/next';
import { Inter } from 'next/font/google';
import { Navigation } from '~/components/Navigation';
import '../styles/globals.css';
diff --git a/apps/web/src/app/settings/_components/settings-skeleton.tsx b/apps/web/src/app/settings/_components/settings-skeleton.tsx
index 87ddbcfe..fbbbdccd 100644
--- a/apps/web/src/app/settings/_components/settings-skeleton.tsx
+++ b/apps/web/src/app/settings/_components/settings-skeleton.tsx
@@ -15,7 +15,7 @@ export function SettingsSkeleton() {
</div>
</div>
<div className="relative flex shrink grow flex-col items-center justify-center space-y-4 rounded-3xl border border-zinc-700 py-10 md:w-2/3">
- <Skeleton className="max-w-80 h-4 w-5/6 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
+ <Skeleton className="h-4 w-5/6 max-w-80 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-60 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
<Skeleton className="h-4 w-20 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white" />
</div>
@@ -27,7 +27,7 @@ export function TabsTriggerSkeleton() {
return (
<div className="flex h-6 flex-row items-center gap-2 rounded-xl border border-zinc-700 px-2 py-4 md:w-64">
<Skeleton className="h-4 w-4 rounded-md border border-zinc-300 bg-zinc-300 dark:bg-zinc-700" />
- <Skeleton className="hidden h-4 w-16 rounded-2xl bg-zinc-300 text-neutral-900 dark:bg-zinc-700 dark:text-white md:block" />
+ <Skeleton className="hidden h-4 w-16 rounded-2xl bg-zinc-300 text-neutral-900 md:block dark:bg-zinc-700 dark:text-white" />
</div>
);
}
diff --git a/apps/web/src/app/settings/_components/settings.action.ts b/apps/web/src/app/settings/_components/settings.action.ts
index 6d274cf4..accf09bf 100644
--- a/apps/web/src/app/settings/_components/settings.action.ts
+++ b/apps/web/src/app/settings/_components/settings.action.ts
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { revalidatePath } from 'next/cache';
import { prisma } from '@repo/db';
import type { ProfileSchema } from './schema';
diff --git a/apps/web/src/app/settings/_components/settings.tsx b/apps/web/src/app/settings/_components/settings.tsx
index 77a84b61..3c063799 100644
--- a/apps/web/src/app/settings/_components/settings.tsx
+++ b/apps/web/src/app/settings/_components/settings.tsx
@@ -35,7 +35,7 @@ export const Settings = async ({ user }: Props) => {
</div>
<div className="flex gap-4 md:w-full md:flex-col">
<VerticalTabsTrigger
- className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 md:justify-normal md:px-3 "
+ className="flex items-center justify-center gap-3 px-2 hover:bg-neutral-200/50 md:justify-normal md:px-3 dark:hover:bg-neutral-700/50 "
value="settings"
>
<Settings2 className="h-4 w-4" />
@@ -43,7 +43,7 @@ export const Settings = async ({ user }: Props) => {
</VerticalTabsTrigger>
<Link
href={`/@${user.name}`}
- className="border-border dark:border-ring data-[state=active]:bg-border ring-offset-background focus-visible:ring-ring data-[state=active]:text-foreground flex items-center justify-center gap-3 whitespace-nowrap rounded-xl border px-1.5 py-1.5 text-sm font-medium transition-all duration-300 hover:bg-neutral-200/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm dark:hover:bg-neutral-700/50 md:justify-normal md:px-3"
+ className="border-border dark:border-ring data-[state=active]:bg-border ring-offset-background focus-visible:ring-ring data-[state=active]:text-foreground flex items-center justify-center gap-3 whitespace-nowrap rounded-xl border px-1.5 py-1.5 text-sm font-medium transition-all duration-300 hover:bg-neutral-200/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm md:justify-normal md:px-3 dark:hover:bg-neutral-700/50"
>
<UserIcon className="h-4 w-4" />
<span className="hidden md:block">Back to Profile</span>
diff --git a/apps/web/src/app/settings/page.tsx b/apps/web/src/app/settings/page.tsx
index 779d3375..f6c5876b 100644
--- a/apps/web/src/app/settings/page.tsx
+++ b/apps/web/src/app/settings/page.tsx
@@ -1,4 +1,4 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import type { Metadata } from 'next';
import { Settings } from './_components/settings';
diff --git a/apps/web/src/app/tracks/[slug]/page.tsx b/apps/web/src/app/tracks/[slug]/page.tsx
index 8fe05627..764c3bdb 100644
--- a/apps/web/src/app/tracks/[slug]/page.tsx
+++ b/apps/web/src/app/tracks/[slug]/page.tsx
@@ -1,6 +1,5 @@
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
-import { withUnstableCache } from '~/utils/withUnstableCache';
import { TrackDetail } from '../_components/track-details';
import { getTrackDetails } from '../_components/track.action';
@@ -19,12 +18,7 @@ export default async function Page({ params }: Props) {
}
export async function generateMetadata({ params: { slug } }: Props) {
- const track = await withUnstableCache({
- fn: getTrackDetails,
- args: [slug],
- keys: [`track-${slug}-detail`],
- tags: [`track-${slug}-detail`],
- });
+ const track = await getTrackDetails(slug);
if (!track) {
return {
diff --git a/apps/web/src/app/tracks/_components/enroll-button.tsx b/apps/web/src/app/tracks/_components/enroll-button.tsx
index 11022df8..1efe29c9 100644
--- a/apps/web/src/app/tracks/_components/enroll-button.tsx
+++ b/apps/web/src/app/tracks/_components/enroll-button.tsx
@@ -4,7 +4,6 @@ import { Button } from '@repo/ui/components/button';
import { toast } from '@repo/ui/components/use-toast';
import { useState } from 'react';
import type { enrollUserInTrack, unenrollUserFromTrack } from './track.action';
-import { useProblemExplorerContext } from '~/app/problem-explorer.hooks';
interface EnrollButtonProps {
action: typeof enrollUserInTrack | typeof unenrollUserFromTrack;
@@ -15,14 +14,12 @@ interface EnrollButtonProps {
export function ActionButton({ action, text, trackId, slug }: EnrollButtonProps) {
const [isLoading, setIsLoading] = useState(false);
- const { setIsExplorerDisabled } = useProblemExplorerContext();
return (
<Button
className="shadcnoverridetransition select-none rounded-3xl bg-black text-white shadow-[0px_16px_6px_-16px_#ff4,4px_2px_4px_-2px_#f4f,-4px_2px_4px_-2px_#4f4] hover:-translate-y-1 hover:bg-neutral-800 hover:shadow-[0px_16px_6px_-12px_#ff4,4px_6px_6px_-2px_#f4f,-4px_6px_6px_-2px_#4f4] active:translate-y-0 active:scale-[0.99] active:shadow-[0px_10px_3px_-16px_#ff4,8px_0px_2px_-2px_#f4f,-8px_0px_2px_-2px_#4f4] dark:bg-white dark:text-black dark:hover:bg-white dark:hover:brightness-125 dark:hover:saturate-150"
disabled={isLoading}
onClick={async () => {
setIsLoading(true);
- setIsExplorerDisabled(text === 'Enroll');
try {
await action(trackId, slug);
diff --git a/apps/web/src/app/tracks/_components/index.tsx b/apps/web/src/app/tracks/_components/index.tsx
index 992a1094..eafd945a 100644
--- a/apps/web/src/app/tracks/_components/index.tsx
+++ b/apps/web/src/app/tracks/_components/index.tsx
@@ -8,10 +8,10 @@ export async function Tracks() {
<div className="flex flex-col gap-5 pb-8 md:gap-10 md:py-5">
<EnrolledTrackSection />
<div className="container">
- <h1 className="mb-8 text-4xl font-bold tracking-tight text-neutral-900 dark:text-white sm:px-8 md:px-0">
+ <h1 className="mb-8 text-4xl font-bold tracking-tight text-neutral-900 sm:px-8 md:px-0 dark:text-white">
Tracks
</h1>
- <p className="max-w-[69ch] text-lg leading-10 text-neutral-600 dark:text-white/50 sm:px-8 md:px-0">
+ <p className="max-w-[69ch] text-lg leading-10 text-neutral-600 sm:px-8 md:px-0 dark:text-white/50">
TypeHero provides a curated collection of diverse coding challenges grouped into
different tracks, offering a dynamic learning path for developers to enhance their
skills.
diff --git a/apps/web/src/app/tracks/_components/track-challenge-card.tsx b/apps/web/src/app/tracks/_components/track-challenge-card.tsx
index 72e6aed1..5e7a8466 100644
--- a/apps/web/src/app/tracks/_components/track-challenge-card.tsx
+++ b/apps/web/src/app/tracks/_components/track-challenge-card.tsx
@@ -142,7 +142,7 @@ export function MockTrackChallenge({ challenge }: { challenge: Challenge }) {
BGS_BY_DIFFICULTY[challenge.difficulty],
'flex w-full items-center justify-between gap-3 overflow-hidden rounded-lg',
'bg-gradient-to-r from-neutral-500/10 from-70% to-100% dark:from-neutral-500/20',
- 'p-2 pl-3 text-black/90 duration-300 group-active/challenge:bg-neutral-500/40 group-active/challenge:duration-75 dark:text-white/90 md:p-4',
+ 'p-2 pl-3 text-black/90 duration-300 group-active/challenge:bg-neutral-500/40 group-active/challenge:duration-75 md:p-4 dark:text-white/90',
{
'group-hover/challenge:scale-105 group-hover/challenge:rounded-xl group-hover/challenge:bg-neutral-500/20':
!isMobile,
@@ -156,8 +156,8 @@ export function MockTrackChallenge({ challenge }: { challenge: Challenge }) {
id={challenge.id.toString()}
tabIndex={-1}
/>
- <div className="h-4 w-4 rounded-full border border-black/70 bg-black/10 duration-75 peer-checked:border-transparent peer-checked:bg-green-600/80 dark:border-white/50 dark:bg-white/10 peer-checked:dark:bg-green-300/80 sm:h-5 sm:w-5" />
- <Check className="absolute left-1 my-auto h-2 w-2 scale-0 stroke-[4] text-white duration-300 peer-checked:scale-100 dark:text-black sm:h-3 sm:w-3" />
+ <div className="h-4 w-4 rounded-full border border-black/70 bg-black/10 duration-75 peer-checked:border-transparent peer-checked:bg-green-600/80 sm:h-5 sm:w-5 dark:border-white/50 dark:bg-white/10 peer-checked:dark:bg-green-300/80" />
+ <Check className="absolute left-1 my-auto h-2 w-2 scale-0 stroke-[4] text-white duration-300 peer-checked:scale-100 sm:h-3 sm:w-3 dark:text-black" />
{challenge.name}
</div>
<div className="translate-x-1 scale-75 sm:translate-x-0 sm:scale-100">
diff --git a/apps/web/src/app/tracks/_components/track-enrolled-section.tsx b/apps/web/src/app/tracks/_components/track-enrolled-section.tsx
index 8e95ed75..d36673ed 100644
--- a/apps/web/src/app/tracks/_components/track-enrolled-section.tsx
+++ b/apps/web/src/app/tracks/_components/track-enrolled-section.tsx
@@ -1,7 +1,8 @@
-import { auth, type Session } from '@repo/auth/server';
+import { type Session } from '@repo/auth/server';
import { prisma } from '@repo/db';
import { EnrolledTrackSectionCarousel } from './track-enrolled-section-carousel';
import { SkeletonTrack } from './SkeletonTrack';
+import { auth } from '~/server/auth';
export async function EnrolledTrackSection() {
const session = await auth();
diff --git a/apps/web/src/app/tracks/_components/track-grid.tsx b/apps/web/src/app/tracks/_components/track-grid.tsx
index 59e4d0f4..a96a273b 100644
--- a/apps/web/src/app/tracks/_components/track-grid.tsx
+++ b/apps/web/src/app/tracks/_components/track-grid.tsx
@@ -1,7 +1,8 @@
-import { auth, type Session } from '@repo/auth/server';
+import { type Session } from '@repo/auth/server';
import { prisma } from '@repo/db';
import { TrackCard } from './track-card';
import { TrackCardSoon } from './track-card-soon';
+import { auth } from '~/server/auth';
export async function TrackGrid() {
const session = await auth();
diff --git a/apps/web/src/app/tracks/_components/track.action.ts b/apps/web/src/app/tracks/_components/track.action.ts
index f55cd382..aa857268 100644
--- a/apps/web/src/app/tracks/_components/track.action.ts
+++ b/apps/web/src/app/tracks/_components/track.action.ts
@@ -1,10 +1,11 @@
'use server';
-import { auth, type Session } from '@repo/auth/server';
+import { type Session } from '@repo/auth/server';
import { prisma } from '@repo/db';
import { revalidateTag } from 'next/cache';
import { cache } from 'react';
import { track } from '@vercel/analytics/server';
+import { auth } from '~/server/auth';
/**
* Enrolls the session user in the track given a track id.
diff --git a/apps/web/src/app/wizard/_components/ChallengeCardEditor.tsx b/apps/web/src/app/wizard/_components/ChallengeCardEditor.tsx
index d839b8a0..2a7cd3e3 100644
--- a/apps/web/src/app/wizard/_components/ChallengeCardEditor.tsx
+++ b/apps/web/src/app/wizard/_components/ChallengeCardEditor.tsx
@@ -51,7 +51,7 @@ export function ChallengeCardEditor({ form }: Props) {
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
<ExploreCard challenge={data as any} />
</div>
- <div className="flex w-full flex-col gap-1 rounded-3xl border border-neutral-200 bg-neutral-100 p-4 pt-[0.8rem] dark:border-neutral-800 dark:bg-neutral-900 sm:w-2/3 lg:w-[calc(333px+79px+16px)] xl:w-[calc(392px+79px+16px)]">
+ <div className="flex w-full flex-col gap-1 rounded-3xl border border-neutral-200 bg-neutral-100 p-4 pt-[0.8rem] sm:w-2/3 lg:w-[calc(333px+79px+16px)] xl:w-[calc(392px+79px+16px)] dark:border-neutral-800 dark:bg-neutral-900">
<FormField
control={form.control}
name="difficulty"
diff --git a/apps/web/src/app/wizard/_components/DescriptionEditor.tsx b/apps/web/src/app/wizard/_components/DescriptionEditor.tsx
index 1f2878a5..8f6b8414 100644
--- a/apps/web/src/app/wizard/_components/DescriptionEditor.tsx
+++ b/apps/web/src/app/wizard/_components/DescriptionEditor.tsx
@@ -17,7 +17,7 @@ export function DescriptionEditor({ form }: Props) {
<div className="flex h-full flex-1 flex-col">
<TypographyH3 className="mx-auto mb-4 lg:mb-6">Create Challenge Description</TypographyH3>
<div className="flex flex-1 flex-wrap gap-2 md:flex-nowrap">
- <div className="flex w-full flex-col gap-2 overflow-hidden rounded-2xl border border-zinc-300 dark:border-zinc-700 md:w-[500px] md:rounded-r-xl">
+ <div className="flex w-full flex-col gap-2 overflow-hidden rounded-2xl border border-zinc-300 md:w-[500px] md:rounded-r-xl dark:border-zinc-700">
<FormField
control={form.control}
name="description"
@@ -38,7 +38,7 @@ export function DescriptionEditor({ form }: Props) {
}}
/>
</div>
- <div className="w-full rounded-l-2xl rounded-r-2xl border border-zinc-300 bg-white p-3 dark:border-zinc-700 dark:bg-zinc-800 md:h-full md:rounded-l-xl">
+ <div className="w-full rounded-l-2xl rounded-r-2xl border border-zinc-300 bg-white p-3 md:h-full md:rounded-l-xl dark:border-zinc-700 dark:bg-zinc-800">
<Markdown>{description}</Markdown>
</div>
</div>
diff --git a/apps/web/src/app/wizard/_components/Summary.tsx b/apps/web/src/app/wizard/_components/Summary.tsx
index 0be84d2e..54c05723 100644
--- a/apps/web/src/app/wizard/_components/Summary.tsx
+++ b/apps/web/src/app/wizard/_components/Summary.tsx
@@ -4,7 +4,7 @@ interface Props {
export function Summary({ isUserACreator }: Props) {
return (
<div className="flex flex-col items-center justify-center pb-8 pt-12">
- <div className="mb-3 max-w-[20ch] text-center text-3xl font-bold text-gray-900 dark:text-gray-100 md:text-5xl">
+ <div className="mb-3 max-w-[20ch] text-center text-3xl font-bold text-gray-900 md:text-5xl dark:text-gray-100">
{isUserACreator ? (
<>
🎉 <br />
diff --git a/apps/web/src/app/wizard/_components/create.action.ts b/apps/web/src/app/wizard/_components/create.action.ts
index 8b1b362d..8de69108 100644
--- a/apps/web/src/app/wizard/_components/create.action.ts
+++ b/apps/web/src/app/wizard/_components/create.action.ts
@@ -1,7 +1,7 @@
'use server';
import { prisma } from '@repo/db';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { type CreateChallengeSchema } from '.';
export async function uploadChallenge(data: CreateChallengeSchema, isUserACreator: boolean) {
diff --git a/apps/web/src/components/Navigation/index.tsx b/apps/web/src/components/Navigation/index.tsx
index ecc61b5b..5f2696ae 100644
--- a/apps/web/src/components/Navigation/index.tsx
+++ b/apps/web/src/components/Navigation/index.tsx
@@ -1,4 +1,4 @@
-import { auth, type Session } from '@repo/auth/server';
+import { type Session } from '@repo/auth/server';
import { Badge } from '@repo/ui/components/badge';
import {
DropdownMenu,
@@ -19,6 +19,7 @@ import { NavLink } from './nav-link';
import { NavWrapper } from './nav-wrapper';
import { SignOutLink } from './signout-link';
import { SkipToCodeEditor } from './skip-to-code-editor';
+import { auth } from '~/server/auth';
export function getAdminUrl() {
// reference for vercel.com
diff --git a/apps/web/src/components/Navigation/nav-link.tsx b/apps/web/src/components/Navigation/nav-link.tsx
index 22cd40d3..aea77a03 100644
--- a/apps/web/src/components/Navigation/nav-link.tsx
+++ b/apps/web/src/components/Navigation/nav-link.tsx
@@ -1,4 +1,5 @@
'use client';
+
import clsx from 'clsx';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
diff --git a/apps/web/src/components/ReportDialog/report-dialog.action.ts b/apps/web/src/components/ReportDialog/report-dialog.action.ts
index 0d876964..ab795a83 100644
--- a/apps/web/src/components/ReportDialog/report-dialog.action.ts
+++ b/apps/web/src/components/ReportDialog/report-dialog.action.ts
@@ -1,6 +1,6 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import { type Prisma, type Report } from '@repo/db/types';
diff --git a/apps/web/src/components/footsies.tsx b/apps/web/src/components/footsies.tsx
index dc8f078e..7ef66347 100644
--- a/apps/web/src/components/footsies.tsx
+++ b/apps/web/src/components/footsies.tsx
@@ -33,7 +33,7 @@ export async function Footsies() {
</a>
</div>
</div>
- <div className="container flex flex-col justify-between gap-2 text-neutral-500 dark:text-neutral-400 md:flex-row md:items-end">
+ <div className="container flex flex-col justify-between gap-2 text-neutral-500 md:flex-row md:items-end dark:text-neutral-400">
<span>
<Link
href="/privacy"
diff --git a/apps/web/src/server/auth.ts b/apps/web/src/server/auth.ts
new file mode 100644
index 00000000..dce50369
--- /dev/null
+++ b/apps/web/src/server/auth.ts
@@ -0,0 +1,35 @@
+import NextAuth from '@repo/auth/next-auth';
+
+import { baseNextAuthConfig, createGitHubProvider } from '@repo/auth/server';
+
+if (!process.env.GITHUB_ID) {
+ throw new Error('No GITHUB_ID has been provided.');
+}
+
+if (!process.env.GITHUB_SECRET) {
+ throw new Error('No GITHUB_SECRET has been provided.');
+}
+
+const useSecureCookies = process.env.VERCEL_ENV === 'production';
+const cookiePrefix = useSecureCookies ? '__Secure-' : '';
+const cookieDomain = useSecureCookies ? 'typehero.dev' : undefined;
+
+export const authOptions = {
+ ...baseNextAuthConfig,
+ cookies: {
+ sessionToken: {
+ name: `${cookiePrefix}next-auth.session-token`,
+ options: {
+ httpOnly: true,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ sameSite: 'lax' as any,
+ path: '/',
+ domain: cookieDomain,
+ secure: useSecureCookies,
+ },
+ },
+ },
+ providers: [createGitHubProvider(process.env.GITHUB_ID, process.env.GITHUB_SECRET)],
+};
+
+export const { handlers, auth } = NextAuth(authOptions);
diff --git a/apps/web/src/utils/feature-flags.ts b/apps/web/src/utils/feature-flags.ts
index 6561b8dd..d3f03b98 100644
--- a/apps/web/src/utils/feature-flags.ts
+++ b/apps/web/src/utils/feature-flags.ts
@@ -7,6 +7,7 @@ export const mockFlags = {
enableEarlyAccess: false,
enableInChallengeTrack: true,
enableHolidayEvent: true,
+ enableAotPlatform: true,
};
export async function getAllFlags() {
diff --git a/apps/web/src/utils/server/get-similar-challenges.ts b/apps/web/src/utils/server/get-similar-challenges.ts
index 3035c7ec..7ebd9db6 100644
--- a/apps/web/src/utils/server/get-similar-challenges.ts
+++ b/apps/web/src/utils/server/get-similar-challenges.ts
@@ -1,5 +1,5 @@
'use server';
-import { auth } from '@repo/auth/server';
+import { auth } from '~/server/auth';
import { prisma } from '@repo/db';
import type { Challenge } from '@repo/db/types';
diff --git a/packages/auth/src/server.ts b/packages/auth/src/server.ts
index 827f83d3..7ebd74bd 100644
--- a/packages/auth/src/server.ts
+++ b/packages/auth/src/server.ts
@@ -2,7 +2,7 @@ import { PrismaAdapter } from '@auth/prisma-adapter';
import type { Role, RoleTypes, User } from '@repo/db/types';
import GitHubProvider from 'next-auth/providers/github';
import { prisma } from '@repo/db';
-import NextAuth from './next-auth';
+import type { NextAuthConfig } from 'next-auth';
export type { Session, DefaultSession as DefaultAuthSession } from 'next-auth';
@@ -24,37 +24,14 @@ declare module '@auth/core/adapters' {
}
}
-if (!process.env.GITHUB_ID) {
- throw new Error('No GITHUB_ID has been provided.');
-}
-
-if (!process.env.GITHUB_SECRET) {
- throw new Error('No GITHUB_SECRET has been provided.');
-}
-
const useSecureCookies = process.env.VERCEL_ENV === 'production';
const cookiePrefix = useSecureCookies ? '__Secure-' : '';
const cookieDomain = useSecureCookies ? 'typehero.dev' : undefined;
-export const {
- handlers: { GET, POST },
- auth,
-} = NextAuth({
+export const baseNextAuthConfig: Omit<NextAuthConfig, 'providers'> = {
pages: {
signIn: '/login',
},
- cookies: {
- sessionToken: {
- name: `${cookiePrefix}next-auth.session-token`,
- options: {
- httpOnly: true,
- sameSite: 'lax',
- path: '/',
- domain: cookieDomain,
- secure: useSecureCookies,
- },
- },
- },
adapter: {
...PrismaAdapter(prisma),
// Override createUser method to add default USER role
@@ -100,16 +77,17 @@ export const {
};
},
},
- providers: [
- GitHubProvider({
- clientId: process.env.GITHUB_ID!,
- clientSecret: process.env.GITHUB_SECRET!,
- profile: (p) => ({
- id: p.id.toString(),
- name: p.login,
- email: p.email,
- image: p.avatar_url,
- }),
+};
+
+export const createGitHubProvider = (clientId: string, clientSecret: string) => {
+ return GitHubProvider({
+ clientId,
+ clientSecret,
+ profile: (p) => ({
+ id: p.id.toString(),
+ name: p.login,
+ email: p.email,
+ image: p.avatar_url,
}),
- ],
-});
+ });
+};
diff --git a/packages/db/seed/data/challenge-ingest.ts b/packages/db/seed/data/challenge-ingest.ts
index b34cd3f8..2f90b26e 100644
--- a/packages/db/seed/data/challenge-ingest.ts
+++ b/packages/db/seed/data/challenge-ingest.ts
@@ -2,7 +2,8 @@ import { type Prisma } from '@prisma/client';
import fs from 'node:fs';
import path from 'node:path';
-export async function ingestChallenges(challengePath: string) {
+const defaultExcludes = ['blank', 'solutions', 'aot'];
+export async function ingestChallenges(challengePath: string, excludes = defaultExcludes) {
const challengesToCreate: (Prisma.ChallengeCreateManyInput & { author: string })[] = [];
try {
const items = await fs.promises.readdir(challengePath);
@@ -10,18 +11,14 @@ export async function ingestChallenges(challengePath: string) {
for (const item of items) {
const itemPath = path.join(challengePath, item);
- if (
- itemPath.includes('blank') ||
- itemPath.includes('solutions')
- // itemPath.includes('aot')
- ) {
+ if (excludes.some((x) => itemPath.includes(x))) {
continue;
}
const stats = await fs.promises.stat(itemPath);
if (stats.isDirectory()) {
- const challengeToCreate = await buildChallenge(itemPath);
+ const challengeToCreate = await buildChallenge(itemPath, excludes);
challengesToCreate.push(challengeToCreate);
}
}
@@ -32,7 +29,7 @@ export async function ingestChallenges(challengePath: string) {
return challengesToCreate;
}
-async function buildChallenge(pathToDirectory: string) {
+async function buildChallenge(pathToDirectory: string, excludes: string[]) {
const challengeToCreate: Prisma.ChallengeCreateManyInput & { author: string } = {
status: 'ACTIVE',
} as Prisma.ChallengeCreateManyInput & { author: string };
@@ -42,7 +39,7 @@ async function buildChallenge(pathToDirectory: string) {
for (const file of files) {
const itemPath = path.join(pathToDirectory, file);
- if (itemPath.includes('blank') || itemPath.includes('solutions')) {
+ if (excludes.some((x) => itemPath.includes(x))) {
continue;
}
diff --git a/packages/db/temp/populate-aot-2023.ts b/packages/db/temp/populate-aot-2023.ts
index e363530b..81e769bc 100644
--- a/packages/db/temp/populate-aot-2023.ts
+++ b/packages/db/temp/populate-aot-2023.ts
@@ -8,10 +8,11 @@ const __dirname = path.dirname(__filename);
const challengePath = path.join(__dirname, '../../../challenges/aot/2023');
+const excludes = ['blank', 'solutions'];
export const slugify = (str: string) => str.toLowerCase().replace(/\s/g, '-');
try {
- const challengesToUpdateOrCreate = await ingestChallenges(challengePath);
+ const challengesToUpdateOrCreate = await ingestChallenges(challengePath, excludes);
const transactions = [];
for (const challenge of challengesToUpdateOrCreate) {
@@ -39,6 +40,7 @@ try {
}),
);
}
+
await prisma.$transaction(transactions);
await prisma.$disconnect();
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 198e813a..831b3cc3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -81,8 +81,8 @@ importers:
specifier: workspace:*
version: link:../../packages/ui
'@tanstack/react-query':
- specifier: ^5.8.1
+ specifier: 5.51.21
+ version: 5.51.21([email protected])
'@tanstack/react-table':
specifier: ^8.9.3
@@ -94,10 +94,10 @@ importers:
version: 2.6.0-beta.12
next:
specifier: 14.2.5
next-themes:
specifier: ^0.2.1
react:
specifier: 18.2.0
version: 18.2.0
@@ -123,8 +123,8 @@ importers:
specifier: ^1.0.6
version: 1.0.6([email protected])
zod:
- specifier: ^3.21.4
- version: 3.21.4
+ specifier: 3.23.3
+ version: 3.23.3
devDependencies:
'@repo/tsconfig':
specifier: workspace:*
@@ -161,7 +161,7 @@ importers:
eslint-plugin-import:
specifier: ^2.27.5
postcss:
specifier: ^8.4.26
version: 8.4.26
@@ -180,22 +180,67 @@ importers:
apps/aot:
dependencies:
+ '@tanstack/react-query':
+ specifier: 5.51.21
+ version: 5.51.21([email protected])
+ '@trpc/client':
+ specifier: ^11.0.0-rc.446
+ version: 11.0.0-rc.477(@trpc/[email protected])
+ '@trpc/react-query':
+ specifier: ^11.0.0-rc.446
+ '@trpc/server':
+ specifier: ^11.0.0-rc.446
+ version: 11.0.0-rc.477
+ '@vercel/edge-config':
+ specifier: ^0.2.1
+ version: 0.2.1
+ clsx:
+ specifier: ^2.0.0
+ version: 2.0.0
next:
specifier: 14.2.5
+ next-themes:
+ specifier: ^0.2.1
react:
specifier: 18.2.0
version: 18.2.0
react-dom:
specifier: 18.2.0
version: 18.2.0([email protected])
+ server-only:
+ specifier: ^0.0.1
+ version: 0.0.1
+ superjson:
+ specifier: ^2.2.1
+ version: 2.2.1
+ zod:
+ specifier: 3.23.3
+ version: 3.23.3
devDependencies:
+ '@repo/auth':
+ specifier: workspace:*
+ version: link:../../packages/auth
+ '@repo/db':
+ specifier: workspace:*
+ version: link:../../packages/db
'@repo/lint':
specifier: workspace:*
version: link:../../tooling/config-eslint
+ '@repo/monaco':
+ specifier: workspace:*
+ version: link:../../packages/monaco
+ '@repo/og-image':
+ specifier: workspace:*
+ version: link:../og-image
'@repo/tsconfig':
specifier: workspace:*
version: link:../../tooling/config-typescript
+ '@repo/ui':
+ specifier: workspace:*
+ version: link:../../packages/ui
'@tailwindcss/container-queries':
specifier: ^0.1.1
version: 0.1.1([email protected])
@@ -265,7 +310,7 @@ importers:
version: 1.0.0
next:
specifier: 14.2.5
react:
specifier: 18.2.0
version: 18.2.0
@@ -273,8 +318,8 @@ importers:
specifier: 18.2.0
version: 18.2.0([email protected])
zod:
- specifier: ^3.21.4
- version: 3.21.4
+ specifier: 3.23.3
+ version: 3.23.3
devDependencies:
'@repo/lint':
specifier: workspace:*
@@ -341,16 +386,16 @@ importers:
version: link:../../packages/ui
'@sentry/nextjs':
specifier: ^7.73.0
'@t3-oss/env-nextjs':
specifier: ^0.6.0
'@tanstack/react-query':
- specifier: ^5.8.1
+ specifier: 5.51.21
+ version: 5.51.21([email protected])
'@tanstack/react-query-devtools':
- specifier: ^5.8.1
+ specifier: 5.51.21
'@tanstack/react-table':
specifier: ^8.9.3
@@ -359,7 +404,7 @@ importers:
'@uploadthing/react':
specifier: ^6.2.2
'@vercel/analytics':
specifier: ^1.1.1
version: 1.1.1
@@ -368,10 +413,10 @@ importers:
version: 0.2.1
'@vercel/speed-insights':
specifier: ^1.0.12
'@vercel/toolbar':
specifier: ^0.1.1
- version: 0.1.1(patch_hash=mukejyv3x4f3mriytfjb3reaxi)([email protected](@babel/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected]))
+ version: 0.1.1(patch_hash=mukejyv3x4f3mriytfjb3reaxi)([email protected](@playwright/[email protected])([email protected]([email protected]))([email protected]))
algoliasearch:
specifier: ^4.20.0
version: 4.20.0
@@ -404,10 +449,10 @@ importers:
version: 0.4.0(patch_hash=j3oqxjoadtct3pc6tokddngzsm)([email protected])
next:
specifier: 14.2.5
next-themes:
specifier: ^0.2.1
react:
specifier: 18.2.0
version: 18.2.0
@@ -431,7 +476,7 @@ importers:
react-instantsearch-nextjs:
specifier: ^0.1.5
react-intersection-observer:
specifier: ^9.5.2
version: 9.5.2([email protected])
@@ -469,8 +514,8 @@ importers:
specifier: 6.3.1
version: 6.3.1
zod:
- specifier: ^3.21.4
- version: 3.21.4
+ specifier: 3.23.3
+ version: 3.23.3
zustand:
specifier: ^4.3.9
version: 4.3.9([email protected])
@@ -519,7 +564,7 @@ importers:
eslint-plugin-import:
specifier: ^2.27.5
postcss:
specifier: ^8.4.26
version: 8.4.26
@@ -808,7 +853,7 @@ importers:
dependencies:
'@next/eslint-plugin-next':
specifier: canary
- version: 15.0.0-canary.101
+ version: 15.0.0-canary.103
'@repo/tsconfig':
specifier: workspace:*
version: link:../config-typescript
@@ -820,7 +865,7 @@ importers:
'@vercel/style-guide':
specifier: ^4.0.2
eslint:
specifier: ^8.45.0
version: 8.45.0
@@ -1897,8 +1942,8 @@ packages:
resolution: {integrity: sha512-YJqyq6vk39JQfvaNtN83t/p5Jy45+bazRL+V4QI8FPd3FBqFYMEsULiwRLgSJMgFqkk4t4JbeZurz+gILEAFpA==}
- resolution: {integrity: sha512-dKqDu3omRlS3k/ibQAp8QIwRJL46HxpXR2x9QXrw+XLe7NAzIDG6NUlJhMCcNhy9TLDikCwmnC7AJzOLtuEuSQ==}
+ resolution: {integrity: sha512-0k+NTwLbjYEVrjCHZgbD0sypI2u0pnHOiPKKS5uOJmi43OLyVyqx8HlmBKHORmQue6lh9Aut749MO4+c9+B6WA==}
resolution: {integrity: sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ==}
@@ -3074,30 +3119,22 @@ packages:
peerDependencies:
tailwindcss: '>=3.0.0 || insiders'
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-Y0enatz2zQXBAsd7XmajlCs+WaitdR7dIFkqz9Xd7HL4KV04JOigWVreYseTmNH7YFSBSC/BJ9uuNp1MAf+GfA==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-POQxm42IUp6n89kKWF4IZi18v3fxQWFRolvBA6phNVmA8psdfB1MvDnGacCJdS+EOX12w/CyHM62z//rHmYmvw==}
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-wx+gwRZUZq7ISXKFJgaAYvVPt+DwTaLKlzaVLB9SLBFIzcL8Jz8jDQGR9ZQp7/O7SVj0TohS8aFuiiGzQUvWyg==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-ajwuq4WnkNCMj/Hy3KR8d3RtZ6PSKc1dD2vs2T408MdjgKzQ3klVoL6zDgVO7X+5jlb5zfgcO3thh4ojPhfIaw==}
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-sE6El2Yj98LlPDzf2Ju9IjWPZvqh2RgoQZ+Jomrfm80uA1HlHUvhXuOB0mOcyc706ZpNpL54no59JbgpHcMuUg==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-mi5ef8dvsS48GsG6/8M60O2EgrzPK1kNPngOcHBTlIUrB5dGkxP9fuHf05GQRxtSp5W5GlyeUpzOmtkKNpf9dQ==}
peerDependencies:
- '@tanstack/react-query': ^5.8.1
- react: ^18.0.0
- react-dom: ^18.0.0
+ '@tanstack/react-query': ^5.51.21
+ react: ^18 || ^19
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-YMagxS8iNPOLg0pK6WOjdSDlAvWKOf69udLOwQrBVmkC2SRLNLko7elo5Ro3ptlJkXvTVHidxC/h5KGi5bH1XQ==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-Q/V81x3sAYgCsxjwOkfLXfrmoG+FmDhLeHH5okC/Bp8Aaw2c33lbEo/mMcMnkxUPVtB2FLpzHT0tq3c+OlZEbw==}
peerDependencies:
react: ^18.0.0
- react-dom: ^18.0.0
- react-native: '*'
- peerDependenciesMeta:
- react-dom:
- optional: true
- react-native:
- optional: true
'@tanstack/[email protected]':
resolution: {integrity: sha512-Ng9rdm3JPoSCi6cVZvANsYnF+UoGVRxflMb270tVj0+LjeT/ZtZ9ckxF6oLPLcKesza6VKBqtdF9mQ+vaz24Aw==}
@@ -3170,6 +3207,23 @@ packages:
resolution: {integrity: sha512-GgdKez5AaQRIm0kFNp7BZnxFQ2F7LZ7g3rOQ/v11oYZR3jhH7JPGM+7hZQjYqFXD/5TK/of7hepu418K2fghvg==}
engines: {node: '>=12.4.0'}
+ resolution: {integrity: sha512-Ah/Er3vxTm2bIEUcIrike7Z/8Yc+DkFveU2ZHQQ0+zY7yxs931438+4OEJuY/Xl/0p5OTDeZTm6HBuZ1REFiyA==}
+ peerDependencies:
+ '@trpc/server': 11.0.0-rc.477+a467f8314
+
+ resolution: {integrity: sha512-1ZCAm0wv7yLmb3muq+5DTRxdKXzI1KjTrcM2+QRKCFu6EherGM8x6zGI36P9ZmC6o+SCoedzxqazDNe+kkqVqA==}
+ peerDependencies:
+ '@tanstack/react-query': ^5.49.2
+ '@trpc/client': 11.0.0-rc.477+a467f8314
+ '@trpc/server': 11.0.0-rc.477+a467f8314
+ react: '>=18.2.0'
+ react-dom: '>=18.2.0'
+
+ resolution: {integrity: sha512-K6zmjRv96fWilqm/ETehEK1DWsy5bSyrs2xbsNzCbjguMgamMhOClRHgYzJcwgLp2kasJ7QgD9YbahOhV1/u1w==}
+
resolution: {integrity: sha512-Vqm22aZrCvCd6I5g1SvpW151jfqwTzEZ7XJ3yZ6xaZG31nUEOEyzzVImjRcsN8Wi/QyPxId/x8GTtgIbsy8kEw==}
@@ -7355,6 +7409,10 @@ packages:
resolution: {integrity: sha512-vkpPQAxdCg9SLfPv5GPC5fnGrui/WryktoN9O5+Zif/14QIMjw+RITf/5LbBh+9QpBFb3KNvJth+puz2H8o6GQ==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==}
+ engines: {node: '>=16'}
+
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
engines: {node: '>=4'}
@@ -8047,8 +8105,8 @@ packages:
resolution: {integrity: sha512-UfZ0oa0C8LI58wJ+moL46BDIMgCQbnsb+2PoiJYtonhBsMh2bq1eRBVkvjfVsqbEHd9/EgKPUuL9saSSsec8OA==}
engines: {node: '>= 12.0.0'}
- resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==}
+ resolution: {integrity: sha512-tPvq1B/2Yu/dh2uAIH2/BhUlUeLIUvAjr6dpL/75I0pCYefHgjhXk1o1Kob3kTU8C7yU1j396jFHlsVWFi9ogg==}
resolution: {integrity: sha512-Tat5r8jOMG1Vcsj8uldMyqYKC5IZvQif8zetmLHs9WoZlntTHmIoNM8TpLRY31ExncuUvUOXehd0kvahkuHjDw==}
@@ -8991,7 +9049,7 @@ snapshots:
dependencies:
glob: 7.1.7
dependencies:
fast-glob: 3.3.1
@@ -10269,7 +10327,7 @@ snapshots:
localforage: 1.10.0
tslib: 2.6.0
dependencies:
'@rollup/plugin-commonjs': 24.0.0([email protected])
'@sentry/core': 7.73.0
@@ -10281,7 +10339,7 @@ snapshots:
'@sentry/vercel-edge': 7.73.0
'@sentry/webpack-plugin': 1.20.0
chalk: 3.0.0
react: 18.2.0
rollup: 2.78.0
stacktrace-parser: 0.1.10
@@ -10358,16 +10416,16 @@ snapshots:
'@swc/counter': 0.1.3
tslib: 2.6.2
dependencies:
typescript: 5.3.3
- zod: 3.21.4
+ zod: 3.23.3
dependencies:
- '@t3-oss/env-core': 0.6.0([email protected])([email protected])
+ '@t3-oss/env-core': 0.6.0([email protected])([email protected])
typescript: 5.3.3
- zod: 3.21.4
+ zod: 3.23.3
dependencies:
@@ -10381,23 +10439,20 @@ snapshots:
postcss-selector-parser: 6.0.10
tailwindcss: 3.4.7
- '@tanstack/[email protected]': {}
+ '@tanstack/[email protected]': {}
- '@tanstack/[email protected]': {}
+ '@tanstack/[email protected]': {}
dependencies:
- '@tanstack/query-devtools': 5.7.4
- '@tanstack/react-query': 5.8.1([email protected]([email protected]))([email protected])
+ '@tanstack/query-devtools': 5.51.16
+ '@tanstack/react-query': 5.51.21([email protected])
react: 18.2.0
- react-dom: 18.2.0([email protected])
dependencies:
- '@tanstack/query-core': 5.8.1
+ '@tanstack/query-core': 5.51.21
react: 18.2.0
- optionalDependencies:
- react-dom: 18.2.0([email protected])
dependencies:
@@ -10479,6 +10534,20 @@ snapshots:
'@tinyhttp/[email protected]': {}
+ dependencies:
+ '@trpc/server': 11.0.0-rc.477
+
+ dependencies:
+ '@tanstack/react-query': 5.51.21([email protected])
+ '@trpc/client': 11.0.0-rc.477(@trpc/[email protected])
+ '@trpc/server': 11.0.0-rc.477
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+
+ '@trpc/[email protected]': {}
+
'@types/[email protected]': {}
'@types/[email protected]': {}
@@ -10772,7 +10841,7 @@ snapshots:
'@uploadthing/[email protected]': {}
dependencies:
'@uploadthing/dropzone': 0.1.1
'@uploadthing/shared': 6.2.0(@uploadthing/[email protected])
@@ -10782,7 +10851,7 @@ snapshots:
tailwind-merge: 1.14.0
uploadthing: 6.3.1
optionalDependencies:
transitivePeerDependencies:
- '@uploadthing/mime-types'
@@ -10825,12 +10894,12 @@ snapshots:
satori: 0.0.46
yoga-wasm-web: 0.3.0
optionalDependencies:
react: 18.2.0
dependencies:
'@babel/core': 7.22.10
'@babel/eslint-parser': 7.22.10(@babel/[email protected])([email protected])
@@ -10852,7 +10921,7 @@ snapshots:
eslint-plugin-unicorn: 43.0.2([email protected])
prettier-plugin-packagejson: 2.4.3([email protected])
optionalDependencies:
- '@next/eslint-plugin-next': 15.0.0-canary.101
+ '@next/eslint-plugin-next': 15.0.0-canary.103
eslint: 8.45.0
prettier: 3.1.1
typescript: 5.3.3
@@ -10862,14 +10931,14 @@ snapshots:
- jest
- supports-color
+ '@vercel/[email protected](patch_hash=mukejyv3x4f3mriytfjb3reaxi)([email protected](@playwright/[email protected])([email protected]([email protected]))([email protected]))':
dependencies:
'@tinyhttp/app': 1.3.0
chokidar: 3.5.3
execa: 5.1.1
find-up: 5.0.0
get-port: 5.1.1
'@vitest/[email protected]':
dependencies:
@@ -12278,6 +12347,31 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
+ dependencies:
+ array-includes: 3.1.6
+ array.prototype.flat: 1.3.1
+ array.prototype.flatmap: 1.3.1
+ debug: 3.2.7
+ doctrine: 2.1.0
+ eslint: 8.45.0
+ eslint-import-resolver-node: 0.3.7
+ has: 1.0.3
+ is-core-module: 2.12.1
+ is-glob: 4.0.3
+ minimatch: 3.1.2
+ object.values: 1.1.6
+ resolve: 1.22.2
+ semver: 6.3.1
+ tsconfig-paths: 3.14.2
+ optionalDependencies:
+ '@typescript-eslint/parser': 5.62.0([email protected])([email protected])
+ transitivePeerDependencies:
+ - eslint-import-resolver-typescript
+ - eslint-import-resolver-webpack
+ - supports-color
+
dependencies:
array-includes: 3.1.6
@@ -14163,15 +14257,15 @@ snapshots:
react: 18.3.1
dependencies:
react: 18.2.0
react-dom: 18.2.0([email protected])
dependencies:
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -14181,7 +14275,7 @@ snapshots:
react: 18.2.0
react-dom: 18.3.1([email protected])
dependencies:
'@next/env': 14.2.5
'@swc/helpers': 0.5.5
@@ -14202,12 +14296,11 @@ snapshots:
'@next/swc-win32-arm64-msvc': 14.2.5
'@next/swc-win32-ia32-msvc': 14.2.5
'@next/swc-win32-x64-msvc': 14.2.5
- '@playwright/test': 1.38.0
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
dependencies:
'@next/env': 14.2.5
'@swc/helpers': 0.5.5
@@ -14228,6 +14321,7 @@ snapshots:
'@next/swc-win32-arm64-msvc': 14.2.5
'@next/swc-win32-ia32-msvc': 14.2.5
'@next/swc-win32-x64-msvc': 14.2.5
+ '@playwright/test': 1.38.0
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
@@ -14885,9 +14979,9 @@ snapshots:
react: 18.2.0
use-sync-external-store: 1.2.0([email protected])
dependencies:
@@ -15615,6 +15709,10 @@ snapshots:
dependencies:
copy-anything: 3.0.5
+ dependencies:
+ copy-anything: 3.0.5
+
dependencies:
has-flag: 3.0.0
@@ -16372,7 +16470,7 @@ snapshots:
compress-commons: 5.0.1
readable-stream: 3.6.2
dependencies:
diff --git a/turbo.json b/turbo.json
index 9e98d5c9..bd338e4f 100644
--- a/turbo.json
+++ b/turbo.json
@@ -13,8 +13,8 @@
"DATABASE_URL",
"GITHUB_ID",
"GITHUB_SECRET",
- "GITHUB_ADMIN_ID",
- "GITHUB_ADMIN_SECRET",
+ "GITHUB_AOT_ID",
+ "GITHUB_AOT_SECRET",
"UPLOADTHING_SECRET",
"UPLOADTHING_APP_ID",
"EDGE_CONFIG",