From e2efadff2dcf1c2d9ab70729cdc3cc5f3e439ae2 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Mon, 17 Nov 2025 08:47:57 +0000 Subject: [PATCH] Prettier format pending files --- api/_oauth-federation.ts | 9 ++-- api/discord/oauth/callback.ts | 13 +++-- api/github/oauth/callback.ts | 5 +- api/google/oauth/callback.ts | 5 +- client/App.tsx | 3 -- client/pages/Foundation.tsx | 24 ++++++--- client/pages/Login.tsx | 5 +- client/pages/dashboards/LabsDashboard.tsx | 24 +++++---- client/pages/hub/ClientDashboard.tsx | 65 ++++++++++++++--------- docs/FEDERATION-ARCHITECTURE.md | 18 +++++-- docs/GAMEFORGE-ARCHITECTURE.md | 28 +++++++++- docs/LABS-ARCHITECTURE.md | 27 +++++++--- 12 files changed, 159 insertions(+), 67 deletions(-) diff --git a/api/_oauth-federation.ts b/api/_oauth-federation.ts index 9b44b249..99f5bdd2 100644 --- a/api/_oauth-federation.ts +++ b/api/_oauth-federation.ts @@ -185,9 +185,12 @@ export async function linkProviderToPassport( * Generate a unique username from OAuth data * Fallback: use provider_username + random suffix */ -async function generateUniqueUsername(preferredUsername?: string): Promise { - let username = preferredUsername?.toLowerCase().replace(/[^a-z0-9_-]/g, "") || "user"; - +async function generateUniqueUsername( + preferredUsername?: string, +): Promise { + let username = + preferredUsername?.toLowerCase().replace(/[^a-z0-9_-]/g, "") || "user"; + // Ensure minimum length if (username.length < 3) { username = "user" + Math.random().toString(36).substring(7); diff --git a/api/discord/oauth/callback.ts b/api/discord/oauth/callback.ts index 62a2d5f8..4618da4c 100644 --- a/api/discord/oauth/callback.ts +++ b/api/discord/oauth/callback.ts @@ -1,7 +1,10 @@ import { createClient } from "@supabase/supabase-js"; import { notifyAccountLinked } from "../../_notifications.js"; import { getAdminClient } from "../../_supabase.js"; -import { federateOAuthUser, linkProviderToPassport } from "../../_oauth-federation.js"; +import { + federateOAuthUser, + linkProviderToPassport, +} from "../../_oauth-federation.js"; export const config = { runtime: "nodejs", @@ -185,7 +188,9 @@ export default async function handler(req: any, res: any) { id: discordUser.id, email: discordUser.email, username: discordUser.username, - avatar: discordUser.avatar ? `https://cdn.discordapp.com/avatars/${discordUser.id}/${discordUser.avatar}.webp` : undefined, + avatar: discordUser.avatar + ? `https://cdn.discordapp.com/avatars/${discordUser.id}/${discordUser.avatar}.webp` + : undefined, }); console.log( @@ -212,7 +217,9 @@ export default async function handler(req: any, res: any) { id: discordUser.id, email: discordUser.email, username: discordUser.username, - avatar: discordUser.avatar ? `https://cdn.discordapp.com/avatars/${discordUser.id}/${discordUser.avatar}.webp` : undefined, + avatar: discordUser.avatar + ? `https://cdn.discordapp.com/avatars/${discordUser.id}/${discordUser.avatar}.webp` + : undefined, }); console.log("[Discord OAuth] Federation result:", { diff --git a/api/github/oauth/callback.ts b/api/github/oauth/callback.ts index f3283e09..e51ebc38 100644 --- a/api/github/oauth/callback.ts +++ b/api/github/oauth/callback.ts @@ -1,7 +1,10 @@ import { createClient } from "@supabase/supabase-js"; import { notifyAccountLinked } from "../../_notifications.js"; import { getAdminClient } from "../../_supabase.js"; -import { federateOAuthUser, linkProviderToPassport } from "../../_oauth-federation.js"; +import { + federateOAuthUser, + linkProviderToPassport, +} from "../../_oauth-federation.js"; export const config = { runtime: "nodejs", diff --git a/api/google/oauth/callback.ts b/api/google/oauth/callback.ts index 25040cb3..20b953e9 100644 --- a/api/google/oauth/callback.ts +++ b/api/google/oauth/callback.ts @@ -1,7 +1,10 @@ import { createClient } from "@supabase/supabase-js"; import { notifyAccountLinked } from "../../_notifications.js"; import { getAdminClient } from "../../_supabase.js"; -import { federateOAuthUser, linkProviderToPassport } from "../../_oauth-federation.js"; +import { + federateOAuthUser, + linkProviderToPassport, +} from "../../_oauth-federation.js"; export const config = { runtime: "nodejs", diff --git a/client/App.tsx b/client/App.tsx index 505bb95e..b0a1e588 100644 --- a/client/App.tsx +++ b/client/App.tsx @@ -244,7 +244,6 @@ const App = () => ( element={} /> - } @@ -375,7 +374,6 @@ const App = () => ( element={} /> - {/* Staff Arm Routes */} } /> } /> @@ -592,7 +590,6 @@ const App = () => ( } /> } /> - {/* Ethos Guild Routes */}

GameForge is the Foundation's flagship "master-apprentice" - mentorship program. It's our "gym" where developers collaborate - on focused, high-impact game projects within 30-day sprints. - Teams of 5 (1 mentor + 4 mentees) tackle real game development - challenges and ship playable games to our community arcade. + mentorship program. It's our "gym" where developers + collaborate on focused, high-impact game projects within + 30-day sprints. Teams of 5 (1 mentor + 4 mentees) tackle real + game development challenges and ship playable games to our + community arcade.

@@ -129,14 +130,19 @@ export default function Foundation() {
-

Role 1: Community

+

+ Role 1: Community +

Our "campfire" where developers meet, collaborate, and - build their `aethex.me` passports through real project work. + build their `aethex.me` passports through real project + work.

-

Role 2: Education

+

+ Role 2: Education +

Learn professional development practices: Code Review (SOP-102), Scope Management (KND-001), and shipping @@ -144,7 +150,9 @@ export default function Foundation() {

-

Role 3: Pipeline

+

+ Role 3: Pipeline +

Top performers become "Architects" ready to work on high-value projects. Your GameForge portfolio proves you diff --git a/client/pages/Login.tsx b/client/pages/Login.tsx index e9c083d6..81a0f749 100644 --- a/client/pages/Login.tsx +++ b/client/pages/Login.tsx @@ -419,7 +419,10 @@ export default function Login() { window.location.search, ).get("next"); if (next && next.startsWith("/")) - u.searchParams.set("state", JSON.stringify({ redirectTo: next })); + u.searchParams.set( + "state", + JSON.stringify({ redirectTo: next }), + ); window.location.href = u.toString(); }} > diff --git a/client/pages/dashboards/LabsDashboard.tsx b/client/pages/dashboards/LabsDashboard.tsx index b5e890e0..5c12e094 100644 --- a/client/pages/dashboards/LabsDashboard.tsx +++ b/client/pages/dashboards/LabsDashboard.tsx @@ -113,9 +113,7 @@ export default function LabsDashboard() { if (affiliationRes.ok) { const data = await affiliationRes.json(); hasLabsAccess = - data.arms?.includes("labs") || - data.role === "admin" || - data.verified; + data.arms?.includes("labs") || data.role === "admin" || data.verified; } setIsAccessible(hasLabsAccess); @@ -238,8 +236,8 @@ export default function LabsDashboard() { What is LABS?

- LABS is our proprietary, for-profit R&D department that takes - the open-source Axiom Protocol and builds competitive, + LABS is our proprietary, for-profit R&D department that + takes the open-source Axiom Protocol and builds competitive, closed-source "secret weapons" on top of it.

@@ -430,7 +428,9 @@ export default function LabsDashboard() {

- Overall Progress + + Overall Progress + {featured.progress}% @@ -454,7 +454,8 @@ export default function LabsDashboard() { )} {/* Recent Publications */} - {publications.filter((p) => p.status === "published").length > 0 && ( + {publications.filter((p) => p.status === "published").length > + 0 && ( Recent Publications @@ -482,7 +483,9 @@ export default function LabsDashboard() {

By {pub.author} •{" "} - {new Date(pub.published_date).toLocaleDateString()} + {new Date( + pub.published_date, + ).toLocaleDateString()}

@@ -621,7 +624,10 @@ export default function LabsDashboard() { {/* Publications Tab */} - + {publications.length === 0 ? ( diff --git a/client/pages/hub/ClientDashboard.tsx b/client/pages/hub/ClientDashboard.tsx index d53e93f1..2de13ff9 100644 --- a/client/pages/hub/ClientDashboard.tsx +++ b/client/pages/hub/ClientDashboard.tsx @@ -160,12 +160,9 @@ export default function ClientDashboard() { // Load team try { - const teamRes = await fetch( - `${apiBase}/api/corp/team?limit=50`, - { - headers: { Authorization: `Bearer ${token}` }, - }, - ); + const teamRes = await fetch(`${apiBase}/api/corp/team?limit=50`, { + headers: { Authorization: `Bearer ${token}` }, + }); if (teamRes.ok) { const data = await teamRes.json(); setTeamMembers(Array.isArray(data) ? data : data.team || []); @@ -195,7 +192,9 @@ export default function ClientDashboard() {

CORP Dashboard

-

Enterprise services & project management

+

+ Enterprise services & project management +

-

{activeProjects}

+

+ {activeProjects} +

@@ -277,11 +279,13 @@ export default function ClientDashboard() { - 0 - ? "from-red-950/40 to-red-900/20 border-red-500/20" - : "from-gray-950/40 to-gray-900/20 border-gray-500/20" - }`}> + 0 + ? "from-red-950/40 to-red-900/20 border-red-500/20" + : "from-gray-950/40 to-gray-900/20 border-gray-500/20" + }`} + >

Overdue Invoices

@@ -299,7 +303,11 @@ export default function ClientDashboard() {
{/* Tabs */} - + Overview Projects @@ -310,13 +318,12 @@ export default function ClientDashboard() { {/* Overview Tab */} {/* Active Projects */} - {projects.filter((p) => p.status === "in-progress").length > 0 && ( + {projects.filter((p) => p.status === "in-progress").length > + 0 && ( Active Projects - - Currently in development - + Currently in development {projects @@ -373,9 +380,7 @@ export default function ClientDashboard() { Recent Invoices - - Latest billing activity - + Latest billing activity {invoices.slice(0, 5).map((invoice) => ( @@ -520,7 +525,10 @@ export default function ClientDashboard() {
- +