Skip to main content

Deployment

SteadyRenew is configured out of the box for Netlify, combining a static + prerendered Vite frontend with Netlify Edge Functions and serverless/scheduled Functions. The frontend alone can also be hosted on any static host in local-first mode.

Build output

npm run build runs vite build && tsx scripts/prerender.ts and writes to dist/:
  • /app SPA shell (dist/app/index.html via /* -> /app/index.html fallback).
  • Prerendered static marketing, pricing, legal, and blog pages (/, /zh, /about, /pricing, /zh/pricing, /privacy, /terms, /blog/*, /zh/blog/*, /sitemap.xml, /robots.txt).
  • Agent & MCP artifacts (/agent/setup.md, /agent/ai-tools.json, /agent/openapi.yaml, /downloads/steadyrenew-mcp.mjs, /downloads/subscription-manager-mcp.tgz).

Netlify routing (netlify.toml)

netlify.toml configures:
  • Build command: npm run build, publish directory dist, Node 22.
  • Edge Functions (netlify/edge-functions/):
    • smart-entry.ts on / — routes returning app users or localized visitors cleanly while keeping crawlers on the static landing page.
    • docs-proxy.ts on /docs, /docs/*, and /.well-known/vercel/* — reverse-proxies the Mintlify documentation site under /docs with immutable caching for /docs/_next/static/* assets and no-store for HTML pages.
  • Public API & MCP redirects:
    • /api/mcp → /.netlify/functions/api-mcp
    • /api/v1/subscriptions & /api/v1/subscriptions/* → /.netlify/functions/api-v1-subscriptions
    • /api/v1/notification-settings → /.netlify/functions/api-v1-notification-settings
    • /api/v1/analytics/* → /.netlify/functions/api-v1-analytics
    • /api/v1/audit → /.netlify/functions/api-v1-audit
  • SPA fallback: /* → /app/index.html (200), served after static files in dist/.
  • Security & CORS headers: CSP, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, and permissive CORS + explicit MIME types on /llms.txt, /agent/*, and /downloads/*.
Bing Webmaster verification uses /BingSiteAuth.xml plus a msvalidate.01 meta tag. IndexNow serves /16274743d7549a346d2cf33abbd2d73d.txt and submits sitemap URLs via npm run indexnow after production deploys without failing the deploy on network errors.

Serverless & scheduled Functions

netlify/functions/ includes: Use Netlify Dev for local end-to-end function testing:

Pre-deploy checklist

  1. Run npm run check (typecheck, lint, test, test:functions, and build).
  2. Apply all Supabase SQL migrations in supabase/migrations/ before enabling cloud sync, Passkeys, API keys, AI capture, payments, or scheduled notifications.
  3. Configure only the environment variables needed for your enabled services (including STRIPE_MODE=live on production and PRODUCTION_SUPABASE_URL on staging).
  4. Point your Stripe webhook endpoint at https://your-domain.example/.netlify/functions/stripe-webhook with the events listed in Payments with Stripe.
  5. If you changed documentation under docs-site/, run cd docs-site && mint broken-links (and mint validate before major structure changes).