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:- Vercel
SITE_URL. - Convex production
SITE_URL. - Meta OAuth redirect URI.
- Google authorized JavaScript origin.
- Tracked-link testing.
Create the Convex production deployment
Create the deployment
Create or open your Convex project. Create a production deployment from the Convex dashboard.
Generate a deploy key
Generate a production deploy key from the Convex dashboard. You will set it as
CONVEX_DEPLOY_KEY on Vercel.Provision Convex Auth
Run this from the project root:- Set
SITE_URLto your public app domain, such ashttps://your-app-domain.com. - Let the tool generate and store
JWT_PRIVATE_KEYandJWKS.
Configure Convex production
Set the email allowlist:Deploy on Vercel
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:- Open
https://your-app-domain.com. - Sign in with a Google account listed in
NUDGRA_ALLOWED_EMAILS. - Open
/dashboard/account. - Connect an Instagram professional account.
- Confirm the account appears as connected.
- Send a real test DM, comment, or story reply.
- Verify that contacts, conversations, automations, and logs update in the dashboard.
- Verify that tracked links resolve through your app domain.
- Verify that webhook activity appears in logs.