Description
If we need to perform an emergency database migration or smart contract upgrade, we cannot have users executing trades simultaneously.
We need a global "Maintenance Mode" middleware that instantly blocks all API traffic except for admin monitoring routes.
When activated, every standard route should safely return a 503 Service Unavailable with a friendly message.
This prevents data corruption during critical Wave 3 deployments.
Requirements
Description
If we need to perform an emergency database migration or smart contract upgrade, we cannot have users executing trades simultaneously.
We need a global "Maintenance Mode" middleware that instantly blocks all API traffic except for admin monitoring routes.
When activated, every standard route should safely return a
503 Service Unavailablewith a friendly message.This prevents data corruption during critical Wave 3 deployments.
Requirements
MAINTENANCE_MODE=falsevariable to the.envfile.true, return{ success: false, message: "TradeFlow is currently undergoing maintenance. Please try again later." }./pingor/statusendpoints bypass it.