From 10485c230a98bb4fe0e97f5a11331be4693e8413 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Mon, 10 Nov 2025 04:47:49 +0000 Subject: [PATCH] Create Staff internal docs & API keys page cgen-0b6b7a894685433a863ece4f87f932d6 --- client/pages/staff/StaffDocs.tsx | 155 +++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 client/pages/staff/StaffDocs.tsx diff --git a/client/pages/staff/StaffDocs.tsx b/client/pages/staff/StaffDocs.tsx new file mode 100644 index 00000000..1f2af5fb --- /dev/null +++ b/client/pages/staff/StaffDocs.tsx @@ -0,0 +1,155 @@ +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} + +
+
+
+
+ + + +
+ ); + })} +
+
+ + {/* API Keys */} +
+
+

API Keys

+ + Keep secure + +
+ + +
+ {apiKeys.map((key, idx) => ( +
+
+

{key.name}

+

{key.key}

+
+
+ + {key.status} + + +
+
+ ))} +
+ +
+
+
+ + {/* 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

+
+
+
+
+
+ ); +}