Update realm options to align with app-wide taxonomy

Aligns RealmSwitcher realm IDs with the ARMS taxonomy used throughout the application, ensuring proper persistence and pre-selection of saved realms. Adds JWT authentication to the profile update endpoint and updates the dashboard to send authentication tokens with API requests.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 83f304a8-9190-4f3a-a7b9-ba30cbf05d91
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/xCMzR8i
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sirpiglr 2025-12-04 09:53:13 +00:00
parent ce8bf9b3a5
commit bce04f18cd
3 changed files with 99 additions and 50 deletions

View file

@ -52,6 +52,10 @@ externalPort = 80
localPort = 8044 localPort = 8044
externalPort = 3003 externalPort = 3003
[[ports]]
localPort = 36771
externalPort = 3002
[[ports]] [[ports]]
localPort = 38557 localPort = 38557
externalPort = 3000 externalPort = 3000

View file

@ -16,25 +16,28 @@ import {
} from "@/components/ui/select"; } from "@/components/ui/select";
import { Badge } from "@/components/ui/badge"; import { Badge } from "@/components/ui/badge";
import { import {
GamepadIcon, Code,
BriefcaseIcon,
UsersIcon,
ShoppingCartIcon,
Rocket, Rocket,
Users,
Trophy,
Database,
Sparkles,
Shield,
Compass, Compass,
ArrowRight, ArrowRight,
Check, Check,
Shield,
} from "lucide-react"; } from "lucide-react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { useAuth } from "@/contexts/AuthContext"; import { useAuth } from "@/contexts/AuthContext";
import { useMemo, memo, type ComponentType } from "react"; import { useMemo, memo, type ComponentType } from "react";
export type RealmKey = export type RealmKey =
| "game_developer" | "labs"
| "client" | "gameforge"
| "community_member" | "corp"
| "customer" | "foundation"
| "devlink"
| "nexus"
| "staff"; | "staff";
export interface RealmOption { export interface RealmOption {
@ -47,19 +50,36 @@ export interface RealmOption {
route: string; route: string;
routeLabel: string; routeLabel: string;
highlights: string[]; highlights: string[];
staffOnly?: boolean;
} }
export const REALM_OPTIONS: RealmOption[] = [ export const REALM_OPTIONS: RealmOption[] = [
{ {
id: "game_developer", id: "labs",
name: "Development Forge", name: "Research & Development",
title: "Game Development", title: "Labs",
description: description:
"Build immersive experiences, collaborate with other creators, and unlock our full suite of development tools.", "Explore cutting-edge research, experimental features, and contribute to the future of AeThex technology.",
icon: GamepadIcon, icon: Code,
gradient: "from-neon-purple to-aethex-500", gradient: "from-amber-400 to-amber-600",
route: "/dashboard/labs",
routeLabel: "Labs Dashboard",
highlights: [
"Access experimental features",
"Contribute to R&D projects",
"Technical deep-dives",
],
},
{
id: "gameforge",
name: "Game Development",
title: "GameForge",
description:
"Build immersive experiences, collaborate with other creators, and unlock our full suite of game development tools.",
icon: Rocket,
gradient: "from-green-400 to-green-600",
route: "/gameforge", route: "/gameforge",
routeLabel: "Game Development", routeLabel: "GameForge",
highlights: [ highlights: [
"Advanced tooling and workflows", "Advanced tooling and workflows",
"Collaborative project spaces", "Collaborative project spaces",
@ -67,15 +87,15 @@ export const REALM_OPTIONS: RealmOption[] = [
], ],
}, },
{ {
id: "client", id: "corp",
name: "Strategist Nexus", name: "Business & Consulting",
title: "Consulting", title: "Corp",
description: description:
"Engage AeThex teams for bespoke solutions, product consulting, and strategic execution across every milestone.", "Engage AeThex teams for bespoke solutions, product consulting, and strategic execution across every milestone.",
icon: BriefcaseIcon, icon: Users,
gradient: "from-neon-blue to-aethex-400", gradient: "from-blue-400 to-blue-600",
route: "/corp", route: "/hub/client",
routeLabel: "Consulting", routeLabel: "Client Hub",
highlights: [ highlights: [
"Project leadership & delivery", "Project leadership & delivery",
"End-to-end service orchestration", "End-to-end service orchestration",
@ -83,52 +103,69 @@ export const REALM_OPTIONS: RealmOption[] = [
], ],
}, },
{ {
id: "community_member", id: "foundation",
name: "Innovation Commons", name: "Education & Mentorship",
title: "Community", title: "Foundation",
description: description:
"Connect with innovators, share discoveries, and access exclusive research, events, and community resources.", "Access courses, mentorship programs, and educational resources to grow your skills and advance your career.",
icon: UsersIcon, icon: Trophy,
gradient: "from-neon-green to-aethex-600", gradient: "from-red-400 to-red-600",
route: "/community", route: "/foundation",
routeLabel: "Community", routeLabel: "Foundation",
highlights: [ highlights: [
"Curated knowledge streams", "Structured learning paths",
"Collaborative guilds & events", "Expert mentorship",
"Access to experimental features", "Achievement-based progression",
], ],
}, },
{ {
id: "customer", id: "devlink",
name: "Experience Hub", name: "Developer Network",
title: "Get Started", title: "Dev-Link",
description: description:
"Discover AeThex products, manage licenses, and access tailored support for every experience you launch.", "Connect with developers, share knowledge, and collaborate on open-source projects across the AeThex ecosystem.",
icon: ShoppingCartIcon, icon: Database,
gradient: "from-amber-400 to-aethex-700", gradient: "from-cyan-400 to-cyan-600",
route: "/get-started", route: "/dashboard/dev-link",
routeLabel: "Get Started", routeLabel: "Dev-Link",
highlights: [ highlights: [
"Personalized product journeys", "Developer networking",
"Priority support & updates", "Open-source collaboration",
"Insight dashboards", "API access and integrations",
],
},
{
id: "nexus",
name: "Talent Marketplace",
title: "Nexus",
description:
"Find opportunities, showcase your skills, and connect with projects seeking talented creators and developers.",
icon: Sparkles,
gradient: "from-purple-400 to-fuchsia-600",
route: "/nexus",
routeLabel: "Nexus Marketplace",
highlights: [
"Job and contract opportunities",
"Portfolio showcase",
"Talent matching",
], ],
}, },
{ {
id: "staff", id: "staff",
name: "Operations Command", name: "Operations Command",
title: "Admin Panel", title: "Staff",
description: description:
"Admin realm for site staff and employees: operations dashboards, moderation, and admin tooling.", "Admin realm for site staff and employees: operations dashboards, moderation, and admin tooling.",
icon: Shield, icon: Shield,
gradient: "from-sky-600 to-indigo-700", gradient: "from-violet-500 to-purple-700",
route: "/admin", route: "/staff/dashboard",
routeLabel: "Admin", routeLabel: "Staff Dashboard",
highlights: [ highlights: [
"Moderation & triage", "Moderation & triage",
"Operational dashboards", "Operational dashboards",
"Internal tools & audits", "Internal tools & audits",
], ],
staffOnly: true,
}, },
]; ];
@ -169,7 +206,7 @@ const RealmSwitcher = memo(function RealmSwitcher({
[roles], [roles],
); );
const visibleOptions = useMemo( const visibleOptions = useMemo(
() => REALM_OPTIONS.filter((o) => (o.id === "staff" ? canSeeStaff : true)), () => REALM_OPTIONS.filter((o) => (o.staffOnly ? canSeeStaff : true)),
[canSeeStaff], [canSeeStaff],
); );
return ( return (

View file

@ -143,6 +143,14 @@ https://supabase.aethex.tech/auth/v1/callback
- `https://supabase.aethex.tech/auth/v1/callback` - `https://supabase.aethex.tech/auth/v1/callback`
## Recent Changes (December 4, 2025) ## Recent Changes (December 4, 2025)
- ✅ **RealmSwitcher Alignment Fix**: Fixed realm IDs to match ARMS taxonomy
- Old IDs (`game_developer`, `client`, `community_member`, `customer`) replaced with ARMS IDs (`labs`, `gameforge`, `corp`, `foundation`, `devlink`, `nexus`, `staff`)
- Realm selection now persists correctly and pre-selects on page load
- Routes aligned with actual dashboard routes (`/dashboard/labs`, `/gameforge`, `/hub/client`, etc.)
- ✅ **Profile Update Security**: Added JWT authentication to `/api/profile/update` endpoint
- Bearer token authentication required for all profile updates
- User can only update their own profile (user_id validation against auth session)
- Dashboard now sends auth token with all profile API requests
- ✅ **Bot Panel** (`/bot-panel`): Comprehensive Discord bot management dashboard - ✅ **Bot Panel** (`/bot-panel`): Comprehensive Discord bot management dashboard
- Overview tab: Bot info, feed bridge stats, uptime - Overview tab: Bot info, feed bridge stats, uptime
- Servers tab: All connected Discord servers with member counts - Servers tab: All connected Discord servers with member counts