import { Icon } from '../shared/Icon'; const ENV_CONFIGS = [ { env: 'Staging', flags: { ENABLE_BOOKING_JOBS: true, ENABLE_PRE_TRIP_RIDER_CONFIRMATION: true, ENABLE_DRIVER_CONFIRMATION: false }, color: '#f59e0b' }, { env: 'Production', flags: { ENABLE_BOOKING_JOBS: false, ENABLE_PRE_TRIP_RIDER_CONFIRMATION: false, ENABLE_DRIVER_CONFIRMATION: false }, color: '#ef4444' }, ]; const ROLLOUT_STEPS = [ { step: 'Deploy backend with all flags OFF', detail: 'Code ships but nothing executes — zero risk' }, { step: 'Enable ENABLE_BOOKING_JOBS in staging', detail: 'Master switch: allows BullMQ job scheduling' }, { step: 'Enable ENABLE_PRE_TRIP_RIDER_CONFIRMATION in staging', detail: 'Enables the 24h-before-trip rider confirmation flow' }, { step: 'QA validates all 11 flow paths in staging', detail: 'Full regression: happy path, cancellations, timeouts' }, { step: 'Enable ENABLE_BOOKING_JOBS in production', detail: 'Production rollout — monitor BullMQ dashboard and error rates' }, { step: 'Enable ENABLE_PRE_TRIP_RIDER_CONFIRMATION in production', detail: 'Rider confirmation goes live — monitor notification delivery' }, { step: 'Enable ENABLE_DRIVER_CONFIRMATION when ready', detail: 'Last phase: driver confirmation flow (currently false everywhere)' }, ]; const ROLLBACK = [ 'Set ENABLE_BOOKING_JOBS=false to disable all job scheduling immediately', 'Existing in-flight jobs will still process — they are idempotent', 'No database migration needed — booking_status field is additive, not destructive', 'Mobile apps degrade gracefully: they simply won\'t see booking-specific UI states', ]; export function DeploymentGuideSection() { return (

Environment Configuration

{ENV_CONFIGS.map((env) => (
{env.env}
{Object.entries(env.flags).map(([key, val]) => ( {key}={val ? 'true' : 'false'} ))}
))}

Rollout Steps

{ROLLOUT_STEPS.map((s, i) => (
{i + 1}
{s.step}

{s.detail}

))}

Rollback Procedure

); }