From 0398f62df6986b67f9098a0b2cc43a1f72a1cc10 Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Sun, 21 Dec 2025 02:37:14 +0000 Subject: [PATCH] Add a network directory for viewing architects and their profiles Introduce new routes and API endpoints for a public network directory, allowing users to view architect profiles and associated data. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 279f1558-c0e3-40e4-8217-be7e9f4c6eca Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 947fb3f7-a8df-488c-a0dd-73d268844a6f Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/b984cb14-1d19-4944-922b-bc79e821ed35/279f1558-c0e3-40e4-8217-be7e9f4c6eca/qyCtfDO Replit-Helium-Checkpoint-Created: true --- client/src/App.tsx | 4 + client/src/pages/home.tsx | 8 +- client/src/pages/network-profile.tsx | 219 ++++++++++++++++++ client/src/pages/network.tsx | 323 +++++++++++++++++++++++++++ server/routes.ts | 81 +++++++ 5 files changed, 631 insertions(+), 4 deletions(-) create mode 100644 client/src/pages/network-profile.tsx create mode 100644 client/src/pages/network.tsx diff --git a/client/src/App.tsx b/client/src/App.tsx index e18d98f..93f6ed4 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -25,6 +25,8 @@ import AdminApplications from "@/pages/admin-applications"; import AdminActivity from "@/pages/admin-activity"; import AdminNotifications from "@/pages/admin-notifications"; import AeThexOS from "@/pages/os"; +import Network from "@/pages/network"; +import NetworkProfile from "@/pages/network-profile"; import { Chatbot } from "@/components/Chatbot"; function Router() { @@ -49,6 +51,8 @@ function Router() { {() => } + + ); diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index e3d8498..7c6c5f4 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -95,11 +95,11 @@ export default function Home() { Learn More - - - + diff --git a/client/src/pages/network-profile.tsx b/client/src/pages/network-profile.tsx new file mode 100644 index 0000000..cd60555 --- /dev/null +++ b/client/src/pages/network-profile.tsx @@ -0,0 +1,219 @@ +import { motion } from "framer-motion"; +import { Link, useParams } from "wouter"; +import { useQuery } from "@tanstack/react-query"; +import { + ArrowLeft, Shield, Zap, ExternalLink, Github, Twitter, + Globe, Award, Code, User, Loader2, AlertCircle +} from "lucide-react"; + +interface ArchitectProfile { + id: string; + name: string; + role: string; + bio: string | null; + level: number; + xp: number; + passportId: string | null; + skills: string[] | null; + isVerified: boolean; + avatarUrl: string | null; + github: string | null; + twitter: string | null; + website: string | null; +} + +export default function NetworkProfile() { + const params = useParams<{ slug: string }>(); + const slug = params.slug; + + const { data: profile, isLoading, error } = useQuery({ + queryKey: ['architect', slug], + queryFn: async () => { + const res = await fetch(`/api/directory/architects/${slug}`); + if (!res.ok) { + throw new Error('Architect not found'); + } + return res.json(); + }, + enabled: !!slug, + }); + + if (isLoading) { + return ( +
+ +
+ ); + } + + if (error || !profile) { + return ( +
+ +

Architect Not Found

+

The requested profile does not exist in our directory.

+ + + +
+ ); + } + + return ( +
+
+
+
+ + + +
+ +
+
+ {profile.avatarUrl ? ( + {profile.name} + ) : ( + + )} +
+ +
+

+ {profile.name} + {profile.isVerified && ( + + )} +

+

+ {profile.role} +

+
+ + {profile.passportId && ( +
+ Passport ID +

{profile.passportId}

+
+ )} +
+ +
+
+
+ + Level +
+

{profile.level || 1}

+
+
+
+ + XP +
+

{profile.xp?.toLocaleString() || 0}

+
+
+ + {profile.bio && ( +
+

Bio

+

{profile.bio}

+
+ )} + + {profile.skills && profile.skills.length > 0 && ( +
+

+ + Skills +

+
+ {profile.skills.map((skill) => ( + + {skill} + + ))} +
+
+ )} + + {(profile.github || profile.twitter || profile.website) && ( +
+ {profile.github && ( + + + GitHub + + )} + {profile.twitter && ( + + + Twitter + + )} + {profile.website && ( + + + Website + + )} +
+ )} +
+
+ +
+
+ AeThex Network // Architect Profile +
+
+
+ ); +} diff --git a/client/src/pages/network.tsx b/client/src/pages/network.tsx new file mode 100644 index 0000000..2db3535 --- /dev/null +++ b/client/src/pages/network.tsx @@ -0,0 +1,323 @@ +import { motion } from "framer-motion"; +import { Link } from "wouter"; +import { useQuery } from "@tanstack/react-query"; +import { + Terminal, Users, Cpu, Globe, ExternalLink, Shield, + ArrowLeft, Zap, Lock, Code, Sparkles +} from "lucide-react"; + +interface ApiArchitect { + id: string; + name: string; + role: string; + bio: string | null; + level: number; + xp: number; + passportId: string | null; + skills: string[] | null; +} + +interface DisplayArchitect { + id: string; + index: number; + name: string; + role: string; + slug?: string; + isReserved?: boolean; + isLive?: boolean; +} + +interface Protocol { + id: string; + name: string; + description: string; + link?: string; +} + +interface Domain { + name: string; + purpose: string; +} + +const NUM_RESERVED_SLOTS = 10; + +const PROTOCOLS: Protocol[] = [ + { + id: "aegis", + name: "AEGIS", + description: "Identity & Security Layer", + link: "https://github.com" + }, + { + id: "warden", + name: "WARDEN", + description: "Browser Security Extension", + link: "https://chrome.google.com/webstore" + }, + { + id: "lonestar", + name: "LONE STAR", + description: "Simulation Engine", + link: "https://roblox.com" + }, +]; + +const DOMAINS: Domain[] = [ + { name: ".foundation", purpose: "Governance & Policy" }, + { name: ".studio", purpose: "Labs & Education" }, + { name: ".dev", purpose: "Developer Tools" }, + { name: ".network", purpose: "Public Directory" }, +]; + +export default function Network() { + const { data: metrics } = useQuery({ + queryKey: ["metrics"], + queryFn: async () => { + const res = await fetch("/api/metrics"); + return res.json(); + }, + }); + + const { data: liveArchitects = [] } = useQuery({ + queryKey: ["directory-architects"], + queryFn: async () => { + const res = await fetch("/api/directory/architects"); + if (!res.ok) return []; + return res.json(); + }, + }); + + // Combine live architects with reserved slots + const displayArchitects: DisplayArchitect[] = [ + ...liveArchitects.map((a, index) => ({ + id: String(index + 1).padStart(3, "0"), + index: index + 1, + name: a.name, + role: a.role || "Architect", + slug: a.passportId || a.name.toLowerCase().replace(/\s+/g, '-'), + isLive: true, + })), + ...Array.from({ length: Math.max(0, NUM_RESERVED_SLOTS - liveArchitects.length) }, (_, i) => ({ + id: String(liveArchitects.length + i + 1).padStart(3, "0"), + index: liveArchitects.length + i + 1, + name: "[RESERVED FOR FOUNDRY]", + role: "Available Slot", + isReserved: true, + })), + ]; + + const activeNodes = liveArchitects.length; + + return ( +
+
+
+
+ + + +
+
+ +
+ +

+ The Network +

+
+

+ A directory of verified entities in the AeThex ecosystem. +

+
+
+
+ + Nodes Detected: {activeNodes} + +
+
+ Last Sync: {new Date().toLocaleDateString()} +
+
+ +
+
+ +
+ +
+
+ +

+ The Architects +

+ // Humans +
+ +
+ {displayArchitects.map((architect: DisplayArchitect, idx: number) => ( + +
+ + [{architect.id}] + +
+ + {architect.name} + + + — {architect.role} + +
+
+ + {architect.isReserved ? ( + + Join Foundry + + ) : architect.isLive && architect.slug ? ( + + + View Profile + + + ) : null} +
+ ))} +
+
+ +
+
+ +

+ The Protocols +

+ // Technology +
+ +
+ {PROTOCOLS.map((protocol, idx) => ( + +
+ {protocol.id === "aegis" && } + {protocol.id === "warden" && } + {protocol.id === "lonestar" && } +
+ {protocol.name} + — {protocol.description} +
+
+ +
+ ))} +
+
+ +
+
+ +

+ The Domains +

+ // Real Estate +
+ +
+ {DOMAINS.map((domain, idx) => ( + +
{domain.name}
+
{domain.purpose}
+
+ ))} +
+
+ +
+
+
+ +

+ Want Your Name on This List? +

+
+

+ Join The Foundry and become a verified Architect in the AeThex ecosystem. + Your name gets hardcoded into the Network Genesis Block. +

+ + Join The Foundry + +
+
+ +
+ + +
+ ); +} diff --git a/server/routes.ts b/server/routes.ts index 8d7be41..8c3d940 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -185,6 +185,87 @@ export async function registerRoutes( } }); + // ========== PUBLIC DIRECTORY ROUTES ========== + + // Get public directory of verified architects + app.get("/api/directory/architects", async (req, res) => { + try { + const profiles = await storage.getProfiles(); + // Filter and map to public-safe fields + const publicProfiles = profiles + .filter(p => p.is_verified || ['admin', 'oversee', 'employee'].includes(p.role || '')) + .map((p, index) => ({ + id: String(index + 1).padStart(3, '0'), + name: p.full_name || p.username || p.email?.split('@')[0] || 'Architect', + role: p.role || 'member', + bio: p.bio, + level: p.level, + xp: p.total_xp, + passportId: p.aethex_passport_id, + skills: p.skills, + })); + res.json(publicProfiles); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } + }); + + // Get public directory of projects + app.get("/api/directory/projects", async (req, res) => { + try { + const projects = await storage.getProjects(); + // Map to public-safe fields + const publicProjects = projects.map(p => ({ + id: p.id, + name: p.title, + description: p.description, + techStack: p.technologies, + status: p.status, + })); + res.json(publicProjects); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } + }); + + // Get single architect profile by username/slug + app.get("/api/directory/architects/:slug", async (req, res) => { + try { + const { slug } = req.params; + const profiles = await storage.getProfiles(); + const profile = profiles.find(p => + p.aethex_passport_id?.toLowerCase() === slug.toLowerCase() || + p.full_name?.toLowerCase() === slug.toLowerCase() || + p.username?.toLowerCase() === slug.toLowerCase() || + p.email?.split('@')[0].toLowerCase() === slug.toLowerCase() + ); + + if (!profile) { + return res.status(404).json({ error: "Architect not found" }); + } + + // Return public-safe fields only + const socialLinks = profile.social_links || {}; + res.json({ + id: profile.id, + name: profile.full_name || profile.username || profile.email?.split('@')[0] || 'Architect', + role: profile.role, + bio: profile.bio, + level: profile.level, + xp: profile.total_xp, + passportId: profile.aethex_passport_id, + skills: profile.skills, + isVerified: profile.is_verified, + avatarUrl: profile.avatar_url, + github: socialLinks.github, + twitter: socialLinks.twitter, + website: socialLinks.website, + }); + } catch (err: any) { + res.status(500).json({ error: err.message }); + } + }); + // ========== ADMIN-PROTECTED API ROUTES ========== // Get all profiles (admin only)