document.addEventListener('DOMContentLoaded', function() { // Get the launch data from sessionStorage const launchData = JSON.parse(sessionStorage.getItem('instanceLaunchData')); if (!launchData) { showError('No launch data found. Please start over.'); return; } // Initialize the steps initializeSteps(); // Start the launch process startLaunch(launchData); }); function initializeSteps() { const stepsContainer = document.getElementById('stepsContainer'); // Add Cloudflare connection check step const cloudflareStep = document.createElement('div'); cloudflareStep.className = 'step-item'; cloudflareStep.innerHTML = `
Verifying Cloudflare API connection...
Setting up domain DNS records in Cloudflare...
Verifying domain configurations...
Verifying connection to NGINX Proxy Manager...
Setting up secure HTTPS connection...
Setting up NGINX proxy host configuration...
Verifying connection to Portainer...
Fetching docker-compose.yml from repository...
Launching your application stack...
Storing instance information...
Verifying instance health...
Setting up instance authentication...
Configuring company details...
Configuring color scheme...
Setting up admin account...
Configuring email settings...
Sending notification to client...
Preparing launch report...
| Domain | Status | Message |
|---|---|---|
| ${domain} | ${result.status} | ${result.message} |
| Domain | Status | IP Address | TTL |
|---|---|---|---|
| ${domain} | ${result.resolved ? 'Resolved' : 'Not Found'} | ${result.ip || 'N/A'} | ${result.ttl || 'N/A'} |
| Property | Value |
|---|---|
| Stack Name | ${stackResult.data.name} |
| Stack ID | ${stackResult.data.id} |
| Status | ${stackResult.data.status === 'existing' ? 'Existing' : 'Deployed'} |
| Property | Value |
|---|---|
| Status | Authenticated |
| Default Admin | administrator@docupulse.com |
| Connection Type | Management API Key |
| Authentication Type | ${authResult.alreadyAuthenticated ? 'Existing' : 'New'} |
| Property | Value |
|---|---|
| Company Name | ${data.company.name || 'Not set'} |
| Industry | ${data.company.industry || 'Not set'} |
| ${data.company.email || 'Not set'} | |
| Website | ${data.company.website || 'Not set'} |
| Address | ${data.company.streetAddress || 'Not set'}, ${data.company.city || ''}, ${data.company.state || ''} ${data.company.zipCode || ''} |
| Property | Value | Preview |
|---|---|---|
| Primary Color | ${data.colors.primary || 'Not set'} | |
| Secondary Color | ${data.colors.secondary || 'Not set'} |
| Property | Value |
|---|---|
| Email Address | ${credentialsResult.data.email || 'Not set'} |
| Username | ${credentialsResult.data.username || 'administrator'} |
| Role | Administrator |
| Password Setup | Reset Link Pending |
| Status | ${credentialsResult.data.already_updated ? 'Already Updated' : 'Updated'} |
| Property | Value |
|---|---|
| SMTP Host | ${smtpResult.data.smtp_host || 'Not set'} |
| SMTP Port | ${smtpResult.data.smtp_port || 'Not set'} |
| Security | ${smtpResult.data.smtp_security || 'None'} |
| Username | ${smtpResult.data.smtp_username || 'Not set'} |
| From Email | ${smtpResult.data.smtp_from_email || 'Not set'} |
| From Name | ${smtpResult.data.smtp_from_name || 'Not set'} |
| Status | Copied Successfully |
| Property | Value |
|---|---|
| Recipient | ${data.company.email || 'Not set'} |
| Subject | Your DocuPulse Instance is Ready! |
| Status | Sent Successfully |
| Instance URL | https://${data.webAddresses[0]} |
| Password Reset | Link Included |
Dear ${data.company.name || 'Valued Customer'},
Great news! Your DocuPulse instance has been successfully deployed and configured.
Instance URL: https://${data.webAddresses[0]}
Company Name: ${data.company.name || 'Not set'}
Industry: ${data.company.industry || 'Not set'}
Deployment Date: ${new Date().toLocaleString()}
Email Address: ${data.company.email || 'Not set'}
Username: administrator
For your security, you need to set up your password. Click the button below to create your secure password.
Password Reset Link Expires: 24 hours
If you have any questions or need assistance, please don't hesitate to contact our support team.
Thank you for choosing DocuPulse!
| Property | Value |
|---|---|
| Proxy Host ID | ${result.id || 'N/A'} |
| Domains | ${domains.join(', ')} |
| Forward Scheme | http |
| Forward Host | 192.168.68.124 |
| Forward Port | ${parseInt(port)} |
| SSL Status | Forced |
| SSL Certificate | Using Certificate ID: ${sslCertificateId} |
| Security Features | Block Exploits HSTS HTTP/2 |
| Performance | Caching WebSocket |
| Property | Value |
|---|---|
| Certificate ID | ${result.id || 'N/A'} |
| Domains | ${(result.domain_names || domains).join(', ')} |
| Provider | ${result.provider || 'Let\'s Encrypt'} |