Ready to launch? Follow this checklist to ensure your Insight is secure, stable, and monitored.
-
Admin Token:
- Set a strong
INSIGHT_ADMIN_TOKEN(at least 32 random characters) - Set
INSIGHT_ADMIN_TOKEN_SALTfor enhanced security - Set a secure
JWT_SECRETfor token signing - Do not commit these to version control
- Set a strong
-
HTTPS / HSTS:
- Ensure your domain handles SSL termination
- Configure HSTS headers in your load balancer
-
Database Connection:
- Use a connection pooler (PgBouncer, Supabase Transaction Mode) for
DATABASE_URL - Recommended: 10-20 max connections per app instance
- Use a connection pooler (PgBouncer, Supabase Transaction Mode) for
-
Database Schema:
- Run migrations:
npm run db:migrate:prod - Verify tables are created successfully
- Run migrations:
-
Backups:
- Enable Point-in-Time Recovery (PITR) on PostgreSQL
- Set up daily automated backups
- Test restore procedure
-
Redis:
- Ensure
REDIS_URLis configured - Set up Redis persistence (AOF or RDB)
- Ensure
-
RPC Providers:
- Configure RPC URLs for all supported chains:
ETHEREUM_RPC_URLPOLYGON_RPC_URLARBITRUM_RPC_URLOPTIMISM_RPC_URLBASE_RPC_URLAVALANCHE_RPC_URLBSC_RPC_URLSOLANA_RPC_URL
- Critical: Use paid providers (Alchemy, Infura, QuickNode) for production
- Configure RPC URLs for all supported chains:
-
Rate Limiting:
- Verify RPC rate limits match your expected traffic
- Set up multiple RPC endpoints for failover
-
Error Tracking:
- Set
SENTRY_DSNfor error tracking - Configure alert rules in Sentry
- Set
-
Notification Channels:
- Configure
INSIGHT_SLACK_WEBHOOK_URLfor alerts - Or set up
INSIGHT_TELEGRAM_BOT_TOKENandINSIGHT_TELEGRAM_CHAT_ID - Test notification delivery
- Configure
-
Health Check:
- Monitor
/api/healthfrom external service (UptimeRobot, Pingdom) - Set up alerts for health check failures
- Monitor
-
Logs:
- Configure log aggregation (Datadog, CloudWatch, etc.)
- Set
LOG_LEVEL=infofor production
# Run production check
npm run check:prodManual verification:
-
Health Check:
curl https://your-domain.com/api/health
-
Database Connectivity:
curl https://your-domain.com/api/health?probe=readiness -
Price Data:
curl https://your-domain.com/api/oracle/unified?symbol=ETH/USD -
Test Rate Limiting:
# Should return 429 after too many requests for i in {1..150}; do curl -s -o /dev/null -w "%{http_code}\n" https://your-domain.com/api/health done
- CORS is properly configured
- Rate limiting is enabled
- Input validation is working
- Admin endpoints require authentication
- Sensitive data is not logged
- Dependencies are up to date (
npm audit)