Workspace

Launch preparation

From preview to production.

Cloudflare hosts the application and database. Clerk handles customer accounts. A separate security agent checks staging and prioritizes findings.

Deploy on Cloudflare

  1. Add ReUpSell.com to your Cloudflare account.
  2. Create a staging Worker and a separate D1 database.
  3. Use the supplied wrangler.example.jsonc and replace its database ID.
  4. Apply migrations, run tests, then deploy.
  5. Configure Clerk, Turnstile and provider secrets for the exact staging hostname.
npm install --save-dev wrangler@4
npx wrangler login
npx wrangler d1 create reupsell-staging
cp wrangler.example.jsonc wrangler.jsonc
# Replace database_id in wrangler.jsonc
npx wrangler d1 migrations apply reupsell-staging --remote
npm run security:test
npx wrangler deploy
Cloudflare setup guide

Protect the customer workspace

  • Clerk authentication required on direct Cloudflare hosting.
  • Tenant checks for contact lists, forms, campaigns and exports.
  • Admin-only account and demo directories.
  • Public forms support server-verified Turnstile.
  • Provider keys belong in encrypted server secrets.

Turnstile keys, admin IDs and production account settings must be configured in your account.

Configure encrypted secrets

Run the security agent

The supplied security/ Worker probes your configured staging origin. Grok reviews fixed test findings and suggests fixes.

  • Fewer than 20 requests per review.
  • Separate report database and operator token.
  • No customer records sent to the model.
  • Daily schedule available, with a four-run daily cap.
REUP_SECURITY_TARGET=https://staging.reupsell.com \
  npm run security:check

The agent still needs deployment in your Cloudflare account. Authenticated two-account tests and an independent penetration test remain part of launch verification.

Before taking real customer data

  1. Test using two businesses and synthetic contacts.
  2. Verify Checkout, signed webhooks, opt-outs and spending limits.
  3. Restore a database export into a disposable database.
  4. Resolve security findings and verify deployment settings.
  5. Deploy a separate production database and attach your domain.

Use DEPLOYMENT.md in the source package for the complete instructions and agent setup.