- All tests passing:
npm test - Linter clean:
npm run lint - Build succeeds:
npm run build - No console errors in dev
- No security warnings:
npm audit - TypeScript strict mode enabled
- All TODOs reviewed
-
.env.exampleupdated with all required variables -
.envfile created and configured - JWT_SECRET is random, 32+ characters
- MONGODB_URI points to production DB
- NODE_ENV=production
- CORS_ORIGIN set to production domain
- All endpoints tested with production config
- Passwords hashed with bcrypt
- JWT tokens expire after 7 days
- HTTPS/TLS configured
- CORS restricted to specific origins
- Rate limiting in place
- Input validation on all endpoints
- No secrets in code or git
- API keys rotated
- Security headers enabled (Helmet)
- MongoDB instance running
- Database connection tested
- Backup strategy defined
- Replication configured (if needed)
- User authentication enabled
- Database size monitored
- Index creation optimized
- Unit tests: 100% passing
- Integration tests: All workflows tested
- Manual testing: All features verified
- Edge cases tested
- Error scenarios tested
- Load testing: 100+ concurrent users
- Stress testing: Capacity verified
- README.md complete
- QUICK_START.md available
- API documentation up to date
- Deployment guide written
- Troubleshooting guide included
- Environment variables documented
- API endpoints documented
- Search responds < 500ms
- Download completes < 30s
- Web UI loads < 2s
- Supports 100+ concurrent users
- Memory usage monitored
- CPU usage reasonable
- Database queries optimized
docker build -t starforge-registry:latest .
docker tag starforge-registry:latest starforge-registry:$(date +%Y%m%d-%H%M%S)
docker push your-registry/starforge-registry:latest- Build succeeds
- Image size reasonable (< 500MB)
- No build warnings
# Set environment variables on server
export NODE_ENV=production
export JWT_SECRET=$(head -c 32 /dev/urandom | base64)
export MONGODB_URI=<production-db-connection>
export PORT=3000- All env vars set
- Secrets properly secured
- No hardcoded credentials
docker run -d \
-p 3000:3000 \
--name starforge-registry \
-e NODE_ENV=production \
-e JWT_SECRET=$JWT_SECRET \
-e MONGODB_URI=$MONGODB_URI \
--restart unless-stopped \
starforge-registry:latest- Container starts successfully
- Health check passes:
curl http://localhost:3000/health - Logs show no errors
npm install --production
npm run build- Dependencies installed
- Build completes
npm install -g pm2
pm2 start npm --name "registry-api" -- start
pm2 save
pm2 startup- Process starts
- Auto-restarts on crash
- Loads on server reboot
git push heroku main
heroku config:set JWT_SECRET=<secret>
heroku config:set MONGODB_URI=<url>
heroku logs --tail- Deployment succeeds
- Logs clean
- Health check passes
- Serverless framework installed
- API Gateway configured
- RDS/DocumentDB for MongoDB
- Environment variables set
- Test deployment
- CloudWatch monitoring
- SSH access configured
- Node.js installed
- PM2 or systemd configured
- SSL certificate installed
- Firewall rules set
- Monitoring enabled
# Let's Encrypt with Certbot
sudo certbot certonly --standalone -d registry.starforge.dev
# Copy to accessible location
sudo cp /etc/letsencrypt/live/registry.starforge.dev/*.pem ./certs/- Certificate obtained
- Files accessible to application
- Renewal automated
- HTTPS options configured
- Certificate paths in code
- HTTP redirects to HTTPS
- HSTS headers enabled
curl https://registry.starforge.dev/health- HTTPS works
- No certificate warnings
- Redirect from HTTP works
# Point domain to server
registry.starforge.dev A 12.34.56.78
# DNS propagation test
nslookup registry.starforge.dev- A record created
- DNS resolves
- TTL reasonable (300-3600)
# Configure log file
mkdir -p /var/log/starforge-registry
touch /var/log/starforge-registry/app.log
chmod 666 /var/log/starforge-registry/app.log- Log file created
- Rotation configured
- Permissions correct
# Monitor endpoint
curl -s http://localhost:3000/health | jq .
# Set up periodic health check
* * * * * curl -s http://localhost:3000/health || alert- Health endpoint working
- Monitoring configured
- Alerts set up
- New Relic OR
- DataDog OR
- CloudWatch Configured with:
- Application performance metrics
- Database query times
- Error rates
- Uptime monitoring
# MongoDB backup
mongodump --uri="mongodb://..." --out=/backups/mongodb/$(date +%Y%m%d)
# Schedule daily backup
0 2 * * * mongodump --uri="..." --out=/backups/mongodb/$(date +\%Y\%m\%d)- Backup script created
- Scheduled daily
- Tested restore process
# Backup storage directory
tar -czf /backups/templates-$(date +%Y%m%d).tar.gz /storage/templates/- Storage backed up
- Restore tested
- Retention policy set
npm install express-rate-limitconst rateLimit = require("express-rate-limit");
const limiter = rateLimit({
windowMs: 15 * 60 * 1000,
max: 100,
});
app.use("/api/", limiter);- Rate limiter installed
- Configured on API routes
- Tested with load
# Test signup
curl -X POST https://registry.starforge.dev/api/auth/signup \
-d '{"email":"[email protected]","username":"test","password":"password123"}'
# Test search
curl -X POST https://registry.starforge.dev/api/templates/search \
-d '{"query":""}'
# Test web UI
curl https://registry.starforge.dev/- Signup works
- Search works
- Web UI loads
- API responds with correct data
# Load test
ab -n 1000 -c 100 https://registry.starforge.dev/health
# Measure response time
curl -w "Time: %{time_total}s\n" https://registry.starforge.dev/health- Handles concurrent requests
- Response time acceptable
- No timeouts
# Test HTTPS
curl -I https://registry.starforge.dev/
# Check certificate
echo | openssl s_client -servername registry.starforge.dev \
-connect registry.starforge.dev:443
# Test CORS headers
curl -H "Origin: https://example.com" \
-H "Access-Control-Request-Method: GET" \
https://registry.starforge.dev/- HTTPS enforced
- Certificate valid
- CORS configured correctly
- Security headers present
- Health endpoint responds
- Logging working
- Alerts configured
- Dashboards populated
- Error tracking working
- Stop current deployment
- Restore previous version from git
- Rollback database if needed
- Verify health checks
- Notify stakeholders
# Docker rollback
docker stop starforge-registry
docker run -d \
--name starforge-registry \
starforge-registry:previous-tag
# Git rollback
git checkout previous-tag
npm run build
npm start
# PM2 rollback
pm2 restart registry-api- Check health endpoint
- Review error logs
- Monitor performance metrics
- Review analytics
- Update dependencies
- Run backup verification
- Security audit
- Performance review
- Database optimization
- Capacity planning
- Major dependency updates
- Security assessment
- Disaster recovery drill
- Cost analysis
- Tech Lead approval
- Security review passed
- Performance acceptable
- Documentation complete
- Team trained
- Monitoring active
- Rollback plan ready
Deployed by: _ Date: _
Status: ☐ Ready for Production ☐ Needs Fixes ☐ On Hold
Notes: