Rocket.new via webhook
Add a RankPine server route to a Rocket.new web app, configure separate staging and production secrets, and launch a verified receiver.
Rocket.new connects to RankPine via webhook. The generated web app owns the receiver, storage, public article route, and sitemap update; RankPine supplies signed article deliveries through its existing webhook publisher.
Before you start
- This flow is for a Rocket web project with a server-side API route. Do not put the receiver in a Flutter/mobile client or browser-only component.
- Choose a persistent article store and public route.
- Create a random
RANKPINE_WEBHOOK_SECRETfor staging and another for production.
Rocket's official workflow keeps web variables in the project .env shape,
edits real values under Settings → Environment, separates Staging and
Production, and publishes from Launch. See
Environment variables,
Launch your site, and
the security checklist.
1. Add the server route
Download the RankPine receiver template. In a Next.js project, place it in server-only code and expose it from app/api/rankpine/webhook/route.ts. If Rocket generated another full-stack framework, use its existing raw-body server route instead of adding Next.js.
Copy-paste build instruction
Add RankPine publishing to this existing Rocket.new web project via one secure webhook. Inspect the generated framework and data model first. Do not replace unrelated application code, routes, styling, components, or integrations.
Use https://rankpine.com/docs/templates/rankpine-webhook-receiver.ts from server-only code. Add POST /api/rankpine/webhook using this project's existing server route convention. Read RANKPINE_WEBHOOK_SECRET only from a non-NEXT_PUBLIC environment variable. Verify the signature over the exact raw body before JSON parsing, enforce the five-minute replay window, require the matching event header, and validate all article fields.
Reuse the current database and article page. Upsert on unique RankPine article.id, preserving title, slug, HTML, Markdown, meta and translation data, sources, scores, featured and inline images, publishedAt, and scheduledFor. Return stable { id, url }. Implement refreshSitemap against the sitemap or content-discovery route this app actually serves and do not describe it as a RankPine-managed update.
Add focused receiver tests. Add only a placeholder RANKPINE_WEBHOOK_SECRET entry to .env; never put the real value in source or chat. Show the route, persistence changes, and the exact staging/production endpoint paths. Do not launch the app for me.2. Configure staging and production secrets
- Add
RANKPINE_WEBHOOK_SECRET=your-key-hereto the project.envso Rocket recognises the variable name. Do not commit a real value. - Open the task name → Settings → Environment.
- Set a real value in Staging and a separate real value in Production.
- Never prefix the name with
NEXT_PUBLIC_; Rocket documents that those values are exposed to the browser.
3. Launch and obtain the URL
Open Launch → Staging → Publish, then copy the staging URL and append the server route:
https://your-staging-domain.example/api/rankpine/webhookAfter staging verification, use the Production tab and custom domain flow for the live endpoint. Updating a Production environment value requires a new build or launch before the route sees it.
4. Connect in RankPine
Under Settings → Integrations → Website builders via webhook, choose Rocket.new → Connect via webhook. Paste the matching staging or production endpoint and secret, and leave HTML and Markdown enabled.
5. Verify the live behavior
Confirm the signed verification event, then publish a test article. Check the
server log, one database record keyed by article.id, its public route, and the
sitemap. Republish an edit to prove update-in-place. A Rocket preview does not
prove the staging or production secret was injected into the launched app.
Replit via webhook
Add a signed RankPine route to an existing Replit App, keep the secret in Replit Secrets, and publish with persistent storage.
Base44 via webhook
Receive RankPine articles in a Base44 backend function, upsert an Article entity by RankPine ID, and keep the app's discovery route current.