diff --git a/app/console/secrets/page.tsx b/app/console/secrets/page.tsx new file mode 100644 index 0000000..1bd662e --- /dev/null +++ b/app/console/secrets/page.tsx @@ -0,0 +1,135 @@ +"use client"; + +import { useState } from "react"; +import { Key, ShieldCheck, Eye, EyeOff, Save, Check, RefreshCw, AlertCircle } from "lucide-react"; + +export default function SecretsPage() { + // Visibility States for sensitive keys (Fixes #50) + const [showGroq, setShowGroq] = useState(false); + const [showEncryption, setShowEncryption] = useState(false); + + // Input Value States + const [groqKey, setGroqKey] = useState("gsk_yA7b9xWp2RnM4kLq9vJc23H8zF4s1t6N"); + const [encryptionKey, setEncryptionKey] = useState("enc_sec_99f2e301ab8c7d5d6e2f4a5b6c7d8e9f"); + + // Status indicators + const [saving, setSaving] = useState(false); + const [saveSuccess, setSaveSuccess] = useState(false); + + const handleSaveSecrets = (e: React.FormEvent) => { + e.preventDefault(); + setSaving(true); + + // Simulate API storage communication delay + setTimeout(() => { + setSaving(false); + setSaveSuccess(true); + setTimeout(() => setSaveSuccess(false), 2000); + }, 1200); + }; + + return ( +
+
+

+ Secrets & Environment Keys +

+

+ Configure runtime API tokens and cryptographic variables securely for your workspace deployments. +

+
+ +
+ +
+

Security Isolation Notice:

+

Values are encrypted at rest using AES-256 GCM before infrastructure synchronization. Tokens are injected as read-only variables inside running sandboxes.

+
+
+ +
+
+ + {/* GROQ API KEY CONFIGURATION FIELD */} +
+ +
+ setGroqKey(e.target.value)} + placeholder="gsk_..." + className="w-full font-mono rounded-lg border border-gray-200 bg-gray-50 px-3 py-2.5 pr-10 text-sm text-gray-900 transition-colors focus:border-indigo-500 focus:outline-none dark:border-zinc-700 dark:bg-zinc-800 dark:text-white dark:focus:border-indigo-400" + /> + +
+

+ Required for routing low-latency inference queries to Llama models. +

+
+ +
+ + {/* SYSTEM ENCRYPTION SECRET FIELD */} +
+ +
+ setEncryptionKey(e.target.value)} + placeholder="enc_sec_..." + className="w-full font-mono rounded-lg border border-gray-200 bg-gray-50 px-3 py-2.5 pr-10 text-sm text-gray-900 transition-colors focus:border-indigo-500 focus:outline-none dark:border-zinc-700 dark:bg-zinc-800 dark:text-white dark:focus:border-indigo-400" + /> + +
+

+ Salt token string used for standard cryptographic hashes. Do not change this lightly. +

+
+ +
+ + {/* SUBMISSION FOOTER BUTTON GROUP */} +
+ +
+ +
+ ); +} \ No newline at end of file