This guide covers deploying Sovry to production with domain sovry.xyz.
- Frontend: Next.js app deployed on Vercel
- Backend: Node.js API + Worker deployed on Render.com (free tier)
- Database: Supabase (already configured)
- Subgraph: Goldsky (already deployed)
- Domain: sovry.xyz
- GitHub repository with your code
- Vercel account (sign up at https://vercel.com)
- Domain sovry.xyz configured in your DNS provider
-
Go to https://vercel.com/new
-
Import your GitHub repository
-
Configure project:
- Framework Preset: Next.js
- Root Directory:
frontend - Build Command:
npm run build - Output Directory:
.next - Install Command:
npm install
-
Add Environment Variables (copy from
.envor.env.example):NEXT_PUBLIC_STORY_RPC_URLS=https://mainnet.storyrpc.io,https://rpc.ankr.com/story_mainnet NEXT_PUBLIC_SUBGRAPH_URL=<your_goldsky_url> NEXT_PUBLIC_LAUNCHPAD_ADDRESS=<your_launchpad_address> NEXT_PUBLIC_EXCHANGE_ADDRESS=0xA2b90B0c02B422F66cacBe5B6515Fd5702B7074D NEXT_PUBLIC_SUPABASE_URL=<your_supabase_url> NEXT_PUBLIC_SUPABASE_ANON_KEY=<your_supabase_anon_key> NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID=<your_dynamic_env_id> NEXT_PUBLIC_PINATA_JWT=<your_pinata_jwt> NEXT_PUBLIC_PINATA_GATEWAY=<your_pinata_gateway> -
Click Deploy
npm i -g vercel
cd frontend
vercel --prod- In Vercel Dashboard → Your Project → Settings → Domains
- Add domain:
sovry.xyz - Add domain:
www.sovry.xyz - Vercel will provide DNS records (A/CNAME)
- Add these records to your DNS provider:
Type: A Name: @ Value: 76.76.21.21 Type: CNAME Name: www Value: cname.vercel-dns.com - Wait for DNS propagation (5-30 minutes)
- Render account (sign up at https://render.com)
- GitHub repository
-
Click New + → Web Service
-
Connect your GitHub repository
-
Configure:
- Name:
sovry-backend - Region: Singapore (closest to your users)
- Branch:
main - Root Directory:
backend - Runtime: Node
- Build Command:
npm install - Start Command:
npm start - Instance Type: Free
- Name:
-
Add Environment Variables:
NODE_ENV=production PORT=10000 FRONTEND_URLS=https://sovry.xyz,https://www.sovry.xyz RPC_PROVIDER_URL=https://mainnet.storyrpc.io SUBGRAPH_URL=<your_goldsky_url> SUPABASE_URL=<your_supabase_url> SUPABASE_SERVICE_ROLE_KEY=<your_service_role_key> EXCHANGE_ADDRESS=0xA2b90B0c02B422F66cacBe5B6515Fd5702B7074D LAUNCHPAD_ADDRESS=<your_launchpad_address> IP_PRICE_FALLBACK_USD=0.50 PRICE_INTERVAL_MS=60000 PUSH_INTERVAL_MS=3600000 HARVEST_INTERVAL_MS=14400000 GRADUATION_INTERVAL_MS=60000 -
Click Create Web Service
-
Render will provide a URL like:
https://sovry-backend.onrender.com
- Render free tier spins down after 15 minutes of inactivity
- First request after spin-down takes ~30 seconds
- For production, consider upgrading to Starter ($7/month) for always-on
Important: Currently, your frontend uses Next.js API routes (/api/*) which run on Vercel.
The backend worker is separate and handles background jobs (royalty harvesting, price updates, etc.).
No changes needed - your architecture is already optimized:
- Frontend API routes → Run on Vercel Edge (fast, global)
- Backend worker → Runs on Render (background jobs)
- Build succeeds without errors
- Environment variables are set
- Custom domain (sovry.xyz) is connected
- SSL certificate is active (automatic via Vercel)
- Test homepage loads: https://sovry.xyz
- Test wallet connection works
- Test token creation works
- Test trading works
- Check live trade notifications appear
- Service is running (check logs)
- Health endpoint works:
https://sovry-backend.onrender.com/health - Worker is running (check logs for "Worker started")
- CORS allows requests from sovry.xyz
- Royalty harvesting runs (check Supabase
royalty_statetable) - IP price updates (check logs every 60s)
- RLS policies are enabled for production
- Service role key is kept secret (only in backend env)
- Anon key is used in frontend (public)
- Check tables:
tokens,royalty_state,royalty_harvest_log
- Subgraph is synced to latest block
- Query works: test in GraphQL playground
- Frontend can fetch data via
/api/subgraph
# Check build locally first
cd frontend
npm run build- Fix any TypeScript errors
- Ensure all env vars are set in Vercel dashboard
- Check Render logs for errors
- Verify PORT is set to 10000 (Render default)
- Check CORS settings allow sovry.xyz
- Check subgraph is synced
- Verify NEXT_PUBLIC_SUBGRAPH_URL is correct
- Check browser console for errors
- Verify NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID is correct
- Check Dynamic dashboard for allowed domains (add sovry.xyz)
Both Vercel and Render support auto-deploy from Git:
- Push to
mainbranch → Auto-deploy to production - Push to
devbranch → Deploy to preview (Vercel) or staging (Render)
| Service | Plan | Cost |
|---|---|---|
| Vercel | Hobby | Free (100GB bandwidth) |
| Render | Free | Free (750 hours/month) |
| Supabase | Free | Free (500MB database, 2GB bandwidth) |
| Goldsky | Free | Free (subgraph indexing) |
| Total | $0/month 🎉 |
- Vercel Pro ($20/mo): If you exceed 100GB bandwidth or need team features
- Render Starter ($7/mo): If you need always-on backend (no spin-down)
- Supabase Pro ($25/mo): If you exceed 500MB database or need more bandwidth
All variables must start with NEXT_PUBLIC_ to be accessible in browser.
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_STORY_RPC_URLS |
✅ | Comma-separated RPC endpoints |
NEXT_PUBLIC_SUBGRAPH_URL |
✅ | Goldsky subgraph URL |
NEXT_PUBLIC_LAUNCHPAD_ADDRESS |
✅ | Launchpad contract address |
NEXT_PUBLIC_EXCHANGE_ADDRESS |
✅ | Exchange contract address |
NEXT_PUBLIC_SUPABASE_URL |
✅ | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
✅ | Supabase anon key (public) |
NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID |
✅ | Dynamic wallet environment ID |
NEXT_PUBLIC_PINATA_JWT |
✅ | Pinata JWT for IPFS uploads |
NEXT_PUBLIC_PINATA_GATEWAY |
✅ | Pinata gateway URL |
| Variable | Required | Description |
|---|---|---|
NODE_ENV |
✅ | Set to production |
PORT |
✅ | Set to 10000 (Render default) |
FRONTEND_URLS |
✅ | Comma-separated allowed origins for CORS |
RPC_PROVIDER_URL |
✅ | Story Protocol RPC |
SUBGRAPH_URL |
✅ | Goldsky subgraph URL |
SUPABASE_URL |
✅ | Supabase project URL |
SUPABASE_SERVICE_ROLE_KEY |
✅ | Supabase service role key (secret!) |
EXCHANGE_ADDRESS |
✅ | Exchange contract address |
LAUNCHPAD_ADDRESS |
✅ | Launchpad contract address |
Your Sovry platform is now live at https://sovry.xyz 🚀
Need help? Check the logs:
- Vercel: Dashboard → Your Project → Deployments → View Function Logs
- Render: Dashboard → sovry-backend → Logs
- Supabase: Dashboard → Logs