feat: production-ready deployment with multi-language UI

- Add multi-language support (NL, AR, EN) with RTL
- Improve health checks (SSL-tolerant, multi-endpoint)
- Add DELETE /api/stack/:name for cleanup
- Add persistent storage (portal-ai-workspace-{name})
- Improve rollback (delete domain, app, project)
- Increase SSE timeout to 255s
- Add deployment strategy documentation
This commit is contained in:
Oussama Douhou
2026-01-10 09:56:33 +01:00
parent eb6d5142ca
commit 2f306f7d68
10 changed files with 1196 additions and 462 deletions

View File

@@ -4,53 +4,50 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Stack Deployer - Deploy Your Personal OpenCode Assistant</title>
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="language-selector">
<button class="lang-btn" data-lang="nl" title="Nederlands">🇳🇱</button>
<button class="lang-btn" data-lang="ar" title="العربية">🇲🇦</button>
<button class="lang-btn" data-lang="en" title="English">🇬🇧</button>
</div>
<div class="container">
<header class="header">
<div class="logo">
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="8" fill="url(#gradient)"/>
<path d="M12 20L18 26L28 14" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="gradient" x1="0" y1="0" x2="40" y2="40">
<stop offset="0%" stop-color="#667eea"/>
<stop offset="100%" stop-color="#764ba2"/>
</linearGradient>
</defs>
</svg>
<h1>AI Stack Deployer</h1>
<h1 data-i18n="title">AI Stack Deployer</h1>
</div>
<p class="subtitle">Deploy your personal OpenCode AI coding assistant in seconds</p>
<p class="subtitle" data-i18n="subtitle">Deploy your personal OpenCode AI coding assistant in seconds</p>
</header>
<main id="app">
<!-- Form State -->
<div id="form-state" class="card">
<h2>Choose Your Stack Name</h2>
<p class="info-text">Your AI assistant will be available at <strong><span id="preview-name">yourname</span>.ai.flexinit.nl</strong></p>
<h2><span id="typewriter-target"></span></h2>
<p class="info-text"><span data-i18n="availableAt">Your AI assistant will be available at</span> <strong><span id="preview-name">yourname</span>.ai.flexinit.nl</strong></p>
<form id="deploy-form">
<div class="input-group">
<label for="stack-name">Stack Name</label>
<label for="stack-name" data-i18n="stackName">Stack Name</label>
<input
type="text"
id="stack-name"
name="name"
data-i18n-placeholder="placeholder"
placeholder="e.g., john-dev"
pattern="[a-z0-9-]{3,20}"
required
autocomplete="off"
>
<div class="input-hint" id="name-hint">
<div class="input-hint" id="name-hint" data-i18n="inputHint">
3-20 characters, lowercase letters, numbers, and hyphens only
</div>
<div class="validation-message" id="validation-message"></div>
</div>
<button type="submit" class="btn btn-primary" id="deploy-btn">
<span class="btn-text">Deploy My AI Stack</span>
<span class="btn-text" data-i18n="deployBtn">Deploy My AI Stack</span>
<svg class="btn-icon" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M10 4V16M4 10H16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
@@ -61,12 +58,12 @@
<!-- Deployment Progress State -->
<div id="progress-state" class="card" style="display: none;">
<div class="progress-header">
<h2>Deploying Your Stack</h2>
<h2 data-i18n="deploying">Deploying Your Stack</h2>
<div class="spinner"></div>
</div>
<div class="progress-info">
<p>Stack: <strong id="deploying-name"></strong></p>
<p><span data-i18n="stack">Stack</span>: <strong id="deploying-name"></strong></p>
<p>URL: <strong id="deploying-url"></strong></p>
</div>
@@ -80,7 +77,7 @@
<div class="progress-steps">
<div class="step" id="step-0">
<div class="step-icon"></div>
<div class="step-text" id="step-text-0">Initializing deployment...</div>
<div class="step-text" id="step-text-0" data-i18n="initializing">Initializing deployment...</div>
</div>
</div>
@@ -89,18 +86,13 @@
<!-- Success State -->
<div id="success-state" class="card success-card" style="display: none;">
<div class="success-icon">
<svg width="80" height="80" viewBox="0 0 80 80" fill="none">
<circle cx="40" cy="40" r="40" fill="#10b981"/>
<path d="M25 40L35 50L55 30" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<h2>Stack Deployed Successfully!</h2>
<p class="success-message">Your AI coding assistant is ready to use</p>
<div class="success-icon"></div>
<h2><span id="success-title"></span></h2>
<p class="success-message" data-i18n="successMessage">Your AI coding assistant is ready to use</p>
<div class="success-details">
<div class="detail-item">
<span class="detail-label">Stack Name:</span>
<span class="detail-label" data-i18n="stackNameLabel">Stack Name:</span>
<span class="detail-value" id="success-name"></span>
</div>
<div class="detail-item">
@@ -111,12 +103,12 @@
<div class="success-actions">
<a href="#" target="_blank" class="btn btn-primary" id="open-stack-btn">
Open My AI Stack
<span data-i18n="openStack">Open My AI Stack</span>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M10 4L16 10L10 16M16 10H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</a>
<button class="btn btn-secondary" id="deploy-another-btn">
<button class="btn btn-secondary" id="deploy-another-btn" data-i18n="deployAnother">
Deploy Another Stack
</button>
</div>
@@ -124,26 +116,21 @@
<!-- Error State -->
<div id="error-state" class="card error-card" style="display: none;">
<div class="error-icon">
<svg width="80" height="80" viewBox="0 0 80 80" fill="none">
<circle cx="40" cy="40" r="40" fill="#ef4444"/>
<path d="M30 30L50 50M50 30L30 50" stroke="white" stroke-width="4" stroke-linecap="round"/>
</svg>
</div>
<h2>Deployment Failed</h2>
<div class="error-icon"></div>
<h2><span id="error-title"></span></h2>
<p class="error-message" id="error-message"></p>
<button class="btn btn-secondary" id="try-again-btn">
<button class="btn btn-secondary" id="try-again-btn" data-i18n="tryAgain">
Try Again
</button>
</div>
</main>
<footer class="footer">
<p>Powered by <a href="https://dokploy.com" target="_blank">Dokploy</a>OpenCode AI Assistant</p>
<p><span data-i18n="poweredBy">Powered by</span> <a href="https://flexinit.nl" target="_blank">FLEXINIT</a>FlexAI Assistant</p>
</footer>
</div>
<script src="/static/app.js"></script>
<script src="/app.js"></script>
</body>
</html>