Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Software Engineer</title> | |
| <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <style> | |
| :root { | |
| --bg-primary: #0a0a0f; | |
| --bg-secondary: #12121a; | |
| --bg-tertiary: #1a1a25; | |
| --bg-hover: #222230; | |
| --accent-primary: #00d4aa; | |
| --accent-secondary: #7c3aed; | |
| --accent-gradient: linear-gradient(135deg, #00d4aa 0%, #7c3aed 100%); | |
| --text-primary: #f0f0f5; | |
| --text-secondary: #8888a0; | |
| --text-muted: #55556a; | |
| --border-color: #2a2a3a; | |
| --success: #00d4aa; | |
| --error: #ff4757; | |
| --warning: #ffa502; | |
| --code-bg: #0d0d14; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| min-height: 100vh; | |
| overflow-x: hidden; | |
| } | |
| /* Animated background */ | |
| body::before { | |
| content: ''; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: | |
| radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%), | |
| radial-gradient(ellipse at 80% 80%, rgba(0, 212, 170, 0.1) 0%, transparent 50%); | |
| pointer-events: none; | |
| z-index: 0; | |
| } | |
| .container { | |
| position: relative; | |
| z-index: 1; | |
| max-width: 1800px; | |
| margin: 0 auto; | |
| padding: 20px; | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| /* Header */ | |
| header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 20px 0; | |
| border-bottom: 1px solid var(--border-color); | |
| margin-bottom: 30px; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| } | |
| .logo-icon { | |
| width: 45px; | |
| height: 45px; | |
| background: var(--accent-gradient); | |
| border-radius: 12px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 22px; | |
| box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3); | |
| } | |
| .logo-text { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| background: var(--accent-gradient); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| } | |
| .logo-subtitle { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| letter-spacing: 1px; | |
| text-transform: uppercase; | |
| } | |
| .header-actions { | |
| display: flex; | |
| gap: 15px; | |
| align-items: center; | |
| } | |
| .built-with { | |
| font-size: 0.85rem; | |
| color: var(--text-secondary); | |
| text-decoration: none; | |
| padding: 8px 16px; | |
| background: var(--bg-secondary); | |
| border-radius: 8px; | |
| border: 1px solid var(--border-color); | |
| transition: all 0.3s ease; | |
| } | |
| .built-with:hover { | |
| border-color: var(--accent-primary); | |
| color: var(--accent-primary); | |
| } | |
| /* Main content layout */ | |
| .main-content { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 25px; | |
| flex: 1; | |
| min-height: 0; | |
| } | |
| @media (max-width: 1200px) { | |
| .main-content { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| /* Panel styling */ | |
| .panel { | |
| background: var(--bg-secondary); | |
| border-radius: 16px; | |
| border: 1px solid var(--border-color); | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .panel-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 16px 20px; | |
| border-bottom: 1px solid var(--border-color); | |
| background: var(--bg-tertiary); | |
| } | |
| .panel-title { | |
| font-size: 0.9rem; | |
| font-weight: 600; | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| } | |
| .panel-title-icon { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: var(--accent-primary); | |
| } | |
| .panel-actions { | |
| display: flex; | |
| gap: 8px; | |
| } | |
| .btn { | |
| padding: 8px 16px; | |
| border-radius: 8px; | |
| border: none; | |
| font-size: 0.85rem; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| } | |
| .btn-primary { | |
| background: var(--accent-gradient); | |
| color: white; | |
| box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3); | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4); | |
| } | |
| .btn-primary:disabled { | |
| opacity: 0.6; | |
| cursor: not-allowed; | |
| transform: none; | |
| } | |
| .btn-secondary { | |
| background: var(--bg-hover); | |
| color: var(--text-secondary); | |
| border: 1px solid var(--border-color); | |
| } | |
| .btn-secondary:hover { | |
| background: var(--border-color); | |
| color: var(--text-primary); | |
| } | |
| /* Input panel */ | |
| .input-panel { | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .prompt-area { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| padding: 20px; | |
| gap: 15px; | |
| } | |
| .prompt-input { | |
| flex: 1; | |
| min-height: 150px; | |
| background: var(--bg-primary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 12px; | |
| padding: 16px; | |
| color: var(--text-primary); | |
| font-family: 'Inter', sans-serif; | |
| font-size: 0.95rem; | |
| resize: none; | |
| transition: all 0.3s ease; | |
| } | |
| .prompt-input:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1); | |
| } | |
| .prompt-input::placeholder { | |
| color: var(--text-muted); | |
| } | |
| .examples-section { | |
| margin-top: 10px; | |
| } | |
| .examples-label { | |
| font-size: 0.8rem; | |
| color: var(--text-muted); | |
| margin-bottom: 10px; | |
| text-transform: uppercase; | |
| letter-spacing: 1px; | |
| } | |
| .examples-grid { | |
| display: grid; | |
| grid-template-columns: repeat(2, 1fr); | |
| gap: 8px; | |
| } | |
| .example-btn { | |
| padding: 10px 12px; | |
| background: var(--bg-primary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 8px; | |
| color: var(--text-secondary); | |
| font-size: 0.8rem; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| text-align: left; | |
| } | |
| .example-btn:hover { | |
| border-color: var(--accent-primary); | |
| color: var(--accent-primary); | |
| background: rgba(0, 212, 170, 0.05); | |
| } | |
| /* Code panel */ | |
| .code-panel { | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .code-editor { | |
| flex: 1; | |
| background: var(--code-bg); | |
| padding: 20px; | |
| font-family: 'JetBrains Mono', monospace; | |
| font-size: 0.85rem; | |
| line-height: 1.7; | |
| overflow: auto; | |
| color: var(--text-secondary); | |
| white-space: pre-wrap; | |
| word-break: break-word; | |
| } | |
| .code-line { | |
| display: flex; | |
| } | |
| .line-number { | |
| color: var(--text-muted); | |
| min-width: 40px; | |
| user-select: none; | |
| text-align: right; | |
| padding-right: 15px; | |
| } | |
| .code-content { | |
| flex: 1; | |
| } | |
| /* Syntax highlighting classes */ | |
| .keyword { color: #c678dd; } | |
| .string { color: #98c379; } | |
| .function { color: #61afef; } | |
| .comment { color: #5c6370; font-style: italic; } | |
| .tag { color: #e06c75; } | |
| .attr { color: #d19a66; } | |
| .property { color: #e06c75; } | |
| .value { color: #98c379; } | |
| .selector { color: #e06c75; } | |
| /* Preview panel */ | |
| .preview-panel { | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .preview-frame { | |
| flex: 1; | |
| background: white; | |
| border: none; | |
| } | |
| /* Terminal/Console output */ | |
| .terminal-output { | |
| background: var(--bg-primary); | |
| border-radius: 12px; | |
| padding: 15px; | |
| margin-top: 15px; | |
| font-family: 'JetBrains Mono', monospace; | |
| font-size: 0.8rem; | |
| max-height: 200px; | |
| overflow-y: auto; | |
| } | |
| .terminal-line { | |
| display: flex; | |
| align-items: flex-start; | |
| gap: 10px; | |
| margin-bottom: 6px; | |
| animation: fadeIn 0.3s ease; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(5px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .terminal-icon { | |
| width: 16px; | |
| height: 16px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| flex-shrink: 0; | |
| } | |
| .terminal-text { | |
| color: var(--text-secondary); | |
| line-height: 1.5; | |
| } | |
| .terminal-success { color: var(--success); } | |
| .terminal-error { color: var(--error); } | |
| .terminal-info { color: #61afef; } | |
| /* Progress bar */ | |
| .progress-container { | |
| margin-top: 15px; | |
| display: none; | |
| } | |
| .progress-container.active { | |
| display: block; | |
| } | |
| .progress-bar { | |
| height: 4px; | |
| background: var(--bg-hover); | |
| border-radius: 2px; | |
| overflow: hidden; | |
| } | |
| .progress-fill { | |
| height: 100%; | |
| background: var(--accent-gradient); | |
| width: 0%; | |
| transition: width 0.3s ease; | |
| animation: progressPulse 1.5s ease-in-out infinite; | |
| } | |
| @keyframes progressPulse { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.7; } | |
| } | |
| .progress-text { | |
| font-size: 0.75rem; | |
| color: var(--text-muted); | |
| margin-top: 8px; | |
| text-align: center; | |
| } | |
| /* Status indicator */ | |
| .status-indicator { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| font-size: 0.85rem; | |
| color: var(--text-secondary); | |
| } | |
| .status-dot { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: var(--success); | |
| animation: pulse 2s ease-in-out infinite; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.4); } | |
| 50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(0, 212, 170, 0); } | |
| } | |
| .status-dot.idle { | |
| background: var(--text-muted); | |
| animation: none; | |
| } | |
| /* Scrollbar styling */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: var(--bg-primary); | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: var(--border-color); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: var(--text-muted); | |
| } | |
| /* Responsive adjustments */ | |
| @media (max-width: 768px) { | |
| .container { | |
| padding: 10px; | |
| } | |
| header { | |
| flex-direction: column; | |
| gap: 15px; | |
| text-align: center; | |
| } | |
| .examples-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| .panel-header { | |
| flex-direction: column; | |
| gap: 10px; | |
| } | |
| .logo { | |
| flex-direction: column; | |
| } | |
| } | |
| /* Loading animation */ | |
| .generating-cursor::after { | |
| content: '|'; | |
| animation: blink 0.7s step-end infinite; | |
| } | |
| @keyframes blink { | |
| 50% { opacity: 0; } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <header> | |
| <div class="logo"> | |
| <div class="logo-icon">🤖</div> | |
| <div> | |
| <div class="logo-text">AI Software Engineer</div> | |
| <div class="logo-subtitle">Build anything instantly</div> | |
| </div> | |
| </div> | |
| <div class="header-actions"> | |
| <div class="status-indicator"> | |
| <div class="status-dot" id="statusDot"></div> | |
| <span id="statusText">Ready</span> | |
| </div> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">Built with anycoder</a> | |
| </div> | |
| </header> | |
| <div class="main-content"> | |
| <!-- Input Panel --> | |
| <div class="panel input-panel"> | |
| <div class="panel-header"> | |
| <div class="panel-title"> | |
| <div class="panel-title-icon"></div> | |
| Describe Your Software | |
| </div> | |
| </div> | |
| <div class="prompt-area"> | |
| <textarea class="prompt-input" id="promptInput" placeholder="Describe the software you want to build... | |
| Example: Create a todo list app with drag and drop, dark mode, and local storage"></textarea> | |
| <button class="btn btn-primary" id="generateBtn"> | |
| <span>✨</span> | |
| <span>Generate Software</span> | |
| </button> | |
| <div class="progress-container" id="progressContainer"> | |
| <div class="progress-bar"> | |
| <div class="progress-fill" id="progressFill"></div> | |
| </div> | |
| <div class="progress-text" id="progressText">Analyzing requirements...</div> | |
| </div> | |
| <div class="terminal-output" id="terminalOutput"></div> | |
| <div class="examples-section"> | |
| <div class="examples-label">Try these examples</div> | |
| <div class="examples-grid"> | |
| <button class="example-btn" data-prompt="Create a calculator with basic operations, history, and keyboard support">🧮 Calculator App</button> | |
| <button class="example-btn" data-prompt="Build a weather dashboard showing current conditions and 5-day forecast">🌤️ Weather Dashboard</button> | |
| <button class="example-btn" data-prompt="Make a countdown timer with customizable intervals and notifications">⏱️ Countdown Timer</button> | |
| <button class="example-btn" data-prompt="Create a markdown editor with live preview and export">📝 Markdown Editor</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Code Panel --> | |
| <div class="panel code-panel"> | |
| <div class="panel-header"> | |
| <div class="panel-title"> | |
| <div class="panel-title-icon" style="background: #7c3aed;"></div> | |
| Generated Code | |
| </div> | |
| <div class="panel-actions"> | |
| <button class="btn btn-secondary" id="copyBtn">📋 Copy</button> | |
| <button class="btn btn-secondary" id="downloadBtn">💾 Download</button> | |
| </div> | |
| </div> | |
| <div class="code-editor" id="codeEditor"> | |
| <div class="code-line"><span class="line-number">1</span><span class="code-content"><span class="comment">// Your generated code will appear here...</span></span></div> | |
| </div> | |
| </div> | |
| <!-- Preview Panel --> | |
| <div class="panel preview-panel"> | |
| <div class="panel-header"> | |
| <div class="panel-title"> | |
| <div class="panel-title-icon" style="background: #ffa502;"></div> | |
| Live Preview | |
| </div> | |
| <div class="panel-actions"> | |
| <button class="btn btn-secondary" id="refreshBtn">🔄 Refresh</button> | |
| <button class="btn btn-secondary" id="openFullBtn">↗️ Full Screen</button> | |
| </div> | |
| </div> | |
| <iframe class="preview-frame" id="previewFrame" sandbox="allow-scripts allow-modals"></iframe> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |