import { useEffect } from "react"; import Layout from "@/components/Layout"; import { useAuth } from "@/contexts/AuthContext"; import { useNavigate } from "react-router-dom"; import { Card, CardContent, CardHeader, CardTitle, CardDescription, } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { FileText, Key, Database, Code2, ExternalLink } from "lucide-react"; export default function StaffDocs() { const { user, loading } = useAuth(); const navigate = useNavigate(); useEffect(() => { if (!loading && !user) { navigate("/staff/login"); } }, [user, loading, navigate]); if (loading) return ( Loading... ); const docs = [ { icon: FileText, title: "Getting Started", description: "Onboarding guide and platform overview", link: "#", }, { icon: Code2, title: "API Reference", description: "Complete API documentation and endpoints", link: "#", }, { icon: Database, title: "Database Schema", description: "Database structure and relationships", link: "#", }, { icon: Key, title: "Authentication", description: "OAuth, tokens, and security guidelines", link: "#", }, ]; const apiKeys = [ { name: "Public API Key", key: "pk_aethex_...", status: "active" }, { name: "Secret API Key", key: "sk_aethex_...", status: "active" }, { name: "Webhook Secret", key: "whk_aethex_...", status: "active" }, ]; return ( Documentation & API Internal docs, API keys, and credentials {/* Documentation */} Documentation {docs.map((doc, idx) => { const IconComponent = doc.icon; return ( {doc.title} {doc.description} Read Docs ); })} {/* API Keys */} API Keys Keep secure {apiKeys.map((key, idx) => ( {key.name} {key.key} {key.status} Copy ))} Generate New Key {/* Security Notice */} 🔐 Security Notice • Never share API keys in public channels or repositories • Rotate keys regularly for security • Use secrets management for production deployments • Report compromised keys immediately ); }
Internal docs, API keys, and credentials
{key.name}
{key.key}
• Never share API keys in public channels or repositories
• Rotate keys regularly for security
• Use secrets management for production deployments
• Report compromised keys immediately