Migration Overview
This guide walks you through migrating your BOOP integration from the development environment (dev.app.boop.it) to production (app.boop.it).
Production migration is irreversible. Ensure all testing is complete before proceeding.
π Pre-Migration Requirements
Before starting migration, verify you have completed:
Complete Testing Checklist
Production Credentials
Obtain production credentials from BOOP team
Code Review
Security and code review approved by your team
Deployment Plan
Production deployment strategy finalized
π 1. Obtain Production Credentials
Request Process
Contact the BOOP team to request production access:
Email : production@boop.network
Subject : Production Access Request - [Your Company Name]Include :
Company information and use case
Development testing completion confirmation
Expected go-live date
Technical contact information
Youβll receive production credentials:
# Development (current)
BOOP_ENV = development
BOOP_VENDOR_ID = ven_dev_your_id
BOOP_API_KEY = sk_dev_your_secret_key
BOOP_BASE_URL = https://dev.app.boop.it
# Production (new)
BOOP_ENV = production
BOOP_VENDOR_ID = ven_live_your_id
BOOP_API_KEY = sk_live_your_secret_key
BOOP_BASE_URL = https://app.boop.it
π§ 2. Update Configuration
Environment Variables
Update your application configuration:
// config/boop.js
const config = {
development: {
baseUrl: 'https://dev.app.boop.it' ,
vendorId: process . env . BOOP_DEV_VENDOR_ID ,
apiKey: process . env . BOOP_DEV_API_KEY ,
wsEndpoint: 'wss://dev.app.boop.it/ws/vendor'
},
production: {
baseUrl: 'https://app.boop.it' ,
vendorId: process . env . BOOP_PROD_VENDOR_ID ,
apiKey: process . env . BOOP_PROD_API_KEY ,
wsEndpoint: 'wss://app.boop.it/ws/vendor'
}
};
export default config [ process . env . NODE_ENV || 'development' ] ;
Environment Detection
Implement environment detection to prevent accidental production calls:
class BoopClient {
constructor ( config ) {
this . config = config ;
// Safety check for production
if ( this . isProduction () && ! process . env . CONFIRM_PRODUCTION ) {
throw new Error (
'Production environment detected. Set CONFIRM_PRODUCTION=true to confirm.'
);
}
}
isProduction () {
return this . config . baseUrl . includes ( 'app.boop.it' );
}
async authenticate ( contextData ) {
if ( this . isProduction ()) {
console . log ( 'π Using PRODUCTION BOOP environment' );
} else {
console . log ( 'π§ͺ Using DEVELOPMENT BOOP environment' );
}
// ... authentication logic
}
}
π 3. Staged Deployment Strategy
Recommended Deployment Approach
Blue-Green Deployment
Deploy to production environment alongside existing system
Gradual Traffic Shift
Start with 5% traffic, then gradually increase
Monitoring Phase
Monitor for 24 hours at each traffic level
Full Deployment
Complete migration when stable
Traffic Routing Example
// Feature flag based routing
class PaymentRouter {
constructor () {
this . boopTrafficPercentage = parseInt ( process . env . BOOP_TRAFFIC_PERCENT || '0' );
}
shouldUseBoop ( userId ) {
// Consistent user routing based on hash
const userHash = this . hashUserId ( userId );
return userHash % 100 < this . boopTrafficPercentage ;
}
async processPayment ( userId , amount ) {
if ( this . shouldUseBoop ( userId )) {
return await this . processBoopPayment ( amount );
} else {
return await this . processLegacyPayment ( amount );
}
}
hashUserId ( userId ) {
// Simple hash function for consistent routing
return userId . split ( '' ). reduce (( hash , char ) => {
return (( hash << 5 ) - hash + char . charCodeAt ( 0 )) & 0xfffffff ;
}, 0 );
}
}
π 4. Production Verification
Health Check Verification
First, verify production connectivity:
# Test production health endpoint
curl https://app.boop.it/health
# Expected response
{
"status" : "ok",
"version" : "a1b2c3d"
}
Authentication Test
Perform a controlled production test:
// Production authentication test
const testProductionAuth = async () => {
console . log ( 'π¬ Testing production authentication...' );
const testConfig = {
baseUrl: 'https://app.boop.it' ,
vendorId: process . env . BOOP_PROD_VENDOR_ID ,
apiKey: process . env . BOOP_PROD_API_KEY ,
wsEndpoint: 'wss://app.boop.it/ws/vendor'
};
const client = new BoopClient ( testConfig );
try {
// Test with minimal risk transaction
const result = await client . authenticate ({
type: 'entrance' ,
attributes: [ 'pseudonym' ]
});
if ( result . success ) {
console . log ( 'β
Production authentication successful' );
return true ;
} else {
console . error ( 'β Production authentication failed:' , result . error );
return false ;
}
} catch ( error ) {
console . error ( 'π₯ Production test error:' , error );
return false ;
}
};
// Run verification
testProductionAuth ()
. then ( success => {
if ( success ) {
console . log ( 'π Ready for production traffic' );
} else {
console . log ( 'π Production issues detected - investigate before proceeding' );
}
});
π 5. Monitoring & Observability
Essential Metrics
Monitor these key metrics during migration:
π Authentication Metrics
Success Rate : Target > 99.5%
Response Time : Target < 2 seconds
Error Rate : Target < 0.5%
Concurrent Users : Monitor capacity
Payment Success Rate : Target > 99.9%
Transaction Volume : Monitor processing capacity
Failed Payments : Should remain minimal
Revenue Impact : Track business metrics
π Infrastructure Metrics
WebSocket Connections : Monitor stability
API Response Times : Track latency
Error Rates by Endpoint : Identify issues
Uptime : Target 99.9% availability
Alerting Setup
Configure alerts for critical thresholds:
// Example monitoring configuration
const alertThresholds = {
authentication: {
errorRate: 1.0 , // Alert if > 1% errors
responseTime: 3000 , // Alert if > 3 seconds
successRate: 99.0 // Alert if < 99% success
},
payments: {
errorRate: 0.1 , // Alert if > 0.1% errors
responseTime: 2000 , // Alert if > 2 seconds
successRate: 99.5 // Alert if < 99.5% success
},
infrastructure: {
uptime: 99.0 , // Alert if < 99% uptime
connectionFailures: 5 // Alert if > 5 failures per minute
}
};
// Implement monitoring logic based on your platform
// (DataDog, New Relic, CloudWatch, etc.)
π¨ 6. Rollback Plan
Automatic Rollback Triggers
Configure automatic rollback for critical issues:
class AutoRollbackMonitor {
constructor ( thresholds ) {
this . thresholds = thresholds ;
this . consecutiveFailures = 0 ;
this . maxFailures = 5 ;
}
checkMetrics ( metrics ) {
const issues = [];
if ( metrics . errorRate > this . thresholds . errorRate ) {
issues . push ( `Error rate ${ metrics . errorRate } % exceeds threshold ${ this . thresholds . errorRate } %` );
}
if ( metrics . responseTime > this . thresholds . responseTime ) {
issues . push ( `Response time ${ metrics . responseTime } ms exceeds threshold ${ this . thresholds . responseTime } ms` );
}
if ( issues . length > 0 ) {
this . consecutiveFailures ++ ;
if ( this . consecutiveFailures >= this . maxFailures ) {
this . triggerRollback ( issues );
}
} else {
this . consecutiveFailures = 0 ;
}
}
triggerRollback ( issues ) {
console . error ( 'π¨ AUTOMATIC ROLLBACK TRIGGERED' );
console . error ( 'Issues detected:' , issues );
// Implement rollback logic:
// 1. Switch traffic back to previous system
// 2. Alert engineering team
// 3. Preserve logs for analysis
this . executeRollback ();
}
executeRollback () {
// Implementation depends on your deployment strategy
// Examples:
// - Feature flag toggle
// - Traffic routing change
// - Container rollback
// - DNS switch
}
}
Manual Rollback Process
In case manual intervention is needed:
Stop New Traffic
Immediately stop routing new transactions to BOOP
Complete In-Flight
Allow existing transactions to complete
Switch Back
Route all traffic to previous payment system
Preserve Data
Save all logs and metrics for analysis
Notify Team
Alert engineering and business teams
β
7. Post-Migration Checklist
After successful migration, complete these tasks:
Short Term (First Week)
Ongoing
π Migration Success!
Congratulations! Youβve successfully migrated to production.
Next Steps
Support & Resources
Remember : The BOOP team is here to support your production journey. Donβt hesitate to reach out if you encounter any issues or need assistance.