dist/ that Vercel serves with a CDN.
Build
dist/. The build includes all assets, chunks, and an index.html entry point.
Deploy to Vercel
Import the repository
In the Vercel dashboard, click Add New → Project and import your SmartMoveNewUI repository.
Configure the build settings
Vercel auto-detects Vite. Confirm these settings:
| Setting | Value |
|---|---|
| Framework preset | Vite |
| Build command | npm run build |
| Output directory | dist |
| Install command | npm install |
Add environment variables
In Settings → Environment Variables, add:
Set both variables for the Production, Preview, and Development environments.
| Variable | Value |
|---|---|
VITE_SUPABASE_URL | Your Supabase project URL |
VITE_SUPABASE_ANON_KEY | Your Supabase anon key |
Configure SPA routing
SmartMove uses client-side routing via React Router. Without a rewrite rule, Vercel returns a 404 for any URL other than This tells Vercel to serve
/. Add a vercel.json to the project root:index.html for all routes, letting React Router handle navigation client-side.Environment variables
| Variable | Required | Description |
|---|---|---|
VITE_SUPABASE_URL | No | Supabase project URL. Required for cloud sync and authentication. |
VITE_SUPABASE_ANON_KEY | No | Supabase anon (public) key. Required for cloud sync and authentication. |
The app deploys and runs without these variables. Users can search routes, view departures, and save data locally. Cloud sync and account features are unavailable until the variables are set.
Preview deployments
Vercel creates a preview deployment for every pull request. To test cloud sync features in previews, add the Supabase environment variables to the Preview environment in Settings → Environment Variables.Custom domain
To attach a custom domain, go to Settings → Domains in the Vercel project and follow the DNS configuration instructions. No changes to the app code are needed.Development setup
Run SmartMove locally before deploying.
Architecture
Overview of the full stack.