Skip to main content
This is the recommended production path for Nudgra Cloud. Host the Next.js app on Vercel and run backend state, auth, scheduling, and webhooks on Convex Cloud.

Prerequisites

Before you start, prepare:
  • A Convex account.
  • A Vercel account.
  • A public app domain, such as https://cloud.nudgra.example.com.
  • Google OAuth credentials.
  • Meta app credentials and a webhook verify token.

Choose the app domain

Pick the final public URL for the Next.js app:
Use that exact value everywhere:
  • Vercel SITE_URL.
  • Convex production SITE_URL.
  • Meta OAuth redirect URI.
  • Google authorized JavaScript origin.
  • Tracked-link testing.
If the domain changes later, update all platform settings and redeploy.

Create the Convex production deployment

1

Create the deployment

Create or open your Convex project. Create a production deployment from the Convex dashboard.
2

Generate a deploy key

Generate a production deploy key from the Convex dashboard. You will set it as CONVEX_DEPLOY_KEY on Vercel.
3

Save the site URL

Keep the production deployment’s .convex.site URL handy. You need it for Google OAuth and Meta webhooks.
You can also open the dashboard from the project root:

Provision Convex Auth

Run this from the project root:
When prompted:
  • Set SITE_URL to your public app domain, such as https://your-app-domain.com.
  • Let the tool generate and store JWT_PRIVATE_KEY and JWKS.
This prepares the production Convex deployment for Google sign-in and redirects back to your app after auth.

Configure Convex production

Set the email allowlist:
Set the public app origin:
After Google and Meta setup, also set:

Deploy on Vercel

1

Import the repository

Import the Nudgra Cloud repository into Vercel.
2

Set the install command

3

Set the build command

4

Set Vercel environment variables

5

Attach the production domain

Attach the final domain in Vercel, then redeploy after the domain and environment variables are final.
The build command deploys the Convex backend, typechecks and bundles Convex functions, and injects the correct Convex deployment URLs into the Next.js build.

Smoke test production

After the first deployment:
  1. Open https://your-app-domain.com.
  2. Sign in with a Google account listed in NUDGRA_ALLOWED_EMAILS.
  3. Open /dashboard/account.
  4. Connect an Instagram professional account.
  5. Confirm the account appears as connected.
  6. Send a real test DM, comment, or story reply.
  7. Verify that contacts, conversations, automations, and logs update in the dashboard.
  8. Verify that tracked links resolve through your app domain.
  9. Verify that webhook activity appears in logs.

Update a deployment

For Vercel, push to the branch connected to the project and let the build run. You can also deploy from the project root: