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
- Add ReUpSell.com to your Cloudflare account.
- Create a staging Worker and a separate D1 database.
- Use the supplied
wrangler.example.jsoncand replace its database ID. - Apply migrations, run tests, then deploy.
- 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 deployCloudflare 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 secretsRun 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
- Test using two businesses and synthetic contacts.
- Verify Checkout, signed webhooks, opt-outs and spending limits.
- Restore a database export into a disposable database.
- Resolve security findings and verify deployment settings.
- Deploy a separate production database and attach your domain.
Use DEPLOYMENT.md in the source package for the complete instructions and agent setup.