Deployment Skill
This skill provides instructions for deploying the ShopSmart e-commerce application to Render.
Prerequisites
Before deploying, ensure:
- •All tests pass (
npm testin both client and server) - •Code is linted (
npm run lintin both client and server) - •Environment variables are configured in Render dashboard
Deployment Commands
Deploy via Render Dashboard
The application auto-deploys when pushing to the main branch. For manual deployment:
bash
# Trigger deploy via Render API (if webhook configured) curl -X POST https://api.render.com/deploy/srv-xxx?key=xxx
Pre-deployment Checklist
// turbo
- •Run server tests
bash
cd server && npm test
// turbo 2. Run client tests
bash
cd client && npm test
// turbo 3. Build client to verify no build errors
bash
cd client && npm run build
// turbo 4. Build server to verify TypeScript compilation
bash
cd server && npm run build
- •Commit and push to main branch
bash
git add . git commit -m "chore: prepare for deployment" git push origin main
Render Configuration
The render.yaml at project root defines the infrastructure:
| Service | Type | Build Command | Start Command |
|---|---|---|---|
| shopsmart-backend | Web Service | cd server && npm install | cd server && npm start |
| shopsmart-frontend | Static Site | cd client && npm install && npm run build | N/A |
Rollback Procedure
If deployment fails:
- •Go to Render Dashboard → Service → Deploys
- •Click on the last successful deploy
- •Click "Rollback to this deploy"
Environment Variables
Required environment variables in Render:
- •
DATABASE_URL- PostgreSQL connection string - •
REDIS_URL- Redis connection string - •
JWT_SECRET- JWT signing secret (use strong random value) - •
NODE_ENV- Set toproduction - •
CORS_ORIGIN- Frontend URL
Monitoring Post-Deploy
// turbo
- •Check server health endpoint
bash
curl https://shopsmart-backend.onrender.com/api/v1/health
- •Verify frontend is accessible at static site URL
- •Check Render logs for any startup errors