Self-hosting and setup
Connect a real control plane, object store, and payment provider.
Service boundaries
- Next.js dashboard and public documentation: deploy with the application’s supported Next.js host.
- Convex and Better Auth: identity, organization access, metadata, reservations, and authoritative usage ledger.
- AWS S3 and CloudFront: file storage, recovery copies, and controlled delivery.
- Workers: upload completion, signed callbacks, cleanup, metering reconciliation, and purge.
- Stripe: USD subscriptions, payment events, and customer billing; the existing Australian account settles in AUD.
Dashboard environment
The deployment also needs server-side authentication, mail, Stripe, AWS, and service configuration from the repository’s environment template. Public environment variables are visible to browsers; never put server secrets in them.
Missing configuration must fail closed with an explicit setup error. The dashboard should build without connecting to an account, and it must not fake a successful upload, payment, or sign-in.
Set UPLOADFILE_ENABLED_REGIONS to the same comma-separated AWS region names on the control host and Convex backend as the infrastructure enabledRegions selection. For a Sydney deployment use ap-southeast-2. The underlying service supports ten locations, but only the enabled deployment subset accepts new applications and uploads. Omitting this setting preserves legacy ten-region coverage; an empty or invalid value fails configuration validation.
Before removing a deployed region, drain its retained files and verify cleanup. Keep its storage, recovery copies, workers, permissions, and delivery/edge configuration until then; retaining an old region-map entry alone cannot keep those services available.
NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
NEXT_PUBLIC_CONVEX_SITE_URL=https://your-deployment.convex.site
NEXT_PUBLIC_SITE_URL=https://your-dashboard.example.comValidate before accepting production files
- Verify authentication, email delivery, MFA, passkeys, and role isolation.
- Test browser storage CORS, multipart completion, replay handling, and cancellation.
- Verify private delivery, ACL changes, regional deletion propagation, and purge of recovery copies.
- Exercise Stripe test-mode subscriptions, paid upgrades, cancellation, failed payments, and duplicate webhooks.
- Reconcile all four meters against the internal ledger and configured limits.
- Measure the provider cost and performance gates from the approved implementation specification.
Uploadfile is an independently operated service. The framework SDK is forked from the MIT-licensed UploadThing SDK; UploadThing’s hosted backend is not included in that source.