Skip to main content
Simple Money reads its configuration from environment variables at build time and runtime. Create a .env.local file in the project root before running the development server or deploying.
NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY are both required. The application will not connect to the database or authenticate users without them.

Variables

NEXT_PUBLIC_SUPABASE_URL
string
required
The base URL of your Supabase project (e.g., https://abcdefgh.supabase.co). Exposed to the browser because it is prefixed with NEXT_PUBLIC_.
NEXT_PUBLIC_SUPABASE_ANON_KEY
string
required
The anonymous (public) API key for your Supabase project. Safe to expose in client-side code; access is still governed by row-level security policies.
SUPABASE_SERVICE_ROLE_KEY
string
required
The service role key that bypasses RLS. Used exclusively in server-side API routes under /api/admin/. Never prefix this with NEXT_PUBLIC_ — doing so would expose it to the browser and grant any visitor full database access.
NEXT_PUBLIC_ADMIN_PATH
string
default:"/ctrl-sm-2026"
The URL path segment for the admin dashboard. Change this to an unpredictable value (e.g., /portal-9921) to obscure the admin entry point from casual discovery.
NEXT_PUBLIC_TAWK_PROPERTY_ID
string
Optional. Your Tawk.to property ID for embedding the live chat widget. Leave empty to disable the widget.
NEXT_PUBLIC_TAWK_WIDGET_ID
string
Optional. Your Tawk.to widget ID. Required alongside NEXT_PUBLIC_TAWK_PROPERTY_ID for the chat widget to load.

.env.local template

Copy this into .env.local at the project root and fill in your values:
.env.local
# Supabase connection
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key

# Service role (server-side only — never expose to the browser)
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Admin dashboard path (change to something secret)
NEXT_PUBLIC_ADMIN_PATH=/ctrl-sm-2026

# Tawk.to live chat (optional)
NEXT_PUBLIC_TAWK_PROPERTY_ID=
NEXT_PUBLIC_TAWK_WIDGET_ID=
You can find NEXT_PUBLIC_SUPABASE_URL and both API keys in the Supabase Dashboard under Project Settings → API. The anon key is listed as “anon public” and the service role key is listed as “service_role secret”.

Setting variables in Vercel

When deploying to Vercel, environment variables are set in the Vercel dashboard rather than in a file.
1

Open your project in the Vercel dashboard

Navigate to vercel.com, select your project, then click the Settings tab.
2

Go to Environment Variables

In the left sidebar, click Environment Variables.
3

Add each variable

Enter the variable name and value, select which environments it applies to (Production, Preview, Development), and click Save.
4

Redeploy

Environment variables are only picked up on new deployments. Trigger a redeploy from the Deployments tab or push a new commit to apply the changes.
Do not commit .env.local to version control. The file is listed in .gitignore by default in Next.js projects. Verify it is excluded before pushing to a public repository.

Build docs developers (and LLMs) love