From 420cd53bbac9d67ddc12a0b87d42f8fa1b4fd563 Mon Sep 17 00:00:00 2001 From: Niraj Naphade Date: Sat, 30 Aug 2025 19:02:52 +0530 Subject: [PATCH] 03 : clerk authentication --- apps/web/app/(auth)/layout.tsx | 10 + .../(auth)/sign-in/[[...sign-in]]/page.tsx | 12 + .../app/(auth)/sign-up/[[...sgn-up]]/page.tsx | 12 + apps/web/app/layout.tsx | 5 +- apps/web/app/page.tsx | 18 +- apps/web/app/test/page.tsx | 11 + apps/web/components/providers.tsx | 12 +- apps/web/middleware.ts | 22 ++ apps/web/package.json | 3 +- apps/widget/app/page.tsx | 1 + packages/backend/convex/auth.config.ts | 8 + packages/backend/convex/users.ts | 5 + packages/eslint-config/package.json | 4 +- pnpm-lock.yaml | 283 ++++++++++++++---- 14 files changed, 332 insertions(+), 74 deletions(-) create mode 100644 apps/web/app/(auth)/layout.tsx create mode 100644 apps/web/app/(auth)/sign-in/[[...sign-in]]/page.tsx create mode 100644 apps/web/app/(auth)/sign-up/[[...sgn-up]]/page.tsx create mode 100644 apps/web/app/test/page.tsx create mode 100644 apps/web/middleware.ts create mode 100644 packages/backend/convex/auth.config.ts diff --git a/apps/web/app/(auth)/layout.tsx b/apps/web/app/(auth)/layout.tsx new file mode 100644 index 0000000..8496b19 --- /dev/null +++ b/apps/web/app/(auth)/layout.tsx @@ -0,0 +1,10 @@ +const Layout = ({ children }: { children: React.ReactNode }) => { + return ( +
+ {children} +
+ ); +}; + +export default Layout; + \ No newline at end of file diff --git a/apps/web/app/(auth)/sign-in/[[...sign-in]]/page.tsx b/apps/web/app/(auth)/sign-in/[[...sign-in]]/page.tsx new file mode 100644 index 0000000..4d40e38 --- /dev/null +++ b/apps/web/app/(auth)/sign-in/[[...sign-in]]/page.tsx @@ -0,0 +1,12 @@ +import { SignIn } from '@clerk/nextjs' +import React from 'react' + +const Page = () => { + return ( +
+ +
+ ) +} + +export default Page diff --git a/apps/web/app/(auth)/sign-up/[[...sgn-up]]/page.tsx b/apps/web/app/(auth)/sign-up/[[...sgn-up]]/page.tsx new file mode 100644 index 0000000..8fdfe2d --- /dev/null +++ b/apps/web/app/(auth)/sign-up/[[...sgn-up]]/page.tsx @@ -0,0 +1,12 @@ +import { SignUp } from '@clerk/nextjs' +import React from 'react' + +const Page = () => { + return ( +
+ +
+ ) +} + +export default Page diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 7a807d4..bb87142 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -2,6 +2,7 @@ import { Geist, Geist_Mono } from "next/font/google" import "@workspace/ui/globals.css" import { Providers } from "@/components/providers" +import { ClerkProvider } from "@clerk/nextjs" const fontSans = Geist({ subsets: ["latin"], @@ -23,7 +24,9 @@ export default function RootLayout({ - {children} + + {children} + ) diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 91eaf82..4fc9cfe 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -1,16 +1,32 @@ "use client" -import { useQuery } from 'convex/react'; +import { Authenticated, Unauthenticated, useMutation, useQuery } from 'convex/react'; import { api } from "@workspace/backend/_generated/api"; +import { SignInButton, UserButton } from '@clerk/nextjs'; +import { Button } from "../../../packages/ui/src/components/button" export default function Page() { const users = useQuery(api.users.getMany); + const addUser = useMutation(api.users.add); + return ( + <> +
+ + + {JSON.stringify(users)} {JSON.stringify(users)}
+
+ +

Must be signed in!

+ SignIn! +
+ + ) } diff --git a/apps/web/app/test/page.tsx b/apps/web/app/test/page.tsx new file mode 100644 index 0000000..91bd110 --- /dev/null +++ b/apps/web/app/test/page.tsx @@ -0,0 +1,11 @@ +import React from 'react' + +const Page = () => { + return ( +
+ Test Page +
+ ) +} + +export default Page diff --git a/apps/web/components/providers.tsx b/apps/web/components/providers.tsx index 8f1c6b9..9417f1d 100644 --- a/apps/web/components/providers.tsx +++ b/apps/web/components/providers.tsx @@ -1,8 +1,14 @@ "use client" import * as React from "react" +import { useAuth } from '@clerk/nextjs' import { ThemeProvider as NextThemesProvider } from "next-themes" -import { ConvexProvider , ConvexReactClient } from "convex/react" +import { ConvexReactClient } from "convex/react" +import { ConvexProviderWithClerk } from 'convex/react-clerk' + +if (!process.env.NEXT_PUBLIC_CONVEX_URL) { + throw new Error('Missing NEXT_PUBLIC_CONVEX_URL in your .env file') +} export function Providers({ children }: { children: React.ReactNode }) { const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL || ""); @@ -14,9 +20,9 @@ export function Providers({ children }: { children: React.ReactNode }) { disableTransitionOnChange enableColorScheme > - + {children} - + ) } diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts new file mode 100644 index 0000000..f17fa6f --- /dev/null +++ b/apps/web/middleware.ts @@ -0,0 +1,22 @@ +import { clerkMiddleware , createRouteMatcher } from '@clerk/nextjs/server' + +const isPublicRoute = createRouteMatcher([ + "/sign-in(.*)", + "/sign-up(.*)", + "/test" +]) + +export default clerkMiddleware(async (auth,req) => { + if(!isPublicRoute(req)) { + await auth.protect(); + } +}) + +export const config = { + matcher: [ + // Skip Next.js internals and all static files, unless found in search params + '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', + // Always run for API routes + '/(api|trpc)(.*)', + ], +} \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json index a372c5b..f8b5d3d 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -12,7 +12,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@workspace/backend" : "workspace:*", + "@clerk/nextjs": "^6.31.6", + "@workspace/backend": "workspace:*", "@workspace/math": "workspace:*", "@workspace/ui": "workspace:*", "convex": "1.25.4", diff --git a/apps/widget/app/page.tsx b/apps/widget/app/page.tsx index 61eb0a5..2beddce 100644 --- a/apps/widget/app/page.tsx +++ b/apps/widget/app/page.tsx @@ -14,6 +14,7 @@ export default function Page() {
{JSON.stringify(users)} +

Widget Page

) diff --git a/packages/backend/convex/auth.config.ts b/packages/backend/convex/auth.config.ts new file mode 100644 index 0000000..32581dd --- /dev/null +++ b/packages/backend/convex/auth.config.ts @@ -0,0 +1,8 @@ +export default { + providers : [ + { + domain : process.env.CLERK_JWT_ISSUER_DOMAIN, + applicationID : 'convex', + } + ] +} \ No newline at end of file diff --git a/packages/backend/convex/users.ts b/packages/backend/convex/users.ts index 9f35073..3d7d434 100644 --- a/packages/backend/convex/users.ts +++ b/packages/backend/convex/users.ts @@ -11,6 +11,11 @@ export const getMany = query({ export const add = mutation({ args : {}, handler : async(ctx) => { + const identity = await ctx.auth.getUserIdentity(); + console.log(identity); + if( identity === null ) { + throw new Error('Not Authenticated!') + } const userID = await ctx.db.insert("users" , { name : "antonio", }); diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 2ee7037..375cc5d 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -9,11 +9,11 @@ "./react-internal": "./react-internal.js" }, "devDependencies": { - "@eslint/js": "^9.34.0", + "@eslint/js": "^9.32.0", "@next/eslint-plugin-next": "^15.4.5", "@typescript-eslint/eslint-plugin": "^8.39.0", "@typescript-eslint/parser": "^8.39.0", - "eslint": "^9.32.0", + "eslint": "^9.32.1", "eslint-config-prettier": "^9.1.2", "eslint-plugin-only-warn": "^1.1.0", "eslint-plugin-react": "^7.37.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6791bc6..52db44d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: apps/web: dependencies: + '@clerk/nextjs': + specifier: ^6.31.6 + version: 6.31.6(next@15.4.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1) '@workspace/backend': specifier: workspace:* version: link:../../packages/backend @@ -37,7 +40,7 @@ importers: version: link:../../packages/ui convex: specifier: 1.25.4 - version: 1.25.4(react@19.1.1) + version: 1.25.4(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) lucide-react: specifier: ^0.475.0 version: 0.475.0(react@19.1.1) @@ -86,7 +89,7 @@ importers: version: link:../../packages/ui convex: specifier: 1.25.4 - version: 1.25.4(react@19.1.1) + version: 1.25.4(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) lucide-react: specifier: ^0.475.0 version: 0.475.0(react@19.1.1) @@ -126,7 +129,7 @@ importers: dependencies: convex: specifier: 1.25.4 - version: 1.25.4(react@19.1.1) + version: 1.25.4(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1) devDependencies: '@workspace/typescript-config': specifier: workspace:* @@ -138,35 +141,35 @@ importers: packages/eslint-config: devDependencies: '@eslint/js': - specifier: ^9.34.0 + specifier: ^9.32.0 version: 9.34.0 '@next/eslint-plugin-next': specifier: ^15.4.5 version: 15.4.5 '@typescript-eslint/eslint-plugin': specifier: ^8.39.0 - version: 8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) + version: 8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) '@typescript-eslint/parser': specifier: ^8.39.0 - version: 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) + version: 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) eslint: - specifier: ^9.32.0 - version: 9.32.0(jiti@2.5.1) + specifier: ^9.32.1 + version: 9.34.0(jiti@2.5.1) eslint-config-prettier: specifier: ^9.1.2 - version: 9.1.2(eslint@9.32.0(jiti@2.5.1)) + version: 9.1.2(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-only-warn: specifier: ^1.1.0 version: 1.1.0 eslint-plugin-react: specifier: ^7.37.5 - version: 7.37.5(eslint@9.32.0(jiti@2.5.1)) + version: 7.37.5(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-react-hooks: specifier: ^5.2.0 - version: 5.2.0(eslint@9.32.0(jiti@2.5.1)) + version: 5.2.0(eslint@9.34.0(jiti@2.5.1)) eslint-plugin-turbo: specifier: ^2.5.5 - version: 2.5.5(eslint@9.32.0(jiti@2.5.1))(turbo@2.5.5) + version: 2.5.5(eslint@9.34.0(jiti@2.5.1))(turbo@2.5.5) globals: specifier: ^15.15.0 version: 15.15.0 @@ -175,7 +178,7 @@ importers: version: 5.9.2 typescript-eslint: specifier: ^8.39.0 - version: 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) + version: 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) packages/math: devDependencies: @@ -263,6 +266,41 @@ packages: resolution: {integrity: sha512-FVFaVs2/dZgD3Y9ZD+AKNKjyGKzwu0C54laAXWUXgLcVXcCX6YZ6GhK2cp7FogSN2OA0Fu+QT8dP3FUdo9ShSQ==} engines: {node: '>=6.9.0'} + '@clerk/backend@2.10.1': + resolution: {integrity: sha512-6UV9OblBhApQolpTBYg9jRHT5LGEwbAkC10nQoycWs6+3r2LiBE5DAGFp3R0NX0VzqJt4Es3d3e691V/waNAPw==} + engines: {node: '>=18.17.0'} + + '@clerk/clerk-react@5.45.0': + resolution: {integrity: sha512-TgEEUDToeBZlEi+FuzbibAIed7+UazLWmzZZ0Z1ztvI7U8iGYaGrC8+VIE4PosMjrWUy11aW4C5nCwQdq2o5hw==} + engines: {node: '>=18.17.0'} + peerDependencies: + react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + + '@clerk/nextjs@6.31.6': + resolution: {integrity: sha512-9fwSmohQplfHohkOyHvYGxNNPr7TSr84B++BGHgwoZxLGvCogYSJe6mMqlrbrFVzNn6qUiiNyWml9d69/gXtfg==} + engines: {node: '>=18.17.0'} + peerDependencies: + next: ^13.5.7 || ^14.2.25 || ^15.2.3 + react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + + '@clerk/shared@3.23.0': + resolution: {integrity: sha512-HzUzkpjoCMGq3RlpFlWmWYUzD7b2Arqqz5EgPJ5+FsQhCLbq1kHqoTQByTJDX0Ahf8Pvp9E+fbkovaMzBVbuow==} + engines: {node: '>=18.17.0'} + peerDependencies: + react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + + '@clerk/types@4.83.0': + resolution: {integrity: sha512-WEILYgTGkwdB7OUoxHPrdHe/UAUPYvwutJxrwPyHfTejBmRD0RcKmB8VwTqwOxlfQgcKVDfLQ9jLW8m7NeJHIA==} + engines: {node: '>=18.17.0'} + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -434,22 +472,18 @@ packages: resolution: {integrity: sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/config-helpers@0.3.0': - resolution: {integrity: sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==} + '@eslint/config-helpers@0.3.1': + resolution: {integrity: sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.15.1': - resolution: {integrity: sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==} + '@eslint/core@0.15.2': + resolution: {integrity: sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@3.3.1': resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.32.0': - resolution: {integrity: sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.34.0': resolution: {integrity: sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -458,8 +492,8 @@ packages: resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.3.4': - resolution: {integrity: sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==} + '@eslint/plugin-kit@0.3.5': + resolution: {integrity: sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanfs/core@0.19.1': @@ -708,6 +742,9 @@ packages: '@types/react': optional: true + '@stablelib/base64@1.0.1': + resolution: {integrity: sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==} + '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} @@ -1151,6 +1188,10 @@ packages: react: optional: true + cookie@1.0.2: + resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} + engines: {node: '>=18'} + core-js-pure@3.45.0: resolution: {integrity: sha512-OtwjqcDpY2X/eIIg1ol/n0y/X8A9foliaNt1dSK0gV3J2/zw+89FcNG3mPK+N8YWts4ZFUPxnrAzsxs/lf8yDA==} @@ -1215,6 +1256,10 @@ packages: resolution: {integrity: sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==} engines: {node: '>=8'} + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + detect-libc@2.0.4: resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} engines: {node: '>=8'} @@ -1339,8 +1384,8 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.32.0: - resolution: {integrity: sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==} + eslint@9.34.0: + resolution: {integrity: sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1399,6 +1444,9 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-sha256@1.3.0: + resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} + fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} @@ -1474,6 +1522,9 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported @@ -1763,6 +1814,10 @@ packages: resolution: {integrity: sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==} hasBin: true + js-cookie@3.0.5: + resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} + engines: {node: '>=14'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2289,6 +2344,9 @@ packages: sentence-case@2.1.1: resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} + server-only@0.0.1: + resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -2365,6 +2423,12 @@ packages: sprintf-js@1.1.3: resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + standardwebhooks@1.0.0: + resolution: {integrity: sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==} + + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} @@ -2439,6 +2503,11 @@ packages: swap-case@1.1.2: resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + swr@2.3.4: + resolution: {integrity: sha512-bYd2lrhc+VarcpkgWclcUi92wYCpOgMws9Sd1hG1ntAu0NEy+14CbotuFjshBU2kt9rYj9TSmDcybpxpeTU1fg==} + peerDependencies: + react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + tailwind-merge@3.3.1: resolution: {integrity: sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==} @@ -2605,6 +2674,11 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + use-sync-external-store@1.5.0: + resolution: {integrity: sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -2681,6 +2755,53 @@ snapshots: dependencies: core-js-pure: 3.45.0 + '@clerk/backend@2.10.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + dependencies: + '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/types': 4.83.0 + cookie: 1.0.2 + standardwebhooks: 1.0.0 + tslib: 2.8.1 + transitivePeerDependencies: + - react + - react-dom + + '@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + dependencies: + '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/types': 4.83.0 + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) + tslib: 2.8.1 + + '@clerk/nextjs@6.31.6(next@15.4.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + dependencies: + '@clerk/backend': 2.10.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/shared': 3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + '@clerk/types': 4.83.0 + next: 15.4.5(react-dom@19.1.1(react@19.1.1))(react@19.1.1) + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) + server-only: 0.0.1 + tslib: 2.8.1 + + '@clerk/shared@3.23.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)': + dependencies: + '@clerk/types': 4.83.0 + dequal: 2.0.3 + glob-to-regexp: 0.4.1 + js-cookie: 3.0.5 + std-env: 3.9.0 + swr: 2.3.4(react@19.1.1) + optionalDependencies: + react: 19.1.1 + react-dom: 19.1.1(react@19.1.1) + + '@clerk/types@4.83.0': + dependencies: + csstype: 3.1.3 + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -2765,9 +2886,9 @@ snapshots: '@esbuild/win32-x64@0.25.4': optional: true - '@eslint-community/eslint-utils@4.7.0(eslint@9.32.0(jiti@2.5.1))': + '@eslint-community/eslint-utils@4.7.0(eslint@9.34.0(jiti@2.5.1))': dependencies: - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -2780,9 +2901,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.3.0': {} + '@eslint/config-helpers@0.3.1': {} - '@eslint/core@0.15.1': + '@eslint/core@0.15.2': dependencies: '@types/json-schema': 7.0.15 @@ -2800,15 +2921,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.32.0': {} - '@eslint/js@9.34.0': {} '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.3.4': + '@eslint/plugin-kit@0.3.5': dependencies: - '@eslint/core': 0.15.1 + '@eslint/core': 0.15.2 levn: 0.4.1 '@humanfs/core@0.19.1': {} @@ -2988,6 +3107,8 @@ snapshots: optionalDependencies: '@types/react': 19.1.9 + '@stablelib/base64@1.0.1': {} + '@swc/helpers@0.5.15': dependencies: tslib: 2.8.1 @@ -3144,15 +3265,15 @@ snapshots: '@types/tinycolor2@1.4.6': {} - '@typescript-eslint/eslint-plugin@8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) '@typescript-eslint/scope-manager': 8.39.0 - '@typescript-eslint/type-utils': 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/utils': 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/type-utils': 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/utils': 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) '@typescript-eslint/visitor-keys': 8.39.0 - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 @@ -3161,14 +3282,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/parser@8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: '@typescript-eslint/scope-manager': 8.39.0 '@typescript-eslint/types': 8.39.0 '@typescript-eslint/typescript-estree': 8.39.0(typescript@5.9.2) '@typescript-eslint/visitor-keys': 8.39.0 debug: 4.4.1 - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color @@ -3191,13 +3312,13 @@ snapshots: dependencies: typescript: 5.9.2 - '@typescript-eslint/type-utils@8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: '@typescript-eslint/types': 8.39.0 '@typescript-eslint/typescript-estree': 8.39.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/utils': 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) debug: 4.4.1 - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) ts-api-utils: 2.1.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: @@ -3221,13 +3342,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/utils@8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0(jiti@2.5.1)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) '@typescript-eslint/scope-manager': 8.39.0 '@typescript-eslint/types': 8.39.0 '@typescript-eslint/typescript-estree': 8.39.0(typescript@5.9.2) - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color @@ -3498,14 +3619,17 @@ snapshots: snake-case: 2.1.0 upper-case: 1.1.3 - convex@1.25.4(react@19.1.1): + convex@1.25.4(@clerk/clerk-react@5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(react@19.1.1): dependencies: esbuild: 0.25.4 jwt-decode: 4.0.0 prettier: 3.5.3 optionalDependencies: + '@clerk/clerk-react': 5.45.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1) react: 19.1.1 + cookie@1.0.2: {} + core-js-pure@3.45.0: {} create-require@1.1.1: {} @@ -3579,6 +3703,8 @@ snapshots: rimraf: 3.0.2 slash: 3.0.0 + dequal@2.0.3: {} + detect-libc@2.0.4: {} diff@4.0.2: {} @@ -3751,17 +3877,17 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-prettier@9.1.2(eslint@9.32.0(jiti@2.5.1)): + eslint-config-prettier@9.1.2(eslint@9.34.0(jiti@2.5.1)): dependencies: - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) eslint-plugin-only-warn@1.1.0: {} - eslint-plugin-react-hooks@5.2.0(eslint@9.32.0(jiti@2.5.1)): + eslint-plugin-react-hooks@5.2.0(eslint@9.34.0(jiti@2.5.1)): dependencies: - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) - eslint-plugin-react@7.37.5(eslint@9.32.0(jiti@2.5.1)): + eslint-plugin-react@7.37.5(eslint@9.34.0(jiti@2.5.1)): dependencies: array-includes: 3.1.9 array.prototype.findlast: 1.2.5 @@ -3769,7 +3895,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.2.1 - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -3783,10 +3909,10 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-plugin-turbo@2.5.5(eslint@9.32.0(jiti@2.5.1))(turbo@2.5.5): + eslint-plugin-turbo@2.5.5(eslint@9.34.0(jiti@2.5.1))(turbo@2.5.5): dependencies: dotenv: 16.0.3 - eslint: 9.32.0(jiti@2.5.1) + eslint: 9.34.0(jiti@2.5.1) turbo: 2.5.5 eslint-scope@8.4.0: @@ -3798,16 +3924,16 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.32.0(jiti@2.5.1): + eslint@9.34.0(jiti@2.5.1): dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0(jiti@2.5.1)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.21.0 - '@eslint/config-helpers': 0.3.0 - '@eslint/core': 0.15.1 + '@eslint/config-helpers': 0.3.1 + '@eslint/core': 0.15.2 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.32.0 - '@eslint/plugin-kit': 0.3.4 + '@eslint/js': 9.34.0 + '@eslint/plugin-kit': 0.3.5 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 @@ -3900,6 +4026,8 @@ snapshots: fast-levenshtein@2.0.6: {} + fast-sha256@1.3.0: {} + fastq@1.19.1: dependencies: reusify: 1.1.0 @@ -3995,6 +4123,8 @@ snapshots: dependencies: is-glob: 4.0.3 + glob-to-regexp@0.4.1: {} + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -4309,6 +4439,8 @@ snapshots: jiti@2.5.1: {} + js-cookie@3.0.5: {} + js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -4848,6 +4980,8 @@ snapshots: no-case: 2.3.2 upper-case-first: 1.1.2 + server-only@0.0.1: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -4968,6 +5102,13 @@ snapshots: sprintf-js@1.1.3: {} + standardwebhooks@1.0.0: + dependencies: + '@stablelib/base64': 1.0.1 + fast-sha256: 1.3.0 + + std-env@3.9.0: {} + stop-iteration-iterator@1.1.0: dependencies: es-errors: 1.3.0 @@ -5057,6 +5198,12 @@ snapshots: lower-case: 1.1.4 upper-case: 1.1.3 + swr@2.3.4(react@19.1.1): + dependencies: + dequal: 2.0.3 + react: 19.1.1 + use-sync-external-store: 1.5.0(react@19.1.1) + tailwind-merge@3.3.1: {} tailwindcss@4.1.11: {} @@ -5188,13 +5335,13 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typescript-eslint@8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2): + typescript-eslint@8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/parser': 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.39.0(@typescript-eslint/parser@8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) '@typescript-eslint/typescript-estree': 8.39.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.39.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2) - eslint: 9.32.0(jiti@2.5.1) + '@typescript-eslint/utils': 8.39.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + eslint: 9.34.0(jiti@2.5.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color @@ -5232,6 +5379,10 @@ snapshots: dependencies: punycode: 2.3.1 + use-sync-external-store@1.5.0(react@19.1.1): + dependencies: + react: 19.1.1 + util-deprecate@1.0.2: {} v8-compile-cache-lib@3.0.1: {}