'use client'; import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; import { Key, Save, CheckCircle2, AlertCircle, Eye, EyeOff, Sparkles, ExternalLink, Shield, } from 'lucide-react'; export default function SettingsPage() { const [apiKey, setApiKey] = useState(''); const [showKey, setShowKey] = useState(false); const [saved, setSaved] = useState(false); const [error, setError] = useState(''); useEffect(() => { // Load from localStorage const stored = localStorage.getItem('gemini-api-key'); if (stored) setApiKey(stored); }, []); const handleSave = async () => { if (!apiKey.trim()) { setError('Please enter an API key'); return; } // Save to localStorage for client reference localStorage.setItem('gemini-api-key', apiKey.trim()); // Note: For server-side usage, the key should be in .env.local setSaved(true); setError(''); setTimeout(() => setSaved(false), 3000); }; return (

Settings

Configure your API key to enable AI-powered interviews

Google Gemini API Key

{/* Instructions */}

Setup Instructions:

  1. 1. Visit{' '} Google AI Studio {' '}to get your API key
  2. 2. Create a .env.local file in your project root
  3. 3. Add: GEMINI_API_KEY=your_api_key_here
  4. 4. Restart the development server
{/* API Key Input (for reference/testing) */}
setApiKey(e.target.value)} placeholder="Enter your Gemini API key..." className="w-full px-4 py-3 pr-20 rounded-xl text-sm focus:outline-none transition-all duration-300" style={{ background: 'var(--background)', border: '1px solid var(--border)', color: 'var(--foreground)', }} onFocus={(e) => { e.currentTarget.style.borderColor = 'var(--primary)'; }} onBlur={(e) => { e.currentTarget.style.borderColor = 'var(--border)'; }} />
{/* Security note */}

For production use, always store API keys in environment variables (.env.local). The browser-stored key is for reference only and is not used by the server-side API routes.

{/* Save Button */} {error && (
{error}
)}
{/* Additional Info */}

About the Platform

AI Model:{' '} Google Gemini 2.0 Flash — fast, capable, and cost-effective

Features:{' '} Dynamic question generation, real-time evaluation, voice input, comprehensive analytics

Privacy:{' '} All data is processed in real-time. No interview data is stored on any server.

Tech Stack:{' '} Next.js 16, React 19, Tailwind CSS v4, Framer Motion, Lucide Icons

); }