diff --git a/package-lock.json b/package-lock.json index e5475ea..59616c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "embla-carousel-react": "^8.6.0", "input-otp": "^1.4.2", "lucide-react": "^0.532.0", - "next": "15.4.4", + "next": "15.5.4", "next-themes": "^0.4.6", "react": "19.1.0", "react-day-picker": "^9.8.1", @@ -1091,9 +1091,9 @@ } }, "node_modules/@next/env": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.4.4.tgz", - "integrity": "sha512-SJKOOkULKENyHSYXE5+KiFU6itcIb6wSBjgM92meK0HVKpo94dNOLZVdLLuS7/BxImROkGoPsjR4EnuDucqiiA==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.4.tgz", + "integrity": "sha512-27SQhYp5QryzIT5uO8hq99C69eLQ7qkzkDPsk3N+GuS2XgOgoYEeOav7Pf8Tn4drECOVDsDg8oj+/DVy8qQL2A==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { @@ -1107,9 +1107,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.4.4.tgz", - "integrity": "sha512-eVG55dnGwfUuG+TtnUCt+mEJ+8TGgul6nHEvdb8HEH7dmJIFYOCApAaFrIrxwtEq2Cdf+0m5sG1Np8cNpw9EAw==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.4.tgz", + "integrity": "sha512-nopqz+Ov6uvorej8ndRX6HlxCYWCO3AHLfKK2TYvxoSB2scETOcfm/HSS3piPqc3A+MUgyHoqE6je4wnkjfrOA==", "cpu": [ "arm64" ], @@ -1123,9 +1123,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.4.4.tgz", - "integrity": "sha512-zqG+/8apsu49CltEj4NAmCGZvHcZbOOOsNoTVeIXphYWIbE4l6A/vuQHyqll0flU2o3dmYCXsBW5FmbrGDgljQ==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.4.tgz", + "integrity": "sha512-QOTCFq8b09ghfjRJKfb68kU9k2K+2wsC4A67psOiMn849K9ZXgCSRQr0oVHfmKnoqCbEmQWG1f2h1T2vtJJ9mA==", "cpu": [ "x64" ], @@ -1139,9 +1139,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.4.4.tgz", - "integrity": "sha512-LRD4l2lq4R+2QCHBQVC0wjxxkLlALGJCwigaJ5FSRSqnje+MRKHljQNZgDCaKUZQzO/TXxlmUdkZP/X3KNGZaw==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.4.tgz", + "integrity": "sha512-eRD5zkts6jS3VfE/J0Kt1VxdFqTnMc3QgO5lFE5GKN3KDI/uUpSyK3CjQHmfEkYR4wCOl0R0XrsjpxfWEA++XA==", "cpu": [ "arm64" ], @@ -1155,9 +1155,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.4.4.tgz", - "integrity": "sha512-LsGUCTvuZ0690fFWerA4lnQvjkYg9gHo12A3wiPUR4kCxbx/d+SlwmonuTH2SWZI+RVGA9VL3N0S03WTYv6bYg==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.4.tgz", + "integrity": "sha512-TOK7iTxmXFc45UrtKqWdZ1shfxuL4tnVAOuuJK4S88rX3oyVV4ZkLjtMT85wQkfBrOOvU55aLty+MV8xmcJR8A==", "cpu": [ "arm64" ], @@ -1171,9 +1171,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.4.4.tgz", - "integrity": "sha512-aOy5yNRpLL3wNiJVkFYl6w22hdREERNjvegE6vvtix8LHRdsTHhWTpgvcYdCK7AIDCQW5ATmzr9XkPHvSoAnvg==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.4.tgz", + "integrity": "sha512-7HKolaj+481FSW/5lL0BcTkA4Ueam9SPYWyN/ib/WGAFZf0DGAN8frNpNZYFHtM4ZstrHZS3LY3vrwlIQfsiMA==", "cpu": [ "x64" ], @@ -1187,9 +1187,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.4.4.tgz", - "integrity": "sha512-FL7OAn4UkR8hKQRGBmlHiHinzOb07tsfARdGh7v0Z0jEJ3sz8/7L5bR23ble9E6DZMabSStqlATHlSxv1fuzAg==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.4.tgz", + "integrity": "sha512-nlQQ6nfgN0nCO/KuyEUwwOdwQIGjOs4WNMjEUtpIQJPR2NUfmGpW2wkJln1d4nJ7oUzd1g4GivH5GoEPBgfsdw==", "cpu": [ "x64" ], @@ -1203,9 +1203,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.4.4.tgz", - "integrity": "sha512-eEdNW/TXwjYhOulQh0pffTMMItWVwKCQpbziSBmgBNFZIIRn2GTXrhrewevs8wP8KXWYMx8Z+mNU0X+AfvtrRg==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.4.tgz", + "integrity": "sha512-PcR2bN7FlM32XM6eumklmyWLLbu2vs+D7nJX8OAIoWy69Kef8mfiN4e8TUv2KohprwifdpFKPzIP1njuCjD0YA==", "cpu": [ "arm64" ], @@ -1219,9 +1219,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.4.4.tgz", - "integrity": "sha512-SE5pYNbn/xZKMy1RE3pAs+4xD32OI4rY6mzJa4XUkp/ItZY+OMjIgilskmErt8ls/fVJ+Ihopi2QIeW6O3TrMw==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.4.tgz", + "integrity": "sha512-1ur2tSHZj8Px/KMAthmuI9FMp/YFusMMGoRNJaRZMOlSkgvLjzosSdQI0cJAKogdHl3qXUQKL9MGaYvKwA7DXg==", "cpu": [ "x64" ], @@ -6898,12 +6898,12 @@ "license": "MIT" }, "node_modules/next": { - "version": "15.4.4", - "resolved": "https://registry.npmjs.org/next/-/next-15.4.4.tgz", - "integrity": "sha512-kNcubvJjOL9yUOfwtZF3HfDhuhp+kVD+FM2A6Tyua1eI/xfmY4r/8ZS913MMz+oWKDlbps/dQOWdDricuIkXLw==", + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/next/-/next-15.5.4.tgz", + "integrity": "sha512-xH4Yjhb82sFYQfY3vbkJfgSDgXvBB6a8xPs9i35k6oZJRoQRihZH+4s9Yo2qsWpzBmZ3lPXaJ2KPXLfkvW4LnA==", "license": "MIT", "dependencies": { - "@next/env": "15.4.4", + "@next/env": "15.5.4", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", @@ -6916,14 +6916,14 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.4.4", - "@next/swc-darwin-x64": "15.4.4", - "@next/swc-linux-arm64-gnu": "15.4.4", - "@next/swc-linux-arm64-musl": "15.4.4", - "@next/swc-linux-x64-gnu": "15.4.4", - "@next/swc-linux-x64-musl": "15.4.4", - "@next/swc-win32-arm64-msvc": "15.4.4", - "@next/swc-win32-x64-msvc": "15.4.4", + "@next/swc-darwin-arm64": "15.5.4", + "@next/swc-darwin-x64": "15.5.4", + "@next/swc-linux-arm64-gnu": "15.5.4", + "@next/swc-linux-arm64-musl": "15.5.4", + "@next/swc-linux-x64-gnu": "15.5.4", + "@next/swc-linux-x64-musl": "15.5.4", + "@next/swc-win32-arm64-msvc": "15.5.4", + "@next/swc-win32-x64-msvc": "15.5.4", "sharp": "^0.34.3" }, "peerDependencies": { diff --git a/package.json b/package.json index 10313d1..8270aa2 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "embla-carousel-react": "^8.6.0", "input-otp": "^1.4.2", "lucide-react": "^0.532.0", - "next": "15.4.4", + "next": "15.5.4", "next-themes": "^0.4.6", "react": "19.1.0", "react-day-picker": "^9.8.1", diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9790408..aa927a1 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,6 +17,9 @@ const geistMono = Geist_Mono({ const parkinsans = Parkinsans({ variable: "--font-parkinsans", subsets: ["latin"], + weight: ["300", "400", "500", "600", "700", "800"], + fallback: ["system-ui", "sans-serif"], + adjustFontFallback: false, }); export const metadata: Metadata = { @@ -34,7 +37,7 @@ export default function RootLayout({ @@ -48,7 +43,7 @@ export default function Home() { height={50} className="rounded-xl sm:w-[60px] sm:h-[60px]" /> -

+

CodeGuide Starter

@@ -58,132 +53,107 @@ export default function Home() {
- {envStatus.allConfigured ? ( -
-
🎉
-
All Set!
-
- Ready for development -
+
+
⚠️
+
Setup Required
+
+ Add environment variables to get started
- ) : ( - <> -
-
⚠️
-
- Setup Required -
-
- Retrieve keys for environment variables -
-
+
-
- {/* Clerk */} -
-
- {envStatus.clerk ? ( - - ) : ( - - )} -
-
- Clerk Auth -
-
- {envStatus.clerk ? "✓ Ready" : "Setup required"} -
- -
+
+ {/* Clerk */} +
+
+ +
+
+ Clerk Auth +
+
+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
+
CLERK_SECRET_KEY
+
+ +
- {/* Supabase */} -
-
- {envStatus.supabase ? ( - - ) : ( - - )} -
-
- Supabase DB -
-
- {envStatus.supabase ? "✓ Ready" : "Setup required"} -
- -
+ {/* Supabase */} +
+
+ +
+
+ Supabase DB +
+
+
NEXT_PUBLIC_SUPABASE_URL
+
NEXT_PUBLIC_SUPABASE_ANON_KEY
+
+ +
- {/* AI */} -
-
- {envStatus.ai ? ( - - ) : ( - - )} -
-
- AI SDK -
-
- {envStatus.ai ? "✓ Ready" : "Optional"} -
-
- - -
-
+ {/* AI */} +
+
+ +
+
+ AI SDK +
+
+
OPENAI_API_KEY
+
ANTHROPIC_API_KEY
- - )} +
+ + +
+
+
{/* Chat Section */} - {envStatus.allConfigured && ( -
- -
- )} +
+ +
diff --git a/src/components/chat.tsx b/src/components/chat.tsx index a898af2..fdeda33 100644 --- a/src/components/chat.tsx +++ b/src/components/chat.tsx @@ -4,20 +4,9 @@ import { useChat } from "ai/react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Card } from "@/components/ui/card"; -import { checkEnvironmentVariables } from "@/lib/env-check"; -import SetupGuide from "@/components/setup-guide"; import { AlertCircle, Bot, User } from "lucide-react"; -import { useState, useEffect } from "react"; export default function Chat() { - const [envStatus, setEnvStatus] = useState({ - clerk: false, - supabase: false, - ai: false, - allConfigured: false, - }); - const [isLoading, setIsLoading] = useState(true); - const { messages, input, @@ -31,41 +20,6 @@ export default function Chat() { }, }); - useEffect(() => { - const status = checkEnvironmentVariables(); - setEnvStatus(status); - setIsLoading(false); - }, []); - - if (isLoading) { - return ( -
-
-
- ); - } - - if (!envStatus.ai) { - return ( -
- -
- -

- AI Chat Not Available -

-
-

- The AI chat feature requires an OpenAI API key to be configured. - Please set up your environment variables to enable this - functionality. -

-
- -
- ); - } - return (
diff --git a/src/components/setup-guide.tsx b/src/components/setup-guide.tsx deleted file mode 100644 index 816cd14..0000000 --- a/src/components/setup-guide.tsx +++ /dev/null @@ -1,190 +0,0 @@ -"use client"; - -import { Card } from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; -import { getSetupInstructions } from "@/lib/env-check"; -import { CheckCircle, Circle, ExternalLink, Copy } from "lucide-react"; -import { useState } from "react"; - -interface SetupGuideProps { - envStatus: { - clerk: boolean; - supabase: boolean; - ai: boolean; - allConfigured: boolean; - }; -} - -export default function SetupGuide({ envStatus }: SetupGuideProps) { - const [copiedVar, setCopiedVar] = useState(null); - const setupInstructions = getSetupInstructions(); - - const copyToClipboard = async (text: string) => { - try { - await navigator.clipboard.writeText(text); - setCopiedVar(text); - setTimeout(() => setCopiedVar(null), 2000); - } catch (err) { - console.error("Failed to copy to clipboard:", err); - } - }; - - const getServiceStatus = (service: string) => { - switch (service.toLowerCase()) { - case "clerk": - return envStatus.clerk; - case "supabase": - return envStatus.supabase; - case "openai": - return envStatus.ai; - default: - return false; - } - }; - - return ( -
-
-

🚀 Setup Your Environment

-

- Configure these services to unlock the full potential of your starter - kit -

-
- -
- {setupInstructions.map((instruction, index) => { - const isConfigured = getServiceStatus(instruction.service); - - return ( - -
-
- {isConfigured ? ( - - ) : ( - - )} -
- -
-
-

- {instruction.service} -

- {isConfigured && ( - - Configured - - )} -
- -

- {instruction.description} -

- - {!isConfigured && ( - <> -
-

Setup Steps:

-
    - {instruction.steps.map((step, stepIndex) => ( -
  1. {step}
  2. - ))} -
-
- -
-

- Environment Variables: -

-
- {instruction.envVars.map((envVar) => ( -
- - {envVar}=your_value_here - - -
- ))} -
-
- - - - )} -
-
-
- ); - })} -
- - {envStatus.allConfigured && ( - -
- -

- 🎉 All Set! -

-

- Your environment is fully configured. The AI chat feature is now - available! -

-
-
- )} - - -

- 💡 Pro Tip -

-

- After adding your environment variables to{" "} - - .env.local - - , restart your development server with{" "} - - npm run dev - - for the changes to take effect. -

-
-
- ); -} diff --git a/src/lib/env-check.ts b/src/lib/env-check.ts deleted file mode 100644 index 3b9a9c3..0000000 --- a/src/lib/env-check.ts +++ /dev/null @@ -1,66 +0,0 @@ -export function checkEnvironmentVariables() { - const requiredEnvVars = { - clerk: { - publishableKey: process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, - secretKey: process.env.CLERK_SECRET_KEY, - }, - supabase: { - url: process.env.NEXT_PUBLIC_SUPABASE_URL, - anonKey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY, - }, - ai: { - openai: process.env.OPENAI_API_KEY, - anthropic: process.env.ANTHROPIC_API_KEY, - }, - }; - - const status = { - clerk: !!( - requiredEnvVars.clerk.publishableKey && requiredEnvVars.clerk.secretKey - ), - supabase: !!( - requiredEnvVars.supabase.url && requiredEnvVars.supabase.anonKey - ), - ai: !!(requiredEnvVars.ai.openai || requiredEnvVars.ai.anthropic), - allConfigured: false, - }; - - status.allConfigured = status.clerk && status.supabase && status.ai; - - return status; -} - -export function getSetupInstructions() { - return [ - { - service: "Clerk", - description: "Authentication service for user management", - steps: [ - "Go to https://dashboard.clerk.com/", - "Create a new application", - "Copy NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY to .env.local", - ], - envVars: ["NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY", "CLERK_SECRET_KEY"], - }, - { - service: "Supabase", - description: "Database and real-time subscriptions", - steps: [ - "Go to https://supabase.com/dashboard", - "Create a new project", - "Copy NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY to .env.local", - ], - envVars: ["NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY"], - }, - { - service: "OpenAI", - description: "AI language model for chat functionality", - steps: [ - "Go to https://platform.openai.com/", - "Create an API key", - "Copy OPENAI_API_KEY to .env.local", - ], - envVars: ["OPENAI_API_KEY"], - }, - ]; -}