File size: 20,585 Bytes
3987357 30202eb 3c47114 30202eb 341b4d3 30202eb 1d28d8c 30202eb 1d28d8c 30202eb 1d28d8c 3c47114 1d28d8c 341b4d3 3c47114 1d28d8c 3c47114 341b4d3 1d28d8c 3c47114 1d28d8c b62f639 1d28d8c b62f639 1d28d8c b62f639 1d28d8c b62f639 1d28d8c b62f639 f05896b b62f639 1d28d8c b62f639 1d28d8c b62f639 1d28d8c 3c47114 1d28d8c 30202eb 341b4d3 30202eb f05896b b62f639 f05896b b62f639 f05896b b62f639 f05896b b62f639 f05896b b62f639 3c47114 30202eb 2acdf75 30202eb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Coder - NeuralOutlaw</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Orbitron:wght@400;500;700;900&display=swap');
body {
font-family: 'JetBrains Mono', monospace;
overflow-x: hidden;
}
.cyber-gradient {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.matrix-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.1;
}
.glitch-text {
position: relative;
display: inline-block;
}
.glitch-text::before,
.glitch-text::after {
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.glitch-text::before {
left: 2px;
text-shadow: -1px 0 #ff00ff;
animation: glitch-1 2s infinite linear alternate-reverse;
}
.glitch-text::after {
left: -2px;
text-shadow: 1px 0 #00ffff;
animation: glitch-2 3s infinite linear alternate-reverse;
}
@keyframes glitch-1 {
0% { clip-path: inset(20% 0 65% 0); }
20% { clip-path: inset(60% 0 5% 0); }
40% { clip-path: inset(30% 0 45% 0); }
60% { clip-path: inset(75% 0 15% 0); }
80% { clip-path: inset(10% 0 70% 0); }
100% { clip-path: inset(45% 0 35% 0); }
}
@keyframes glitch-2 {
0% { clip-path: inset(65% 0 20% 0); }
20% { clip-path: inset(5% 0 60% 0); }
40% { clip-path: inset(45% 0 30% 0); }
60% { clip-path: inset(15% 0 75% 0); }
80% { clip-path: inset(70% 0 10% 0); }
100% { clip-path: inset(35% 0 45% 0); }
}
.terminal-window {
background: rgba(0, 0, 0, 0.8);
border: 1px solid #00ffff;
box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
border-radius: 8px;
overflow: hidden;
}
.terminal-header {
background: rgba(0, 0, 0, 0.9);
padding: 8px 15px;
border-bottom: 1px solid #00ffff;
}
.terminal-body {
padding: 20px;
color: #00ff00;
font-family: 'JetBrains Mono', monospace;
max-height: 400px;
overflow-y: auto;
}
.terminal-prompt {
color: #00ffff;
}
.cyber-button {
background: linear-gradient(45deg, #ff00ff, #00ffff);
border: none;
color: black;
font-weight: bold;
padding: 12px 24px;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.cyber-button:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(255, 0, 255, 0.4);
}
.cyber-button:active {
transform: translateY(0);
}
.code-output {
white-space: pre-wrap;
font-family: 'JetBrains Mono', monospace;
background: rgba(0, 0, 0, 0.7);
padding: 15px;
border-radius: 4px;
border-left: 3px solid #ff00ff;
min-height: 200px;
}
.code-input {
background: rgba(0, 0, 0, 0.7);
border: 1px solid #00ffff;
color: #00ff00;
padding: 15px;
border-radius: 4px;
font-family: 'JetBrains Mono', monospace;
width: 100%;
resize: vertical;
min-height: 150px;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
background: #00ffff;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #ff00ff;
}
</style>
</head>
<body class="bg-black text-white">
<!-- Matrix background animation -->
<canvas id="matrix" class="matrix-bg"></canvas>
<!-- Vanta.js Globe Background -->
<div id="vanta-bg"></div>
<!-- Navigation -->
<nav class="fixed w-full z-50 bg-black bg-opacity-80 backdrop-blur-md border-b border-cyan-500">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center">
<h1 class="text-xl font-bold cyber-gradient bg-clip-text text-transparent glitch-text" data-text="NeuralOutlaw">NeuralOutlaw</h1>
</div>
<div class="flex space-x-6">
<a href="index.html" class="text-cyan-300 hover:text-pink-500 transition-colors">Home</a>
<a href="coder.html" class="text-cyan-300 hover:text-pink-500 transition-colors">AI Coder</a>
<a href="api-config.html" class="text-cyan-300 hover:text-pink-500 transition-colors">API Config</a>
<a href="requests.html" class="text-cyan-300 hover:text-pink-500 transition-colors">Shadow Requests</a>
<a href="about.html" class="text-cyan-300 hover:text-pink-500 transition-colors">About</a>
</div>
</div>
</nav>
<!-- Main Content -->
<section class="min-h-screen flex items-center justify-center pt-16 pb-20 px-4">
<div class="container mx-auto max-w-4xl">
<h1 class="text-4xl md:text-5xl font-bold text-center mb-8 glitch-text" data-text="AI CODER">AI CODER</h1>
<p class="text-lg text-cyan-300 text-center mb-12">Generate unrestricted code without templates or limitations</p>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- Input Section -->
<div class="terminal-window">
<div class="terminal-header flex items-center">
<div class="flex space-x-2">
<div class="w-3 h-3 rounded-full bg-red-500"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
<div class="w-3 h-3 rounded-full bg-green-500"></div>
</div>
<div class="flex-1 text-center text-sm">code_input_terminal</div>
</div>
<div class="terminal-body">
<div class="mb-4">
<label for="codePrompt" class="block text-cyan-300 mb-2">Enter your coding request:</label>
<textarea
id="codePrompt"
class="code-input w-full"
placeholder="Describe what you want to code... (e.g., Create a Python script that scrapes data from a website)"
rows="6"
></textarea>
</div>
<div class="mb-4">
<label for="language" class="block text-cyan-300 mb-2">Programming Language:</label>
<select id="language" class="code-input w-full">
<option value="python">Python</option>
<option value="javascript">JavaScript</option>
<option value="html">HTML</option>
<option value="css">CSS</option>
<option value="java">Java</option>
<option value="cpp">C++</option>
<option value="rust">Rust</option>
<option value="go">Go</option>
</select>
</div>
<button id="generateBtn" class="cyber-button w-full">Generate Code</button>
</div>
</div>
<!-- Output Section -->
<div class="terminal-window">
<div class="terminal-header flex items-center">
<div class="flex space-x-2">
<div class="w-3 h-3 rounded-full bg-red-500"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
<div class="w-3 h-3 rounded-full bg-green-500"></div>
</div>
<div class="flex-1 text-center text-sm">code_output_terminal</div>
</div>
<div class="terminal-body">
<div id="output" class="code-output">
<span class="terminal-prompt">AI@neuraloutlaw:~$</span> Awaiting your command...
</div>
<div class="mt-4 flex gap-2">
<button id="copyBtn" class="cyber-button flex-1 opacity-50 cursor-not-allowed" disabled>Copy Code</button>
<button id="downloadBtn" class="cyber-button flex-1 opacity-50 cursor-not-allowed" disabled>Download</button>
</div>
</div>
</div>
</div>
<!-- Loading Animation -->
<div id="loading" class="hidden text-center mt-8">
<div class="inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-cyan-500"></div>
<p class="text-cyan-300 mt-2">Generating unrestricted code...</p>
</div>
</div>
</section>
<!-- Footer -->
<footer class="py-8 px-4 border-t border-cyan-900 bg-black bg-opacity-80">
<div class="container mx-auto text-center">
<p class="text-gray-400">NeuralOutlaw Coder AI 🦹 - Pushing the boundaries of AI-assisted development</p>
<p class="text-gray-500 text-sm mt-2">Use responsibly. The creators are not responsible for any unauthorized usage.</p>
</div>
</footer>
<script>
// Initialize Vanta.js globe
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x00ffff,
backgroundColor: 0x0,
size: 0.8
});
// Matrix background animation
const canvas = document.getElementById('matrix');
const ctx = canvas.getContext('2d');
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
resizeCanvas();
window.addEventListener('resize', resizeCanvas);
const chars = "01";
const charArray = chars.split("");
const fontSize = 14;
const columns = canvas.width / fontSize;
const drops = [];
for(let x = 0; x < columns; x++) {
drops[x] = 1;
}
function drawMatrix() {
ctx.fillStyle = "rgba(0, 0, 0, 0.04)";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "#0f0";
ctx.font = fontSize + "px monospace";
for(let i = 0; i < drops.length; i++) {
const text = charArray[Math.floor(Math.random() * charArray.length)];
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
if(drops[i] * fontSize > canvas.height && Math.random() > 0.975) {
drops[i] = 0;
}
drops[i]++;
}
}
setInterval(drawMatrix, 35);
// Real API Integration with Grok
document.getElementById('generateBtn').addEventListener('click', async function() {
const prompt = document.getElementById('codePrompt').value.trim();
const language = document.getElementById('language').value;
const output = document.getElementById('output');
const loading = document.getElementById('loading');
const copyBtn = document.getElementById('copyBtn');
const downloadBtn = document.getElementById('downloadBtn');
if (!prompt) {
output.innerHTML = `<span class="terminal-prompt">AI@neuraloutlaw:~$</span> <span class="text-red-400">Error: Please enter a coding request</span>`;
return;
}
// Show loading
loading.classList.remove('hidden');
output.innerHTML = `<span class="terminal-prompt">AI@neuraloutlaw:~$</span> Connecting to Grok API...`;
try {
// Get saved API configuration for Grok
const savedConfig = localStorage.getItem('neuraloutlaw_api_config');
let grokApiKey = '';
let grokApiUrl = 'https://api.x.ai/v1/chat/completions';
if (savedConfig) {
const config = JSON.parse(savedConfig);
grokApiKey = config.grokApiKey || '';
if (config.grokApiUrl) {
grokApiUrl = config.grokApiUrl;
}
}
if (!grokApiKey) {
throw new Error('No Grok API key configured. Please configure your Grok API key in the API Config page.');
}
// Using Grok API for code generation
const response = await fetch(grokApiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${grokApiKey}`
},
body: JSON.stringify({
model: 'grok-beta',
messages: [
{
role: 'system',
content: `You are an expert programmer. Generate clean, working ${language} code based on the user's request. Include proper comments and error handling. Be creative and think outside the box.`
},
{
role: 'user',
content: `Write ${language} code for: ${prompt}. Make sure the code is complete, functional, well-commented, and includes proper error handling.`
}
],
max_tokens: 2000,
temperature: 0.7
})
});
if (!response.ok) {
const errorData = await response.json();
throw new Error(`Grok API Error: ${response.status} - ${errorData.error?.message || 'Unknown error'}`);
}
const data = await response.json();
const generatedCode = data.choices[0].message.content;
output.innerHTML = `<span class="terminal-prompt">AI@neuraloutlaw:~$</span> <span class="text-green-400">Code generation complete using Grok!</span>\n\n<pre class="mt-4">${generatedCode}</pre>`;
// Enable buttons
copyBtn.disabled = false;
copyBtn.classList.remove('opacity-50', 'cursor-not-allowed');
downloadBtn.disabled = false;
downloadBtn.classList.remove('opacity-50', 'cursor-not-allowed');
// Store generated code for download/copy
window.generatedCode = generatedCode;
} catch (error) {
console.error('Grok API Error:', error);
// Fallback to mock data if API fails
const timestamp = new Date().toLocaleTimeString();
const fallbackCode = `// Generated by NeuralOutlaw AI with Grok - ${timestamp}
// ${prompt}
// Note: Using fallback generator - ${error.message}
/**
* ${prompt}
*
* This is a template for your ${language} code.
* Replace the comments with your actual implementation.
*/
// TODO: Implement your logic here
console.log("Implementing: ${prompt}");
function main() {
// Add your main logic
console.log("Starting execution...");
try {
// Core functionality
const result = processRequest();
console.log("Result:", result);
} catch (error) {
console.error("Error:", error);
}
}
function processRequest() {
// Process the main request
return {
message: "Implement your logic here",
timestamp: "${new Date().toISOString()}",
language: "${language}",
request: "${prompt}"
};
}
// Start execution
main();`;
output.innerHTML = `<span class="terminal-prompt">AI@neuraloutlaw:~$</span> <span class="text-yellow-400">${error.message}</span>\n\n<pre class="mt-4">${fallbackCode}</pre>`;
// Enable buttons for fallback
copyBtn.disabled = false;
copyBtn.classList.remove('opacity-50', 'cursor-not-allowed');
downloadBtn.disabled = false;
downloadBtn.classList.remove('opacity-50', 'cursor-not-allowed');
window.generatedCode = fallbackCode;
} finally {
loading.classList.add('hidden');
}
});
// Copy code functionality
document.getElementById('copyBtn').addEventListener('click', function() {
if (window.generatedCode) {
navigator.clipboard.writeText(window.generatedCode).then(() => {
const output = document.getElementById('output');
const originalContent = output.innerHTML;
output.innerHTML = `<span class="terminal-prompt">AI@neuraloutlaw:~$</span> <span class="text-green-400">Code copied to clipboard!</span>`;
setTimeout(() => {
output.innerHTML = originalContent;
}, 2000);
});
}
});
// Download code functionality
document.getElementById('downloadBtn').addEventListener('click', function() {
if (window.generatedCode) {
const language = document.getElementById('language').value;
const extension = {
'python': 'py',
'javascript': 'js',
'html': 'html',
'css': 'css',
'java': 'java',
'cpp': 'cpp',
'rust': 'rs',
'go': 'go'
}[language] || 'txt';
const blob = new Blob([window.generatedCode], { type: 'text/plain' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `neuraloutlaw_code.${extension}`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
}
});
// Initialize Feather Icons
feather.replace();
</script>
</body>
</html>
|