Skip to main content

Why Vercel is the most natural path

KilatKoding uses Next.js App Router without a custom server requirement. Because of that, Vercel is usually the fastest deployment path, especially if you want preview deployments, custom domains, and clean env management.

Before you begin

Make sure these are already true:
  • the repo can build locally,
  • npm run env:check looks correct for the active features,
  • the production domain is already chosen,
  • provider accounts such as Supabase, Midtrans, Doku, Resend, and the AI provider are ready if used.

Deployment steps

1

Create a Vercel project

Import the KilatKoding repo into Vercel. The default Next.js build command and output are usually detected automatically.
2

Fill environment variables

Copy the relevant env values from .env.local or another secure source into Vercel. Focus only on the features that stay active.
3

Set NEXT_PUBLIC_APP_URL to the production domain

Do not leave it as http://localhost:3000. This value is used for metadata, callbacks, and order URLs.
4

Run the first deployment

Deploy and make sure the build succeeds.
5

Attach the production domain

After the domain is active, redeploy if needed so the live URL is fully consistent.

Env groups that are usually needed

After deployment, do not forget provider-side config

Add these production URLs in redirect configuration:
Register the production webhook:
Make sure the user return URL still points to your order page.
Register the production webhook:
Verify the sender domain and make sure EMAIL_FROM uses a verified domain.

Post-deploy validation

At minimum, check:
  1. the homepage loads,
  2. login and signup work,
  3. /dashboard opens for a logged-in user,
  4. /dashboard/billing works if payments are active,
  5. /admin is reachable for admins if admin is active,
  6. GET /api/health matches expectations,
  7. one sandbox payment and one webhook test succeed if payments are active.

Most common gotchas

Preview deployment vs production

Preview deployments are great for UI review, but:
  • do not use a preview URL as the final auth callback,
  • do not use a preview URL as the final payment webhook target,
  • use previews for layout and copy review, not as permanent integration endpoints.
After deployment, continue to Testing and deployment and Testing recipes for fuller post-launch verification.