Skip to content

Deployment

This guide condenses the steps from DEPLOYMENT_GUIDE.md into a quick reference. For full step-by-step instructions, see that file.

Topology

You'll deploy four services to three providers:

ServiceProviderPlanURL
ML serviceRenderStarterrink-ml.onrender.com
API gatewayVercelHobby/Proapi.rinkglobal.com
Frontend (SPA)VercelHobby/Prorinkglobal.com
DocumentationVercelHobby/Prodocs.rinkglobal.com

Plus:

  • Supabase (free) for auth.
  • Groq (pay-per-use) for the AI assistant.

Order of operations

  1. Render — deploy the ML service first. Note the URL.
  2. Vercel rink-api — deploy the gateway with ML_API_URL pointing at the Render URL.
  3. Vercel rink-web — deploy the SPA with VITE_API_BASE_URL pointing at the gateway.
  4. Vercel rink-docs — deploy the docs site (this page is hosted there!).
  5. DNS — point all subdomains at their respective Vercel projects.

Environment variable matrix

Render → rink-ml

VariableValue
RINK_DATA_DIR/var/data (set by render.yaml)
ALLOWED_ORIGINShttps://rinkglobal.com,https://www.rinkglobal.com
PYTHON_VERSION3.11.9 (set by render.yaml)
GATEWAY_SECRET(recommended) a long random string

Vercel → rink-api

VariableValue
ML_API_URLhttps://rink-ml.onrender.com
GROQ_API_KEYa fresh key from console.groq.com
GROQ_MODELllama-3.3-70b-versatile (default)
SUPABASE_URLhttps://YOUR-REF.supabase.co
SUPABASE_ANON_KEYthe anon key from Supabase dashboard
ALLOWED_ORIGINShttps://rinkglobal.com,https://www.rinkglobal.com
GATEWAY_SECRETthe same value as on Render

Vercel → rink-web

VariableValue
VITE_API_BASE_URLhttps://api.rinkglobal.com
VITE_SUPABASE_URLhttps://YOUR-REF.supabase.co
VITE_SUPABASE_ANON_KEYthe anon key from Supabase dashboard

Vercel → rink-docs

No env vars required — pure static site.

Vercel project settings

ProjectRoot directoryFramework preset
rink-api/Other
rink-web/clientVite
rink-docs/docsOther

DNS records

For each subdomain, Vercel will display the exact record to add. As a guideline:

SubdomainTypeValue
rinkglobal.comA76.76.21.21
www.rinkglobal.comCNAMEcname.vercel-dns.com
api.rinkglobal.comCNAMEcname.vercel-dns.com
docs.rinkglobal.comCNAMEcname.vercel-dns.com

Cloudflare-fronted domains: set the proxy status to DNS Only (gray cloud), not proxied — Vercel needs to handle TLS itself.

Smoke-test commands

After deploy:

bash
# Health
curl https://api.rinkglobal.com/api/health

# Frontend
open https://rinkglobal.com

# Docs
open https://docs.rinkglobal.com

For a more thorough check, run the included script:

bash
git clone https://github.com/rinkglobal/rink-saas-v3-ml
cd rink-saas-v3-ml
cp server/.env.example server/.env  # fill in real values
API_BASE=https://api.rinkglobal.com node scripts/check-deploy.js

It exercises every gateway route (auth gates, Groq, ML proxy, CORS) and reports pass/fail for each.

Free-tier alternative

To run everything for $0/month while in beta, set Render to plan: free in ml_api/render.yaml. Trade-offs:

  • Cold starts (~30 s after 15 min idle).
  • No persistent disk — uploaded CSVs and trained models are lost on every spin-down.

The user-facing impact is that someone returning after a long idle period will need to re-upload their CSV. Acceptable for beta; not for production.

Cost summary

ItemCost
Render Starter (1 service)$7 / month
Render persistent disk (1 GB)~$0.25 / month
Vercel Hobby (3 projects)$0
Supabase Free$0
Groq APIusage-based, ~$0.10 / 1k requests at LLama-3.3-70B
Domain~$15 / year (rinkglobal.com)

Total for low beta volume: ~$8 / month + variable Groq costs.

Made with ❤︎ by the RINK team · rinkglobal.com