# ๐Ÿ—๏ธ Modular Architecture Design for aethex.dev Developer Platform **Status:** Phase 1 Analysis Complete **Date:** January 7, 2026 --- ## ๐Ÿ“‹ Executive Summary This document outlines the transformation of aethex-forge from a multi-purpose ecosystem hub into **aethex.dev** - a professional developer platform while preserving all existing functionality (including ๐Ÿ”’ Discord Activity). **Current State:** - Single monolithic React SPA with 843-line App.tsx - 90+ routes serving multiple audiences (developers, creators, staff, corporate clients, investors) - Mixed concerns: documentation, dashboards, community, staff tools, marketing pages - Existing docs system with 50+ markdown files **Target State:** - Modular developer platform with clear information architecture - Distinct feature modules (Docs, API Reference, Dashboard, SDK, Templates, Marketplace) - Developer-first UX (clean, technical aesthetic like Vercel/Stripe) - All existing functionality preserved and accessible --- ## ๐ŸŽฏ Module Structure Overview ``` aethex.dev/ โ”‚ โ”œโ”€โ”€ ๐Ÿ  Landing (New Developer Platform Homepage) โ”‚ โ””โ”€โ”€ Marketing, value props, quick starts, featured integrations โ”‚ โ”œโ”€โ”€ ๐Ÿ“š /docs - Documentation System โ”‚ โ”œโ”€โ”€ Getting Started โ”‚ โ”œโ”€โ”€ Tutorials & Guides โ”‚ โ”œโ”€โ”€ Platform Concepts โ”‚ โ”œโ”€โ”€ Integrations (Discord, Unity, Roblox, etc.) โ”‚ โ”œโ”€โ”€ API Concepts โ”‚ โ””โ”€โ”€ Examples & Code Samples โ”‚ โ”œโ”€โ”€ ๐Ÿ”ง /api-reference - Interactive API Documentation โ”‚ โ”œโ”€โ”€ Authentication โ”‚ โ”œโ”€โ”€ Endpoints by Category (Creators, GameForge, Passport, etc.) โ”‚ โ”œโ”€โ”€ Interactive Playground โ”‚ โ””โ”€โ”€ Webhooks & Events โ”‚ โ”œโ”€โ”€ ๐Ÿ“Š /dashboard - Developer Dashboard โ”‚ โ”œโ”€โ”€ API Keys Management โ”‚ โ”œโ”€โ”€ Usage Analytics โ”‚ โ”œโ”€โ”€ Integration Settings โ”‚ โ”œโ”€โ”€ Billing (future) โ”‚ โ””โ”€โ”€ Projects โ”‚ โ”œโ”€โ”€ ๐Ÿ“ฆ /sdk - SDK Distribution & Documentation โ”‚ โ”œโ”€โ”€ JavaScript/TypeScript SDK โ”‚ โ”œโ”€โ”€ Python SDK โ”‚ โ”œโ”€โ”€ Unity SDK (C#) โ”‚ โ”œโ”€โ”€ Unreal SDK (C++) โ”‚ โ””โ”€โ”€ Version Management โ”‚ โ”œโ”€โ”€ ๐ŸŽจ /templates - Project Templates & Boilerplates โ”‚ โ”œโ”€โ”€ Template Library โ”‚ โ”œโ”€โ”€ Template Details โ”‚ โ”œโ”€โ”€ "Use Template" Flow โ”‚ โ””โ”€โ”€ Community Templates (future) โ”‚ โ”œโ”€โ”€ ๐Ÿช /marketplace - Plugin/Module Marketplace (Phase 2) โ”‚ โ”œโ”€โ”€ Browse Plugins โ”‚ โ”œโ”€โ”€ Product Details โ”‚ โ”œโ”€โ”€ Purchase/Install โ”‚ โ””โ”€โ”€ Developer Portal (for sellers) โ”‚ โ”œโ”€โ”€ ๐Ÿงช /playground - Code Sandbox (Phase 2) โ”‚ โ””โ”€โ”€ Interactive coding environment โ”‚ โ””โ”€โ”€ ๐Ÿ”’ PROTECTED ZONES (Unchanged) โ”œโ”€โ”€ /discord - Discord Activity โ”œโ”€โ”€ /activity - Activity alias โ”œโ”€โ”€ /discord-verify - Account linking โ””โ”€โ”€ /api/discord/* - All Discord endpoints ``` --- ## ๐Ÿ“Š Current Route Analysis & Mapping ### Category 1: Developer Platform Routes (ENHANCE) **Documentation Routes (34 routes)** ``` Current: โ”œโ”€โ”€ /docs (with nested routes via DocsLayout) โ”œโ”€โ”€ /docs/tutorials โ”œโ”€โ”€ /docs/getting-started โ”œโ”€โ”€ /docs/platform โ”œโ”€โ”€ /docs/api โ”œโ”€โ”€ /docs/cli โ”œโ”€โ”€ /docs/examples โ”œโ”€โ”€ /docs/integrations โ””โ”€โ”€ /docs/curriculum ๐Ÿ‘‰ Action: ENHANCE with new developer platform design - Keep all existing routes - Apply new design system - Add three-column layout (nav | content | examples) - Add interactive code playgrounds - Consolidate Discord docs into main docs system ``` **Dashboard Routes (6 routes)** ``` Current: โ”œโ”€โ”€ /dashboard (main dashboard) โ”œโ”€โ”€ /dashboard/nexus (Nexus-specific) โ”œโ”€โ”€ /dashboard/labs (redirects to aethex.studio) โ”œโ”€โ”€ /dashboard/gameforge (GameForge management) โ””โ”€โ”€ /dashboard/dev-link (redirects to Nexus) ๐Ÿ‘‰ Action: TRANSFORM into Developer Dashboard - Keep /dashboard as main developer dashboard - Add /dashboard/api-keys (NEW) - Add /dashboard/usage (NEW) - Add /dashboard/settings (NEW) - Add /dashboard/billing (NEW - placeholder) - Keep /dashboard/nexus, /dashboard/gameforge for specific services ``` **Profile & Auth Routes (13 routes)** ``` Current: โ”œโ”€โ”€ /profile, /profile/me โ”œโ”€โ”€ /profile/applications โ”œโ”€โ”€ /profile/link-discord (๐Ÿ”’ PROTECTED) โ”œโ”€โ”€ /passport, /passport/me, /passport/:username โ”œโ”€โ”€ /login, /signup, /reset-password โ”œโ”€โ”€ /onboarding โ””โ”€โ”€ /roblox-callback, /web3-callback ๐Ÿ‘‰ Action: INTEGRATE with developer dashboard - Keep all existing routes - Add developer-specific profile sections - Link from dashboard to profile settings ``` ### Category 2: ๐Ÿ”’ PROTECTED Discord Activity (DO NOT MODIFY) ``` ๐Ÿ”’ /discord - Discord Activity main page ๐Ÿ”’ /discord/callback - OAuth callback ๐Ÿ”’ /discord-verify - Account verification/linking ๐Ÿ”’ /activity - Activity alias ๐Ÿ”’ /api/discord/* - All Discord backend endpoints ๐Ÿ‘‰ Action: PROTECT and REFERENCE - Do not modify routes - Do not modify components - Add Discord integration to new docs as featured example - Link from developer dashboard to Discord connection status ``` ### Category 3: Community & Creator Routes (KEEP AS-IS) **Creator Network (8 routes)** ``` โ”œโ”€โ”€ /creators (directory) โ”œโ”€โ”€ /creators/:username (profiles) โ”œโ”€โ”€ /opportunities (hub) โ”œโ”€โ”€ /opportunities/post โ”œโ”€โ”€ /opportunities/:id โ”œโ”€โ”€ /developers (directory) โ””โ”€โ”€ /dev-link (redirects to opportunities) ๐Ÿ‘‰ Action: MAINTAIN - Keep all routes functional - Apply new design system for consistency - Link from developer landing page as "Hire Developers" CTA ``` **Community Routes (15 routes)** ``` โ”œโ”€โ”€ /community/* (main community hub) โ”œโ”€โ”€ /feed (redirects to /community/feed) โ”œโ”€โ”€ /arms (community arms/chapters) โ”œโ”€โ”€ /teams, /squads, /mentee-hub โ”œโ”€โ”€ /projects, /projects/new, /projects/:id/board โ”œโ”€โ”€ /projects/admin โ”œโ”€โ”€ /realms โ””โ”€โ”€ /ethos/* (music licensing system - 4 routes) ๐Ÿ‘‰ Action: MAINTAIN - Keep all routes functional - Link from main nav as "Community" - Apply design system for consistency ``` ### Category 4: Corporate & Services Routes (KEEP AS-IS) **Corp Routes (9 routes)** ``` โ”œโ”€โ”€ /corp (main corporate services page) โ”œโ”€โ”€ /corp/schedule-consultation โ”œโ”€โ”€ /corp/view-case-studies โ”œโ”€โ”€ /corp/contact-us โ”œโ”€โ”€ /engage (pricing) โ”œโ”€โ”€ /game-development โ”œโ”€โ”€ /mentorship โ”œโ”€โ”€ /research โ””โ”€โ”€ Legacy redirects: /consulting, /services โ†’ /corp ๐Ÿ‘‰ Action: MAINTAIN - Keep all routes functional - Link from footer as "Enterprise Solutions" - Separate from developer platform UX ``` **Foundation Routes (2 routes)** ``` โ”œโ”€โ”€ /foundation (redirects to aethex.foundation) โ”œโ”€โ”€ /gameforge (public, redirects to aethex.foundation/gameforge) โ””โ”€โ”€ /gameforge/manage (local, for management) ๐Ÿ‘‰ Action: MAINTAIN - Keep redirects functional - Link from footer ``` ### Category 5: Staff & Internal Routes (KEEP AS-IS) **Staff Routes (18 routes)** ``` โ”œโ”€โ”€ /staff (staff portal) โ”œโ”€โ”€ /staff/login โ”œโ”€โ”€ /staff/dashboard โ”œโ”€โ”€ /staff/directory โ”œโ”€โ”€ /staff/admin โ”œโ”€โ”€ /staff/chat โ”œโ”€โ”€ /staff/docs โ”œโ”€โ”€ /staff/achievements โ”œโ”€โ”€ /staff/announcements โ”œโ”€โ”€ /staff/expense-reports โ”œโ”€โ”€ /staff/marketplace โ”œโ”€โ”€ /staff/knowledge-base โ”œโ”€โ”€ /staff/learning-portal โ”œโ”€โ”€ /staff/performance-reviews โ”œโ”€โ”€ /staff/project-tracking โ””โ”€โ”€ /staff/team-handbook ๐Ÿ‘‰ Action: MAINTAIN - Keep all routes functional - Not part of public developer platform - Separate authentication and access control ``` **Admin Routes (5 routes)** ``` โ”œโ”€โ”€ /admin (main admin panel) โ”œโ”€โ”€ /admin/feed (feed management) โ”œโ”€โ”€ /admin/docs-sync (GitBook sync) โ”œโ”€โ”€ /bot-panel (Discord bot admin) โ””โ”€โ”€ Internal docs hub (/internal-docs/* - 15 routes) ๐Ÿ‘‰ Action: MAINTAIN - Keep all routes functional - Not part of public developer platform ``` ### Category 6: Informational & Marketing Routes (KEEP AS-IS) **Marketing Pages (14 routes)** ``` โ”œโ”€โ”€ / (homepage - currently SubdomainPassport) โ”œโ”€โ”€ /about, /contact, /get-started โ”œโ”€โ”€ /explore โ”œโ”€โ”€ /investors โ”œโ”€โ”€ /roadmap, /trust, /press โ”œโ”€โ”€ /downloads โ”œโ”€โ”€ /status, /changelog โ”œโ”€โ”€ /support โ”œโ”€โ”€ /blog, /blog/:slug โ””โ”€โ”€ /wix, /wix/case-studies, /wix/faq ๐Ÿ‘‰ Action: TRANSFORM Homepage - Replace / with new developer platform landing page - Keep all other routes - Link from footer and main nav - Apply consistent navigation ``` **Legal Routes (3 routes)** ``` โ”œโ”€โ”€ /privacy โ”œโ”€โ”€ /terms โ””โ”€โ”€ /careers ๐Ÿ‘‰ Action: MAINTAIN - Keep all routes - Update with developer platform links in footer ``` **Hub Routes (6 routes)** ``` Client Hub (for corporate clients): โ”œโ”€โ”€ /hub/client โ”œโ”€โ”€ /hub/client/dashboard โ”œโ”€โ”€ /hub/client/projects โ”œโ”€โ”€ /hub/client/invoices โ”œโ”€โ”€ /hub/client/contracts โ”œโ”€โ”€ /hub/client/reports โ””โ”€โ”€ /hub/client/settings ๐Ÿ‘‰ Action: MAINTAIN - Keep all routes functional - Separate from developer platform ``` ### Category 7: External Redirects (MAINTAIN) ``` โ”œโ”€โ”€ /labs โ†’ https://aethex.studio โ”œโ”€โ”€ /foundation โ†’ https://aethex.foundation โ”œโ”€โ”€ /gameforge โ†’ https://aethex.foundation/gameforge โ””โ”€โ”€ Various legacy redirects ๐Ÿ‘‰ Action: MAINTAIN - Keep all redirects functional - Document in sitemap ``` --- ## ๐ŸŽจ Shared Components Inventory ### Core Shared Components (Keep & Enhance) **Navigation Components** ```typescript // Current - Navigation bar (part of various layouts) - Footer (various implementations) // Needed for Developer Platform โœ… /client/components/dev-platform/DevPlatformNav.tsx - Top navigation with module switcher - Search command palette (Cmd+K) - User menu with API keys link โœ… /client/components/dev-platform/DevPlatformFooter.tsx - Ecosystem links (aethex.net, .info, .dev) - Resources, Legal, Social - Consistent across all pages โœ… /client/components/dev-platform/Breadcrumbs.tsx - Path navigation - Used in docs, API reference, dashboard ``` **Layout Components** ```typescript // Current - DocsLayout (for /docs routes) - Various page layouts // Needed for Developer Platform โœ… /client/components/dev-platform/layouts/DevPlatformLayout.tsx - Base layout wrapper - Includes nav, footer, main content area โœ… /client/components/dev-platform/layouts/ThreeColumnLayout.tsx - For docs and API reference - Left: Navigation tree - Center: Content - Right: Code examples / Table of contents โœ… /client/components/dev-platform/layouts/DashboardLayout.tsx - Dashboard sidebar - Main content area - Stats overview ``` **Design System Components** ```typescript // Current (from shadcn/ui) - Already have: Button, Card, Input, Select, Dialog, Toast, etc. - Location: /client/components/ui/ // Needed (New Developer Platform Specific) โœ… /client/components/dev-platform/ui/CodeBlock.tsx - Syntax highlighting (Prism.js) - Copy button - Language selector tabs - Line numbers โœ… /client/components/dev-platform/ui/ApiEndpointCard.tsx - Method badge (GET, POST, etc.) - Endpoint path - Description - Try It button โœ… /client/components/dev-platform/ui/StatCard.tsx - Dashboard metrics display - Icon, label, value, trend โœ… /client/components/dev-platform/ui/Callout.tsx - Info, Warning, Success, Error variants - Icon, title, description โœ… /client/components/dev-platform/ui/CommandPalette.tsx - Cmd+K search - Quick navigation - Command shortcuts โœ… /client/components/dev-platform/ui/LanguageTab.tsx - Code example language switcher - JavaScript, Python, cURL, etc. โœ… /client/components/dev-platform/ui/TemplateCard.tsx - Template preview - Stats (stars, forks, uses) - Use Template button โœ… /client/components/dev-platform/ui/ApiKeyManager.tsx - Create, view, revoke API keys - Masked display - Copy to clipboard โœ… /client/components/dev-platform/ui/UsageChart.tsx - Recharts integration - API usage over time - Filterable time ranges ``` **Context Providers (Keep All)** ```typescript // Current (KEEP ALL) - AuthProvider - Authentication state - DiscordProvider - ๐Ÿ”’ PROTECTED - DiscordActivityProvider - ๐Ÿ”’ PROTECTED - Web3Provider - Web3 connection - DocsThemeProvider - Docs theme - ArmThemeProvider - Community arms - MaintenanceProvider - Maintenance mode - SubdomainPassportProvider - Subdomain routing - QueryClientProvider - React Query // New (Add for Developer Platform) โœ… DevPlatformProvider - Developer-specific state (API keys, usage stats) - Command palette state - Recent searches ``` --- ## ๐Ÿ—‚๏ธ Proposed Directory Structure ``` client/ โ”œโ”€โ”€ App.tsx (UPDATE: Add new developer platform routes) โ”‚ โ”œโ”€โ”€ pages/ โ”‚ โ”œโ”€โ”€ Index.tsx (REPLACE: New developer platform landing) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ dev-platform/ (NEW: Developer platform pages) โ”‚ โ”‚ โ”œโ”€โ”€ DevLanding.tsx (New developer homepage) โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ docs/ (ENHANCE existing /docs pages) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DocsHome.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DocsGettingStarted.tsx (existing) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DocsTutorials.tsx (existing) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DocsIntegrations.tsx (existing) โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ [...] โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ api-reference/ (NEW) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiReferenceHome.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiAuthentication.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiEndpoints.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiPlayground.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ ApiWebhooks.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ dashboard/ (NEW: Developer dashboard) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DeveloperDashboard.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiKeysManagement.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ UsageAnalytics.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ IntegrationSettings.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ BillingPage.tsx (placeholder) โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ sdk/ (NEW) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ SdkHome.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ SdkJavaScript.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ SdkPython.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ SdkUnity.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ SdkUnreal.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ templates/ (NEW) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ TemplateLibrary.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ TemplateDetail.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ UseTemplate.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ marketplace/ (NEW - Phase 2) โ”‚ โ”‚ โ”œโ”€โ”€ MarketplaceHome.tsx โ”‚ โ”‚ โ”œโ”€โ”€ ProductDetail.tsx โ”‚ โ”‚ โ””โ”€โ”€ SellerPortal.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ”’ Discord* (PROTECTED - Do not modify) โ”‚ โ”‚ โ”œโ”€โ”€ DiscordActivity.tsx โ”‚ โ”‚ โ”œโ”€โ”€ DiscordOAuthCallback.tsx โ”‚ โ”‚ โ””โ”€โ”€ DiscordVerify.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Dashboard.tsx (KEEP: General dashboard, links to developer dashboard) โ”‚ โ”œโ”€โ”€ Profile.tsx (KEEP) โ”‚ โ”œโ”€โ”€ Login.tsx (KEEP) โ”‚ โ”œโ”€โ”€ [...] (All other existing pages - KEEP) โ”‚ โ”œโ”€โ”€ components/ โ”‚ โ”œโ”€โ”€ ui/ (EXISTING: shadcn/ui components - KEEP) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ dev-platform/ (NEW: Developer platform components) โ”‚ โ”‚ โ”œโ”€โ”€ DevPlatformNav.tsx โ”‚ โ”‚ โ”œโ”€โ”€ DevPlatformFooter.tsx โ”‚ โ”‚ โ”œโ”€โ”€ Breadcrumbs.tsx โ”‚ โ”‚ โ”œโ”€โ”€ SearchCommandPalette.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ layouts/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DevPlatformLayout.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ThreeColumnLayout.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ DashboardLayout.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ docs/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DocsSidebar.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ DocsTableOfContents.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ CodeBlock.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Callout.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ LanguageTabs.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ api/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiPlayground.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiEndpointCard.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ RequestBuilder.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ ResponseViewer.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ dashboard/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiKeyManager.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ApiKeyCard.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ UsageChart.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ StatCard.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ ActivityFeed.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ sdk/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ SdkCard.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ InstallInstructions.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ VersionSelector.tsx โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ DownloadButton.tsx โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ templates/ โ”‚ โ”‚ โ”œโ”€โ”€ TemplateCard.tsx โ”‚ โ”‚ โ”œโ”€โ”€ TemplatePreview.tsx โ”‚ โ”‚ โ””โ”€โ”€ UseTemplateButton.tsx โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ docs/ (EXISTING: Current docs components) โ”‚ โ”‚ โ””โ”€โ”€ DocsLayout.tsx (ENHANCE with new design) โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ [...] (All other existing components - KEEP) โ”‚ โ”œโ”€โ”€ contexts/ โ”‚ โ”œโ”€โ”€ DiscordContext.tsx (๐Ÿ”’ PROTECTED) โ”‚ โ”œโ”€โ”€ DiscordActivityContext.tsx (๐Ÿ”’ PROTECTED) โ”‚ โ”œโ”€โ”€ DevPlatformContext.tsx (NEW) โ”‚ โ””โ”€โ”€ [...] (All other existing contexts - KEEP) โ”‚ โ”œโ”€โ”€ hooks/ (NEW) โ”‚ โ”œโ”€โ”€ useApiKeys.ts โ”‚ โ”œโ”€โ”€ useUsageStats.ts โ”‚ โ”œโ”€โ”€ useTemplates.ts โ”‚ โ””โ”€โ”€ useCommandPalette.ts โ”‚ โ””โ”€โ”€ lib/ โ”œโ”€โ”€ utils.ts (EXISTING - KEEP) โ”œโ”€โ”€ api-client.ts (NEW: Developer API client) โ””โ”€โ”€ syntax-highlighter.ts (NEW: Prism.js integration) ``` ``` api/ โ”œโ”€โ”€ discord/ (๐Ÿ”’ PROTECTED - Do not modify) โ”‚ โ”œโ”€โ”€ activity-auth.ts โ”‚ โ”œโ”€โ”€ link.ts โ”‚ โ”œโ”€โ”€ token.ts โ”‚ โ”œโ”€โ”€ create-linking-session.ts โ”‚ โ”œโ”€โ”€ verify-code.ts โ”‚ โ””โ”€โ”€ oauth/ โ”‚ โ”œโ”€โ”€ start.ts โ”‚ โ””โ”€โ”€ callback.ts โ”‚ โ”œโ”€โ”€ developer/ (NEW: Developer platform APIs) โ”‚ โ”œโ”€โ”€ keys/ โ”‚ โ”‚ โ”œโ”€โ”€ create.ts โ”‚ โ”‚ โ”œโ”€โ”€ list.ts โ”‚ โ”‚ โ”œโ”€โ”€ revoke.ts โ”‚ โ”‚ โ””โ”€โ”€ validate.ts โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ usage/ โ”‚ โ”‚ โ”œโ”€โ”€ analytics.ts โ”‚ โ”‚ โ”œโ”€โ”€ stats.ts โ”‚ โ”‚ โ””โ”€โ”€ export.ts โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ templates/ โ”‚ โ”œโ”€โ”€ list.ts โ”‚ โ”œโ”€โ”€ get.ts โ”‚ โ””โ”€โ”€ clone.ts โ”‚ โ””โ”€โ”€ [...] (All other existing API routes - KEEP) ``` --- ## ๐Ÿ“ Dependencies Between Modules ```mermaid graph TD A[Landing Page] --> B[Docs] A --> C[API Reference] A --> D[Dashboard] A --> E[SDK] A --> F[Templates] B --> C B --> E C --> D D --> C E --> B F --> B F --> D D --> G[๐Ÿ”’ Discord Integration] B --> G H[Shared Design System] --> A H --> B H --> C H --> D H --> E H --> F I[Auth System] --> A I --> B I --> C I --> D I --> E I --> F ``` **Key Dependencies:** 1. **Shared Design System** โ†’ All modules 2. **Auth System** โ†’ Dashboard, API Reference (playground), Templates 3. **Docs** โ†’ API Reference (links to concepts), SDK (documentation) 4. **Dashboard** โ†’ API Reference (usage stats), Discord (connection status) 5. **Templates** โ†’ Docs (guides), Dashboard (deployed projects) --- ## ๐Ÿ›ก๏ธ Protected Zone Integration ### How Developer Platform Interfaces with Discord Activity **Allowed Integrations:** โœ… **In Documentation** (`/docs/integrations/discord`) - Reference Discord Activity as a featured integration - Link to protected Discord documentation (consolidated guides) - Show code examples using Discord SDK - Tutorial: "Building a Discord Activity with AeThex" โœ… **In API Reference** (`/api-reference/discord`) - Document (read-only) Discord API endpoints - Show request/response examples - Link to Discord Activity authentication docs - Note: "See Discord Activity documentation for implementation" โœ… **In Dashboard** (`/dashboard/integrations`) - Show Discord connection status (linked/not linked) - Display Discord username if linked - Button: "Manage Discord Connection" โ†’ redirects to `/profile/link-discord` (๐Ÿ”’ protected route) - Show Discord Activity usage stats (if available) โœ… **In Landing Page** (`/`) - Feature Discord Activity as "Build Games Inside Discord" - Screenshot/demo of Discord Activity - CTA: "Learn More" โ†’ `/docs/integrations/discord` **Forbidden Actions:** โŒ Do not modify `/discord`, `/discord-verify`, `/activity` routes โŒ Do not modify `DiscordActivity.tsx`, `DiscordOAuthCallback.tsx`, `DiscordVerify.tsx` components โŒ Do not modify `/api/discord/*` endpoints โŒ Do not change `DiscordProvider` or `DiscordActivityProvider` logic โŒ Do not remove or relocate Discord manifest file --- ## ๐ŸŽฏ Implementation Strategy ### Phase 1: Foundation (Week 1-2) **Week 1: Design System & Core Components** 1. Create `/client/components/dev-platform/` directory structure 2. Implement core UI components (CodeBlock, ApiEndpointCard, StatCard, Callout) 3. Build navigation components (DevPlatformNav, DevPlatformFooter, Breadcrumbs) 4. Create layout components (DevPlatformLayout, ThreeColumnLayout, DashboardLayout) 5. Set up DevPlatformContext provider 6. Define design tokens (colors, typography, spacing) for developer platform **Week 2: Route Structure & Landing Page** 1. Add new routes to App.tsx (dashboard, api-reference, sdk, templates) 2. Create developer platform landing page (`/pages/dev-platform/DevLanding.tsx`) 3. Replace homepage (`/` route) with new developer landing 4. Ensure all existing routes remain functional 5. Test navigation between old and new sections ### Phase 2: Documentation System (Week 3-4) **Week 3: Docs Framework** 1. Enhance existing `/docs` routes with new design system 2. Implement three-column layout for docs 3. Add command palette (Cmd+K) search 4. Create docs navigation tree component 5. Set up syntax highlighting for code blocks **Week 4: Discord Documentation Consolidation** 1. Read and analyze all 14 Discord documentation files 2. Create consolidated guides: - `discord-integration-guide.md` - `discord-activity-reference.md` - `discord-deployment.md` 3. Archive old Discord docs to `/docs/archive/discord/` 4. Integrate into main docs navigation at `/docs/integrations/discord` 5. Cross-link between new guides ### Phase 3: Developer Dashboard (Week 5-6) **Week 5: API Key Management** 1. Create database schema for API keys 2. Implement `/api/developer/keys/*` endpoints 3. Build API key management UI (`/dashboard/api-keys`) 4. Implement key generation, viewing, revoking 5. Add API key authentication middleware **Week 6: Usage Analytics** 1. Implement usage tracking for API calls 2. Create `/api/developer/usage/*` endpoints 3. Build analytics dashboard UI (`/dashboard/usage`) 4. Integrate recharts for visualizations 5. Add real-time updates or polling ### Phase 4: API Reference & SDK (Week 7-8) **Week 7: Interactive API Reference** 1. Create API reference pages (`/api-reference`) 2. Document all API endpoints by category 3. Build API endpoint documentation format 4. Implement syntax highlighting for examples 5. Create tabbed code examples (JavaScript, Python, cURL) **Week 8: API Playground & SDK Pages** 1. Build ApiPlayground component 2. Implement request builder and response viewer 3. Create SDK landing page (`/sdk`) 4. Build SDK-specific documentation pages 5. Add version selector and download tracking ### Phase 5: Templates & Polish (Week 9-10) **Week 9: Templates System** 1. Design templates database schema 2. Create `/api/templates/*` endpoints 3. Build template library UI (`/templates`) 4. Implement template card components 5. Create "Use Template" flow **Week 10: QA & Performance** 1. Accessibility audit (WCAG 2.1 AA) 2. Performance optimization (Lighthouse > 90) 3. Mobile responsiveness testing 4. Cross-browser testing 5. Security audit ### Phase 6: Deployment (Week 11-12) **Week 11: Staging Deployment** 1. Set up staging environment 2. Deploy to staging 3. Run smoke tests 4. Gather internal feedback 5. Fix critical bugs **Week 12: Production Launch** 1. Final security review 2. Performance monitoring setup 3. Deploy to production 4. Monitor error rates 5. Gather user feedback --- ## ๐Ÿš€ Migration Plan ### Route Migration **No Breaking Changes:** - All existing routes remain functional - New routes added without conflicting with existing - Gradual transition: users can access both old and new sections **Migration Strategy:** ``` Phase 1: Additive (New routes alongside old) โ”œโ”€โ”€ /dashboard (old) โ†’ General dashboard โ””โ”€โ”€ /dashboard/dev (new) โ†’ Developer dashboard Phase 2: Redirect (Old routes redirect to new) โ”œโ”€โ”€ /dashboard โ†’ /dashboard/dev (redirect) โ””โ”€โ”€ Legacy routes preserved Phase 3: Consolidation (Remove old) โ”œโ”€โ”€ Only when new system is proven stable โ””โ”€โ”€ Archive old components ``` ### Component Migration **Strategy:** 1. Build new components in `/client/components/dev-platform/` 2. Use existing shadcn/ui components as base 3. Gradually apply new design system to existing pages 4. Keep old components until migration complete 5. Remove old components only when fully replaced ### Data Migration **API Keys:** - New feature, no existing data to migrate - Create fresh database tables **Usage Analytics:** - Start fresh tracking from launch date - No historical data needed --- ## ๐Ÿ“Š Success Metrics ### Launch Metrics (Week 1-4) **Traffic:** - Unique visitors to developer platform - Page views per visitor - Time on site **Engagement:** - API keys generated - SDK downloads - Template uses - API playground requests **Quality:** - Lighthouse score > 90 - Zero critical accessibility issues - < 2s page load time - < 1% error rate ### Growth Metrics (Month 1-3) **Adoption:** - Monthly active developers - Total API calls - New developer signups **Retention:** - Week 1 retention - Week 4 retention - Churn rate **Satisfaction:** - User feedback score - Support ticket volume - Documentation helpfulness rating --- ## ๐ŸŽจ Design Principles **Visual Identity:** - Dark mode first (developer preference) - Clean, technical aesthetic (Vercel/Stripe inspiration) - Consistent with aethex.net branding (blue/purple theme) - Typography: Inter for UI, JetBrains Mono for code **UX Principles:** - Developer efficiency (keyboard shortcuts, quick actions) - Progressive disclosure (simple by default, power features hidden) - Consistent patterns (same interaction model across modules) - Fast and responsive (< 100ms interaction latency) **Content Strategy:** - Code-first (show examples first, explain after) - Practical over theoretical (real-world use cases) - Searchable (every page indexed for Cmd+K) - Up-to-date (automated freshness checks) --- ## โœ… Pre-Implementation Checklist Before starting implementation: - [x] Discord Activity protection inventory created (`PROTECTED_DISCORD_ACTIVITY.md`) - [x] Current route structure analyzed and documented - [x] Component inventory completed - [x] Module structure designed - [ ] Design mockups created (Figma/Sketch) - [ ] Database schema designed for new features - [ ] API endpoint specification written - [ ] Stakeholder approval obtained - [ ] Development environment set up - [ ] Test plan created --- ## ๐Ÿ”— Related Documents - `PROTECTED_DISCORD_ACTIVITY.md` - Discord Activity protection inventory - `AGENTS.md` - Current project structure and tech stack - `/docs/DISCORD-*.md` - Existing Discord documentation (to be consolidated) - `/docs/TECH_STACK_ANALYSIS.md` - Technology stack details --- **Next Steps:** 1. Review this architecture document with stakeholders 2. Create design mockups for key pages 3. Proceed with Phase 1 implementation (Design System & Core Components) 4. Set up project tracking (GitHub Projects or Linear) 5. Begin implementation following week-by-week plan **Questions to Resolve:** 1. Should we use Docusaurus, custom MDX, or Mintlify for documentation? 2. What analytics tool for usage tracking? (Mixpanel, Amplitude, custom?) 3. Payment provider for marketplace? (Stripe Connect?) 4. Hosting strategy: Keep on current platform or migrate? --- **Document Version:** 1.0 **Author:** GitHub Copilot (Claude Sonnet 4.5) **Status:** Ready for Review **Last Updated:** January 7, 2026