Deployment Guide
Use this guide to release AuctioHub consistently across environments.
Environment Setup By Stage
Prepare separate configuration for:
- Development
- Staging
- Production
Each stage must define complete auth, database, media, payment, and admin variables.
Build And Start Flow
npm ci
npm run build
npm run start
If your deployment platform uses managed build hooks, keep the same logical sequence.
Database Migration Sequence
Run migrations in deterministic order before routing production traffic:
- Apply schema baseline.
- Apply incremental migrations.
- Apply required seed/setup updates.
- Verify migration table state.
Pre-Deploy Checklist
- All required environment variables are present.
- Stripe webhook endpoint is configured for the stage.
- Google OAuth callback points to stage hostname.
- Admin bootstrap emails are validated.
Post-Deploy Smoke Tests
Run critical route and workflow checks:
- Home and category listing load.
- Auction detail and session endpoints respond.
- Sign-in works.
- User dashboard access works for signed-in user.
- Admin routes are denied to non-admin and allowed to admin.
- Bid validation rejects amount less than or equal to current value.
- Winner payment flow starts and completion updates outcome.
Monitoring And Alerting
Track and alert on:
- API error rates and latency.
- Failed auth callbacks.
- Payment completion failures.
- Auction finalization job errors.
- Database connection saturation.
Rollback Procedure
- Pause writes if data integrity is at risk.
- Roll back application version to last known good release.
- If needed, apply database rollback plan compatible with current data.
- Re-run smoke tests.
- Publish incident summary and action items.
Production Concerns
- Polling intervals should avoid unnecessary load spikes.
- Cache behavior must not serve stale winner/payment state after completion.
- Idempotent payment completion handling is required to avoid duplicate transitions.