Recommended platform
Vercel is the recommended platform for deploying the Inventory Pro frontend. It provides zero-configuration Next.js deployments, automatic HTTPS, and global CDN delivery.Deployment steps
Build locally to check for errors
Before deploying, verify the production build succeeds on your machine:Fix any build errors before proceeding. Note that
next.config.mjs currently sets typescript.ignoreBuildErrors: true — it is good practice to resolve TypeScript errors rather than relying on this flag in production.Import the repository in Vercel
- Go to vercel.com and sign in.
- Click Add New Project.
- Select your GitHub repository from the list.
- Vercel will automatically detect the Next.js framework. Leave the build and output settings at their defaults.
Set environment variables
In the Vercel project settings, navigate to Settings → Environment Variables and add:
Set these for the Production environment (and optionally Preview and Development).
| Variable | Value |
|---|---|
NEXT_PUBLIC_API_URL | Your production backend URL (e.g., https://your-backend.onrender.com/api) |
NEXT_PUBLIC_SUPABASE_URL | Your Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Your Supabase anon/public key |
NEXT_PUBLIC_API_URL must point to your deployed backend. If this variable is missing or incorrect, all API calls (login, product listing, etc.) will fail. The local default is http://localhost:5000/api, which is not reachable from a deployed frontend.next.config.mjs
Thenext.config.mjs file at the project root can be customized for production settings:
next.config.mjs
unoptimized: true, and resolving any TypeScript errors so you can remove the ignoreBuildErrors flag.