Monza Motors relies on environment variables to connect to four external services: Supabase (authentication and database), Stripe (payment processing), Groq (AI inference), and the hosting platform itself for redirect URL generation. Variables prefixed withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jason-AML/MonzaSport-Nextjs/llms.txt
Use this file to discover all available pages before exploring further.
NEXT_PUBLIC_ are bundled into the client-side JavaScript and are accessible in the browser — all other variables are server-side only and must never be exposed to client code.
Supabase Configuration
Monza Motors uses@supabase/ssr to create both a browser client (via createBrowserClient) and a server client (via createServerClient with Next.js cookie handling). Both clients require the public URL and anon key; the service role key is used exclusively by server-side routes that need elevated database access, such as the AI chat route.
Your Supabase project URL. Found in your Supabase dashboard under Settings → API → Project URL. This value is exposed to the browser and is used by the browser Supabase client to connect to your project.
The Supabase anonymous (public) API key for your project. Found in Settings → API → Project API keys → anon / public. Used by browser clients for authentication flows and public data reads. Exposed to the browser — it is safe to include in client-side code because its permissions are governed by Row Level Security (RLS) policies.
The Supabase service role key with elevated privileges that bypasses RLS. Found in Settings → API → Project API keys → service_role. Used server-side only by the AI chat route and any administrative data operations. Never expose this key to the browser or commit it to source control.
Stripe Configuration
Monza Motors creates Stripe Checkout sessions from a Next.js API route, so only the secret key is required. The Stripe publishable key is not needed for this integration pattern.Your Stripe secret API key used to create and manage checkout sessions entirely on the server. Found in the Stripe Dashboard → Developers → API keys → Secret key. Use a test-mode key (
sk_test_...) during development. Never expose this to the browser or commit it to source control.Groq AI Configuration
The AI assistant at/chat uses the Groq inference API with the llama-3.3-70b-versatile model via the @ai-sdk/groq package. The API key is consumed exclusively by the server-side chat route.
API key for Groq’s inference API. Obtain one from the Groq Console. Used by the AI chat route to stream responses from the
llama-3.3-70b-versatile model. This variable is server-side only and must not be prefixed with NEXT_PUBLIC_.Application Configuration
The fully-qualified base URL of the application used to construct absolute URLs for Stripe checkout
success_url and cancel_url redirect parameters. Set this to http://localhost:3000 during local development. In production deployments on Vercel this value is superseded automatically — see the note below.When running on Vercel, the platform automatically injects the
VERCEL_URL environment variable containing the deployment’s canonical hostname. The Stripe redirect logic uses VERCEL_URL in production, meaning NEXT_PUBLIC_BASE_URL only needs to be set for local development. You do not need to update NEXT_PUBLIC_BASE_URL when promoting a deployment to production.Full .env.local Template
Copy the block below into a .env.local file at the project root and replace each placeholder with your real credentials. This file is listed in .gitignore and will not be committed to source control.
.env.local