Deploy to Netlify
Deploy Uniph.ai Frontend to Netlify
Option A: Deploy with the button (fastest)
- Click Deploy to Netlify.
- Log in to Netlify (or create an account) and authorize GitHub if asked.
- Netlify will detect the repo and the root
netlify.toml(base directory =frontend). Check that:- Base directory:
frontend - Build command:
npm run build
- Base directory:
- Click Deploy site. The first build may take a few minutes.
- After deploy, add your API URL:
- Site settings → Environment variables → Add variable or Add multiple
- Key:
NEXT_PUBLIC_API_URL - Value: Your backend API URL (e.g.
https://your-api.railway.app) — no trailing slash. - Scopes: All (or Production).
- Trigger a new deploy (Deploys → Trigger deploy → Deploy site) so the new env var is baked in.
Your site will be at https://something.netlify.app. The UI will call the API at NEXT_PUBLIC_API_URL.
Option B: Deploy from the Netlify dashboard
- Go to app.netlify.com and sign in.
- Add new site → Import an existing project.
- Connect your Git provider (GitHub, GitLab, Bitbucket) and choose the uniph.ai repository.
- Netlify should pre-fill from the root
netlify.toml:- Base directory:
frontend - Build command:
npm run build - Publish directory: (leave default; Next.js is auto-detected)
- Base directory:
- Click Deploy site.
- When the deploy finishes, go to Site settings → Environment variables and add:
NEXT_PUBLIC_API_URL= your production API URL (no trailing slash).
- Trigger a new deploy so the variable is included in the build.
After deploy
- Site URL: Shown on the site overview (e.g.
https://random-name-123.netlify.app). You can set a custom domain in Domain settings. - Backend: Deploy the API from this repo’s
backend/(e.g. Netlify Functions, Railway, Render), then setNEXT_PUBLIC_API_URLto that URL. Ensure CORS allows your Netlify URL (the default backend allows all origins). - Docs: See FRONTEND_USAGE.md for using the UI and DEPLOYMENT.md for env reference.