Deploy to Netlify

Deploy Uniph.ai Frontend to Netlify

Option A: Deploy with the button (fastest)

  1. Click Deploy to Netlify.
  2. Log in to Netlify (or create an account) and authorize GitHub if asked.
  3. Netlify will detect the repo and the root netlify.toml (base directory = frontend). Check that:
    • Base directory: frontend
    • Build command: npm run build
  4. Click Deploy site. The first build may take a few minutes.
  5. After deploy, add your API URL:
    • Site settingsEnvironment variablesAdd 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).
  6. 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

  1. Go to app.netlify.com and sign in.
  2. Add new siteImport an existing project.
  3. Connect your Git provider (GitHub, GitLab, Bitbucket) and choose the uniph.ai repository.
  4. 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)
  5. Click Deploy site.
  6. When the deploy finishes, go to Site settingsEnvironment variables and add:
    • NEXT_PUBLIC_API_URL = your production API URL (no trailing slash).
  7. 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 set NEXT_PUBLIC_API_URL to 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.