Skip to main content
SmartMove uses two optional environment variables to enable Supabase-backed cloud sync and authentication. Without them, the app runs fully using localStorage — no configuration is required for local or offline use.
If you are using the hosted SmartMove app, this page is for self-hosted deployments only. Skip to the storage keys reference if you want to understand what data SmartMove stores locally.

Environment variables

Create a .env.local file in the project root to enable cloud sync:
.env.local
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
If these variables are missing, the app logs a warning and continues in local-only mode:
Supabase URL or Anon Key is missing. Check your .env file. Cloud sync is disabled.

Variable reference

VariableRequiredDescription
VITE_SUPABASE_URLNoThe URL of your Supabase project (e.g., https://xxxx.supabase.co).
VITE_SUPABASE_ANON_KEYNoThe public anonymous key for your Supabase project. Safe to expose in the browser — Row Level Security (RLS) controls data access.
Never use the Supabase service role key as the anon key. The service role key bypasses RLS and would expose all user data. Always use the anon/public key.

When you need these variables

You only need VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY if you want to enable:
  • User authentication — Sign-up and login via the /account screen
  • Cloud sync — Bidirectional sync of favorites, routes, and settings across devices
Without them, SmartMove stores everything in localStorage and cloud features are disabled.

Getting your Supabase credentials

1

Create a Supabase project

Go to supabase.com and create a new project. Choose a region close to your users.
2

Find your project URL and anon key

In the Supabase dashboard, go to Project Settings → API. Copy the Project URL and the anon / public key.
3

Add them to .env.local

Paste the values into your .env.local file:
.env.local
VITE_SUPABASE_URL=https://xxxxxxxxxxxx.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
4

Restart the dev server

Vite reads .env.local at startup. Restart the server after adding or changing these values:
npm run dev
Add .env.local to your .gitignore to avoid accidentally committing credentials. Vite excludes it from version control by default when you use the standard Vite project setup.

Storage keys reference

SmartMove uses localStorage as its primary persistence layer. All keys are prefixed with smartmove- to avoid collisions with other apps. When a user is signed in, data syncs bidirectionally between localStorage and the Supabase database. localStorage is always the immediate source of truth.
KeylocalStorage keyDescription
RECENT_STOPSsmartmove-recent-stopsStops the user has searched or viewed recently, with optional favorite flags.
RECENT_CONNECTIONSsmartmove-recent-connectionsRecent from/to connection pairs with timestamps and optional favorite flags.
QUICK_ACCESSsmartmove-quick-accessItems pinned to the quick access section on the home screen (stops, lines, or routes).
ACTIVE_ROUTESsmartmove-active-routesCurrently followed routes, including progress, next stop, and delay status.
DEPARTURE_STATIONSsmartmove-departure-stationsStops saved to the departure board for quick access.
COMMUTER_ROUTESsmartmove-commuter-routesSaved commuter mode routes for one-tap access to the next available connection.
LIKED_ROUTESsmartmove-liked-routesBookmarked routes with transport mode, duration, and full trip data.
THEME_MODEsmartmove-themeThe user’s preferred theme: light, dark, or system auto.
LANGUAGEsmartmove-languageThe user’s preferred language: de, it, en, or lad.
NOTIFICATIONSsmartmove-notificationsWhether push notifications are enabled.
PRIVACY_LOCATIONsmartmove-privacy-locationWhether the user has granted location access for GPS features.
PRIVACY_ANALYTICSsmartmove-privacy-analyticsWhether the user has consented to analytics.
Clearing your browser’s localStorage for the SmartMove origin removes all locally stored data. If cloud sync is enabled, data remains in your Supabase account and will re-sync on next login.