Bicyblex Store reads two environment variables at startup to connect to Supabase. Both must be present inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/bicyblex/bicyblexStore/llms.txt
Use this file to discover all available pages before exploring further.
.env.local before running the dev server or deploying — without them the Supabase client will fail to initialize and every database, storage, and auth operation in the app will break silently.
Required variables
Both variables are prefixed withNEXT_PUBLIC_ so that Next.js exposes them to browser-side code as well as server-side code. This is required because the Supabase client (src/lib/supabaseClient.js) is imported throughout both the storefront and the /dashboard admin panel, which render on the client.
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL | Yes | The URL of your Supabase project (e.g. https://abcdef.supabase.co) |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Yes | The anonymous public key from your Supabase project’s API settings |
Setting up .env.local
Create a .env.local file at the root of the project and populate it with your project’s credentials:
.env.local
your-project-id and your-anon-key-here with the actual values from your Supabase project (see Where to find these values below).
How the client uses these variables
src/lib/supabaseClient.js reads both variables and passes them directly to createClient. It also includes a guard that logs a descriptive error to the console if either variable is missing, making misconfiguration easy to diagnose during development:
src/lib/supabaseClient.js
supabase singleton is imported across the entire application — the product manager, category manager, newsletter form, and authentication layer all rely on this single instance.
Where to find these values
Both values live in your Supabase project dashboard:- Open supabase.com and navigate to your project.
- Go to Project Settings → API.
- Copy the Project URL — this is your
NEXT_PUBLIC_SUPABASE_URL. - Copy the
anonpublickey — this is yourNEXT_PUBLIC_SUPABASE_ANON_KEY.
Do not use the
service_role key in place of the anon key. The
service_role key bypasses Row Level Security and must never be exposed in
client-side code.Deploying to Vercel
When deploying to Vercel,.env.local is not read from the repository. You must add the variables directly in the Vercel project dashboard:
- Open your project in vercel.com.
- Go to Settings → Environment Variables.
- Add
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYwith their respective values. - Redeploy the project for the changes to take effect.
