diff --git a/client/App.tsx b/client/App.tsx
index 10de29b9..cfd5ff9d 100644
--- a/client/App.tsx
+++ b/client/App.tsx
@@ -52,7 +52,10 @@ const App = () => (
} />
} />
} />
- } />
+ }
+ />
} />
{/* Service routes */}
diff --git a/client/components/Layout.tsx b/client/components/Layout.tsx
index 2a17c578..4263f64a 100644
--- a/client/components/Layout.tsx
+++ b/client/components/Layout.tsx
@@ -63,7 +63,9 @@ export default function Layout({ children }: LayoutProps) {
{(() => {
const isOwner = Array.isArray(roles) && roles.includes("owner");
const navItems = user
- ? (isOwner ? [{ name: "Admin", href: "/admin" }, ...userNavigation] : userNavigation)
+ ? isOwner
+ ? [{ name: "Admin", href: "/admin" }, ...userNavigation]
+ : userNavigation
: navigation;
return navItems.map((item, index) => (
-
+
Dashboard
@@ -141,9 +148,9 @@ export default function Layout({ children }: LayoutProps) {
-
- Settings
-
+
+ Settings
+
= ({
// Auto-seed owner roles if logging in as site owner
const ownerEmail = userProfile?.email?.toLowerCase();
if (ownerEmail === "mrpiglr@gmail.com" && !r.includes("owner")) {
- const seeded = Array.from(new Set(["owner", "admin", "founder", ...r]));
+ const seeded = Array.from(
+ new Set(["owner", "admin", "founder", ...r]),
+ );
await aethexRoleService.setUserRoles(userId, seeded);
r = seeded;
}
diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts
index dddafd62..e482632e 100644
--- a/client/lib/aethex-database-adapter.ts
+++ b/client/lib/aethex-database-adapter.ts
@@ -57,7 +57,7 @@ function isTableMissing(err: any): boolean {
const msg = String(err?.message || err?.hint || err?.details || "");
return (
err?.code === "42P01" || // undefined_table
- msg.includes("relation \"") ||
+ msg.includes('relation "') ||
msg.includes("does not exist") ||
msg.includes("table")
);
@@ -86,12 +86,15 @@ export const aethexUserService = {
email: user.email,
} as AethexUserProfile;
}
- const created = await mockAuth.updateProfile(user.id as any, {
- username: user.email?.split("@")[0] || "user",
- email: user.email || "",
- role: "member",
- onboarded: true,
- } as any);
+ const created = await mockAuth.updateProfile(
+ user.id as any,
+ {
+ username: user.email?.split("@")[0] || "user",
+ email: user.email || "",
+ role: "member",
+ onboarded: true,
+ } as any,
+ );
return {
...(created as any),
email: user.email,
@@ -123,7 +126,10 @@ export const aethexUserService = {
if (error) {
console.warn("Error updating profile, attempting mock fallback:", error);
if (isTableMissing(error)) {
- const mock = await mockAuth.updateProfile(userId as any, updates as any);
+ const mock = await mockAuth.updateProfile(
+ userId as any,
+ updates as any,
+ );
return mock as unknown as AethexUserProfile;
}
throw error;
@@ -162,17 +168,20 @@ export const aethexUserService = {
if (error) {
console.warn("Error creating profile, attempting mock fallback:", error);
if (isTableMissing(error)) {
- const mock = await mockAuth.updateProfile(userId as any, {
- username: profileData.username || `user_${Date.now()}`,
- full_name: profileData.full_name,
- bio: profileData.bio,
- location: profileData.location,
- linkedin_url: profileData.linkedin_url as any,
- github_url: profileData.github_url as any,
- twitter_url: profileData.twitter_url as any,
- level: 1,
- total_xp: 0,
- } as any);
+ const mock = await mockAuth.updateProfile(
+ userId as any,
+ {
+ username: profileData.username || `user_${Date.now()}`,
+ full_name: profileData.full_name,
+ bio: profileData.bio,
+ location: profileData.location,
+ linkedin_url: profileData.linkedin_url as any,
+ github_url: profileData.github_url as any,
+ twitter_url: profileData.twitter_url as any,
+ level: 1,
+ total_xp: 0,
+ } as any,
+ );
return {
...(mock as any),
@@ -206,7 +215,9 @@ export const aethexUserService = {
interest,
}));
- const { error } = await supabase.from("user_interests").insert(interestRows);
+ const { error } = await supabase
+ .from("user_interests")
+ .insert(interestRows);
if (error) {
if (isTableMissing(error)) return;
@@ -283,7 +294,10 @@ export const aethexProjectService = {
},
async deleteProject(projectId: string): Promise {
- const { error } = await supabase.from("projects").delete().eq("id", projectId);
+ const { error } = await supabase
+ .from("projects")
+ .delete()
+ .eq("id", projectId);
if (error) {
console.warn("Error deleting project:", error);
@@ -410,7 +424,8 @@ export const aethexAchievementService = {
const updates: any = {};
if ("total_xp" in (profile as any)) updates.total_xp = newTotalXP;
if ("level" in (profile as any)) updates.level = newLevel;
- if ("loyalty_points" in (profile as any)) updates.loyalty_points = newLoyaltyPoints;
+ if ("loyalty_points" in (profile as any))
+ updates.loyalty_points = newLoyaltyPoints;
if (Object.keys(updates).length > 0) {
await supabase.from("user_profiles").update(updates).eq("id", userId);
@@ -426,7 +441,10 @@ export const aethexAchievementService = {
.single();
if (levelUpAchievement.data) {
- await this.awardAchievement(userId, (levelUpAchievement.data as any).id);
+ await this.awardAchievement(
+ userId,
+ (levelUpAchievement.data as any).id,
+ );
}
}
}
@@ -588,9 +606,12 @@ export const aethexRoleService = {
async setUserRoles(userId: string, roles: string[]): Promise {
try {
const rows = roles.map((role) => ({ user_id: userId, role }));
- const { error } = await supabase.from("user_roles").upsert(rows as any, {
- onConflict: "user_id,role",
- } as any);
+ const { error } = await supabase.from("user_roles").upsert(
+ rows as any,
+ {
+ onConflict: "user_id,role",
+ } as any,
+ );
if (!error) return;
} catch {}
diff --git a/client/lib/aethex-social-service.ts b/client/lib/aethex-social-service.ts
index 977b3f6c..ed18b99d 100644
--- a/client/lib/aethex-social-service.ts
+++ b/client/lib/aethex-social-service.ts
@@ -20,7 +20,8 @@ export const aethexSocialService = {
.from("user_follows")
.select("following_id")
.eq("follower_id", userId);
- if (!error && data) return (data as any[]).map((r: any) => r.following_id);
+ if (!error && data)
+ return (data as any[]).map((r: any) => r.following_id);
} catch {}
try {
const raw = localStorage.getItem("mock_follows");
@@ -40,7 +41,9 @@ export const aethexSocialService = {
} catch {}
const raw = localStorage.getItem("mock_follows");
const map = raw ? JSON.parse(raw) : {};
- const set: string[] = Array.from(new Set([...(map[followerId] || []), followingId]));
+ const set: string[] = Array.from(
+ new Set([...(map[followerId] || []), followingId]),
+ );
map[followerId] = set;
localStorage.setItem("mock_follows", JSON.stringify(map));
},
@@ -56,7 +59,9 @@ export const aethexSocialService = {
} catch {}
const raw = localStorage.getItem("mock_follows");
const map = raw ? JSON.parse(raw) : {};
- const list: string[] = (map[followerId] || []).filter((id: string) => id !== followingId);
+ const list: string[] = (map[followerId] || []).filter(
+ (id: string) => id !== followingId,
+ );
map[followerId] = list;
localStorage.setItem("mock_follows", JSON.stringify(map));
},
diff --git a/client/pages/Admin.tsx b/client/pages/Admin.tsx
index 049f6071..dc1ecb54 100644
--- a/client/pages/Admin.tsx
+++ b/client/pages/Admin.tsx
@@ -3,10 +3,23 @@ import LoadingScreen from "@/components/LoadingScreen";
import { useAuth } from "@/contexts/AuthContext";
import { useEffect } from "react";
import { useNavigate } from "react-router-dom";
-import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+ CardDescription,
+} from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
-import { Shield, UserCog, Rocket, Settings, Users, Activity } from "lucide-react";
+import {
+ Shield,
+ UserCog,
+ Rocket,
+ Settings,
+ Users,
+ Activity,
+} from "lucide-react";
export default function Admin() {
const { user, loading, roles } = useAuth();
@@ -23,7 +36,11 @@ export default function Admin() {
if (loading || !user) {
return (
-
+
);
}
@@ -35,10 +52,14 @@ export default function Admin() {
Access Denied
- You dont have permission to access the admin panel.
+
+ You dont have permission to access the admin panel.
+
- navigate("/dashboard")}>Go to Dashboard
+ navigate("/dashboard")}>
+ Go to Dashboard
+
@@ -54,16 +75,37 @@ export default function Admin() {
Admin Panel
-
Site Owner • Admin • Founder
+
+ Site Owner • Admin • Founder
+
- Site Owner
- Admin
- Founder
+
+ Site Owner
+
+
+ Admin
+
+
+ Founder
+
- navigate("/dashboard")}>Dashboard
- navigate("/profile")}>Profile
+ navigate("/dashboard")}>
+ Dashboard
+
+ navigate("/profile")}>
+ Profile
+
@@ -74,12 +116,15 @@ export default function Admin() {
Access Control
- Owner-only access is enforced by email
+
+ Owner-only access is enforced by email
+
- Owner: mrpiglr@gmail.com
+ Owner:{" "}
+ mrpiglr@gmail.com
All other users are denied access
@@ -92,7 +137,9 @@ export default function Admin() {
Users & Roles
- Future: manage roles, invitations, and status
+
+ Future: manage roles, invitations, and status
+
Coming soon
@@ -108,7 +155,12 @@ export default function Admin() {
Branding, legal, integrations
- navigate("/get-started")}>Open Settings
+ navigate("/get-started")}
+ >
+ Open Settings
+
@@ -138,8 +190,16 @@ export default function Admin() {
Common admin operations
- navigate("/dashboard")}>View Dashboard
- navigate("/onboarding")}>Run Onboarding
+ navigate("/dashboard")}>
+ View Dashboard
+
+ navigate("/onboarding")}
+ >
+ Run Onboarding
+
diff --git a/client/pages/Index.tsx b/client/pages/Index.tsx
index 3e17f226..e69c4bc9 100644
--- a/client/pages/Index.tsx
+++ b/client/pages/Index.tsx
@@ -141,9 +141,9 @@ export default function Index() {
Crafting Digital Realities
- Where vision meets execution. We craft experiences through
- design, development, and community.
-
+ Where vision meets execution. We craft experiences through
+ design, development, and community.
+
@@ -247,8 +247,12 @@ export default function Index() {
-
Everything We Offer
-
Explore services, programs, resources, and community
+
+ Everything We Offer
+
+
+ Explore services, programs, resources, and community
+
@@ -258,7 +262,9 @@ export default function Index() {
Studios and indie support
- Learn More
+
+ Learn More
+
@@ -268,7 +274,9 @@ export default function Index() {
Architecture & delivery
- Learn More
+
+ Learn More
+
@@ -278,7 +286,9 @@ export default function Index() {
Programs and guidance
- Learn More
+
+ Learn More
+
@@ -288,7 +298,9 @@ export default function Index() {
Innovation and R&D
- Learn More
+
+ Learn More
+
@@ -301,8 +313,12 @@ export default function Index() {
- Docs
- Tutorials
+
+ Docs
+
+
+ Tutorials
+
@@ -314,8 +330,12 @@ export default function Index() {
- Community
- Blog
+
+ Community
+
+
+ Blog
+
@@ -327,8 +347,12 @@ export default function Index() {
- About
- Contact
+
+ About
+
+
+ Contact
+
@@ -355,12 +379,36 @@ export default function Index() {
{/* Interactive Technology Grid */}
{[
- { name: "Game Studios", status: "Active", color: "from-purple-500 to-blue-600" },
- { name: "Design Systems", status: "Evolving", color: "from-blue-500 to-green-600" },
- { name: "Creator Tools", status: "Live", color: "from-green-500 to-yellow-600" },
- { name: "Launch Ops", status: "Scaling", color: "from-yellow-500 to-red-600" },
- { name: "Content Pipeline", status: "In Progress", color: "from-red-500 to-purple-600" },
- { name: "Edge Experiences", status: "Deployed", color: "from-purple-500 to-pink-600" },
+ {
+ name: "Game Studios",
+ status: "Active",
+ color: "from-purple-500 to-blue-600",
+ },
+ {
+ name: "Design Systems",
+ status: "Evolving",
+ color: "from-blue-500 to-green-600",
+ },
+ {
+ name: "Creator Tools",
+ status: "Live",
+ color: "from-green-500 to-yellow-600",
+ },
+ {
+ name: "Launch Ops",
+ status: "Scaling",
+ color: "from-yellow-500 to-red-600",
+ },
+ {
+ name: "Content Pipeline",
+ status: "In Progress",
+ color: "from-red-500 to-purple-600",
+ },
+ {
+ name: "Edge Experiences",
+ status: "Deployed",
+ color: "from-purple-500 to-pink-600",
+ },
].map((tech, index) => (
;
+ return (
+
+ );
}
if (!user) return null;
@@ -68,14 +80,28 @@ export default function Network() {
- {profile?.full_name?.[0] || user.email?.[0]?.toUpperCase()}
+
+ {profile?.full_name?.[0] ||
+ user.email?.[0]?.toUpperCase()}
+
-
{profile?.full_name || user.email?.split("@")[0]}
-
{profile?.role || "Member"}
+
+ {profile?.full_name || user.email?.split("@")[0]}
+
+
+ {profile?.role || "Member"}
+
- Level {profile?.level || 1}
- {(profile as any)?.experience_level || "beginner"}
+
+ Level {profile?.level || 1}
+
+
+ {(profile as any)?.experience_level || "beginner"}
+
@@ -83,8 +109,18 @@ export default function Network() {
{profile.bio}
)}
- navigate("/dashboard")}>Edit Profile
- navigate("/onboarding")}>Improve Profile
+ navigate("/dashboard")}
+ >
+ Edit Profile
+
+ navigate("/onboarding")}
+ >
+ Improve Profile
+
@@ -92,25 +128,50 @@ export default function Network() {
Recommendations
- People who align with your interests
+
+ People who align with your interests
+
{recommended.slice(0, 3).map((r) => (
-
{(r.full_name || r.username || "U")[0]}
+
+
+
+ {(r.full_name || r.username || "U")[0]}
+
+
-
{r.full_name || r.username}
-
{r.bio?.slice(0, 40) || "Member"}
+
+ {r.full_name || r.username}
+
+
+ {r.bio?.slice(0, 40) || "Member"}
+
-
toggleFollow(r.id)}>
- {isFollowing(r.id) ? ( Following ) : ( Follow )}
+ toggleFollow(r.id)}
+ >
+ {isFollowing(r.id) ? (
+
+ Following
+
+ ) : (
+
+ Follow
+
+ )}
))}
{recommended.length === 0 && (
- No recommendations yet.
+
+ No recommendations yet.
+
)}
@@ -121,25 +182,53 @@ export default function Network() {
Discover People
- Connect with creators, clients, and members
+
+ Connect with creators, clients, and members
+
{recommended.map((r) => (
-
+
-
{(r.full_name || r.username || "U")[0]}
+
+
+
+ {(r.full_name || r.username || "U")[0]}
+
+
-
{r.full_name || r.username}
-
{r.bio?.slice(0, 80) || "Member"}
+
+ {r.full_name || r.username}
+
+
+ {r.bio?.slice(0, 80) || "Member"}
+
-
toggleFollow(r.id)}>
- {isFollowing(r.id) ? ( Following ) : ( Follow )}
+ toggleFollow(r.id)}
+ >
+ {isFollowing(r.id) ? (
+
+ Following
+
+ ) : (
+
+ Follow
+
+ )}
))}
{recommended.length === 0 && (
-
No people found yet.
+
+ No people found yet.
+
)}