This guide walks through deploying the SpectraCleanse AI backend on the Spaceship Hyperlift Medium plan (1 vCPU, 2 GB RAM) from a fresh fork to a live HTTPS endpoint.
- A Spaceship account with Hyperlift enabled
- A Stripe account with a live-mode secret key, a configured webhook, and two subscription price IDs (Creator and Studio)
- A Google Cloud / AI Studio account with a Gemini API key
- Your custom domain (
spectracleanse.com) added to your DNS provider
- Go to github.com/ChrisAdamsdevelopment/SpectraCleanseAI.
- Click Fork and create a copy under your own GitHub account.
- Clone your fork locally if you need to make any changes before deploying.
The repository already contains the Dockerfile and hyperlift.toml that Hyperlift needs — no further changes are required for a standard deployment.
Hyperlift injects secrets at runtime so they never appear in your image or repository.
- In the Hyperlift dashboard, open your project (or create a new one) and go to Settings → Environment Variables.
- Add each of the following as a secret (encrypted at rest):
| Variable | Where to find it |
|---|---|
JWT_SECRET |
Generate with node -e "console.log(require('crypto').randomBytes(64).toString('hex'))" |
STRIPE_SECRET_KEY |
Stripe Dashboard → Developers → API keys → Secret key |
STRIPE_WEBHOOK_SECRET |
Stripe Dashboard → Developers → Webhooks → Signing secret |
STRIPE_CREATOR_PRICE_ID |
Stripe Dashboard → Products → Creator plan → Price ID |
STRIPE_STUDIO_PRICE_ID |
Stripe Dashboard → Products → Studio plan → Price ID |
GEMINI_API_KEY |
Google AI Studio → Create API key |
- Add the following as plain (non-secret) environment variables:
| Variable | Value |
|---|---|
PORT |
3001 |
FRONTEND_URL |
https://spectracleanse.com |
DB_PATH |
/data/spectra.db |
NODE_ENV |
production |
- In the Hyperlift dashboard, click New Service.
- Select Docker as the build type.
- Connect your GitHub account and choose your forked
SpectraCleanseAIrepository. - Set the build context to
.(the repository root) and the Dockerfile path toDockerfile. - Set the exposed port to
3001. - Under Resources, choose the Medium plan (1 vCPU, 2 GB RAM).
- Under Volumes, attach a persistent volume mounted at
/datawith at least 10 GB. This is where the SQLite database lives — without a persistent volume, your user data will be lost on every deploy. - Click Deploy. Hyperlift will pull the repository, build the image, install Perl and Node dependencies, and start the container. The first build typically takes 2–4 minutes.
- Once the deploy shows a green Healthy status, verify the backend is running by visiting
https://<your-hyperlift-domain>/api/health— you should receive{"status":"ok"}.
- In the Hyperlift dashboard, go to your service → Domains.
- Click Add custom domain and enter
spectracleanse.com(and optionallywww.spectracleanse.com). - Hyperlift will display a CNAME or A record target. Log in to your DNS provider and create the appropriate record pointing
spectracleanse.comto that target. - DNS propagation typically takes 5–30 minutes. Once Hyperlift detects the record, it will automatically provision a Let's Encrypt TLS certificate and enable HTTPS. No manual certificate management is required.
- After SSL is active, update your Stripe webhook endpoint URL (Stripe Dashboard → Developers → Webhooks) from any temporary domain to
https://spectracleanse.com/api/stripe-webhook.
The React frontend (app.tsx) is a separate Vite build. Before building, set the following environment variable in your frontend build environment:
VITE_BACKEND_URL=https://spectracleanse.com
Build the frontend with vite build and deploy the resulting dist/ directory to any static host (Cloudflare Pages, Netlify, Vercel, or Hyperlift Static). Point it at the same custom domain or a subdomain of your choice.
Hyperlift automatically triggers a new build whenever you push to the default branch of your connected repository. To deploy manually, click Redeploy in the service dashboard. Zero-downtime rolling deploys are enabled by default on the Medium plan.
For deployment issues, contact hello@spectracleanse.com or open an issue on GitHub.