From 669ab329a8661043231836be3e81795cb2224c88 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Wed, 12 Nov 2025 02:57:31 +0000 Subject: [PATCH] Prettier format pending files --- api/ethos/artist-services.ts | 8 +- api/ethos/service-requests.ts | 15 ++- api/ethos/tracks.ts | 11 +- .../ethos/EcosystemLicenseModal.tsx | 68 ++++++---- .../components/nexus/AudioServicesForHire.tsx | 54 ++++++-- .../components/nexus/AudioTracksForSale.tsx | 20 ++- client/pages/Nexus.tsx | 33 +++-- client/pages/ProfilePassport.tsx | 82 ++++++++----- client/pages/ethos/ArtistSettings.tsx | 116 +++++++++++++----- docs/ETHOS-GUILD-COMPLETE-IMPLEMENTATION.md | 36 ++++++ 10 files changed, 325 insertions(+), 118 deletions(-) diff --git a/api/ethos/artist-services.ts b/api/ethos/artist-services.ts index b4a2b14b..d3683a87 100644 --- a/api/ethos/artist-services.ts +++ b/api/ethos/artist-services.ts @@ -13,7 +13,9 @@ export default async function handler(req: any, res: any) { const artistId = query.artist_id; if (!artistId) { - return res.status(400).json({ error: "artist_id query parameter is required" }); + return res + .status(400) + .json({ error: "artist_id query parameter is required" }); } const { data: artist, error: artistError } = await supabase @@ -39,7 +41,9 @@ export default async function handler(req: any, res: any) { if (artistError && artistError.code !== "PGRST116") throw artistError; if (!artist || !artist.for_hire) { - return res.status(404).json({ error: "Artist not found or not available for hire" }); + return res + .status(404) + .json({ error: "Artist not found or not available for hire" }); } return res.json({ diff --git a/api/ethos/service-requests.ts b/api/ethos/service-requests.ts index 4b687717..9d639dda 100644 --- a/api/ethos/service-requests.ts +++ b/api/ethos/service-requests.ts @@ -29,7 +29,8 @@ export default async function handler(req: any, res: any) { if (!artist_id || !service_type || !description) { return res.status(400).json({ - error: "Missing required fields: artist_id, service_type, description", + error: + "Missing required fields: artist_id, service_type, description", }); } @@ -41,7 +42,9 @@ export default async function handler(req: any, res: any) { .single(); if (artistError || !artist || !artist.for_hire) { - return res.status(404).json({ error: "Artist not found or not available for hire" }); + return res + .status(404) + .json({ error: "Artist not found or not available for hire" }); } // Create service request @@ -96,7 +99,9 @@ export default async function handler(req: any, res: any) { if (requester_id) dbQuery = dbQuery.eq("requester_id", requester_id); if (status) dbQuery = dbQuery.eq("status", status); - const { data, error } = await dbQuery.order("created_at", { ascending: false }); + const { data, error } = await dbQuery.order("created_at", { + ascending: false, + }); if (error) throw error; return res.json({ data }); @@ -109,7 +114,9 @@ export default async function handler(req: any, res: any) { const { status, notes } = body; if (!id || !status) { - return res.status(400).json({ error: "Missing required fields: id, status" }); + return res + .status(400) + .json({ error: "Missing required fields: id, status" }); } const { data, error } = await supabase diff --git a/api/ethos/tracks.ts b/api/ethos/tracks.ts index 7f202e86..51c7bebb 100644 --- a/api/ethos/tracks.ts +++ b/api/ethos/tracks.ts @@ -53,10 +53,15 @@ export default async function handler(req: any, res: any) { if (genre) dbQuery = dbQuery.contains("genre", [genre]); if (licenseType) dbQuery = dbQuery.eq("license_type", licenseType); - if (search) dbQuery = dbQuery.or(`title.ilike.%${search}%,description.ilike.%${search}%`); + if (search) + dbQuery = dbQuery.or( + `title.ilike.%${search}%,description.ilike.%${search}%`, + ); - const { data, error, count } = await dbQuery - .range(Number(offset), Number(offset) + Number(limit) - 1); + const { data, error, count } = await dbQuery.range( + Number(offset), + Number(offset) + Number(limit) - 1, + ); if (error) throw error; diff --git a/client/components/ethos/EcosystemLicenseModal.tsx b/client/components/ethos/EcosystemLicenseModal.tsx index e91f2062..004bcc36 100644 --- a/client/components/ethos/EcosystemLicenseModal.tsx +++ b/client/components/ethos/EcosystemLicenseModal.tsx @@ -45,7 +45,8 @@ export default function EcosystemLicenseModal({ 🎵 Welcome to the Ethos Library - Before you upload your first track, please review and accept the Ecosystem License + Before you upload your first track, please review and accept the + Ecosystem License @@ -54,23 +55,28 @@ export default function EcosystemLicenseModal({ - This is a one-time agreement. By contributing to the Ethos Library, you're helping - build a vibrant community of creators. We're transparent about how your work will be - used. + This is a one-time agreement. By contributing to the Ethos + Library, you're helping build a vibrant community of creators. + We're transparent about how your work will be used. {/* License Terms Section */}
-

KND-008: AeThex Ecosystem License

+

+ KND-008: AeThex Ecosystem License +

- What is the Ecosystem License? + + What is the Ecosystem License? +

- The Ecosystem License allows AeThex development teams (specifically our GameForge - arm) to use your track for free in non-commercial projects. This includes: + The Ecosystem License allows AeThex development teams + (specifically our GameForge arm) to use your track for free in + non-commercial projects. This includes:

    @@ -86,7 +92,9 @@ export default function EcosystemLicenseModal({
    • 100% ownership of your music
    • Full credit and attribution
    • -
    • Right to license commercially (outside AeThex ecosystem)
    • +
    • + Right to license commercially (outside AeThex ecosystem) +
    • Ability to use elsewhere without restriction
    @@ -94,24 +102,28 @@ export default function EcosystemLicenseModal({ Commercial Use:

    - If you want to license your track for commercial use (outside our ecosystem), you - can set your own price on the NEXUS marketplace or negotiate directly with clients. + If you want to license your track for commercial use (outside + our ecosystem), you can set your own price on the NEXUS + marketplace or negotiate directly with clients.

    Getting Help:

    - Our CORP arm can help negotiate high-value commercial licenses and connect you with - enterprise clients. + Our CORP arm can help negotiate high-value commercial licenses + and connect you with enterprise clients.


    - Version 1.0 | Effective Date: {new Date().toLocaleDateString()} | For complete - legal terms, see our{" "} - + Version 1.0 | Effective Date: {new Date().toLocaleDateString()}{" "} + | For complete legal terms, see our{" "} + full agreement

    @@ -123,7 +135,9 @@ export default function EcosystemLicenseModal({
@@ -160,7 +178,9 @@ export default function EcosystemLicenseModal({ {allChecked && (
- All terms accepted. Ready to continue. + + All terms accepted. Ready to continue. +
)} diff --git a/client/components/nexus/AudioServicesForHire.tsx b/client/components/nexus/AudioServicesForHire.tsx index 0278ef26..779d8c6f 100644 --- a/client/components/nexus/AudioServicesForHire.tsx +++ b/client/components/nexus/AudioServicesForHire.tsx @@ -10,7 +10,14 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { Search, Star, Clock, DollarSign, CheckCircle, Music } from "lucide-react"; +import { + Search, + Star, + Clock, + DollarSign, + CheckCircle, + Music, +} from "lucide-react"; import { useNavigate } from "react-router-dom"; interface ArtistService { @@ -54,7 +61,9 @@ export default function AudioServicesForHire() { try { setLoading(true); // Fetch artists who are for_hire - const response = await fetch(`/api/ethos/artists?forHire=true&limit=50`); + const response = await fetch( + `/api/ethos/artists?forHire=true&limit=50`, + ); if (response.ok) { const result = await response.json(); const artistsData = result.data || result || []; @@ -102,7 +111,7 @@ export default function AudioServicesForHire() { const matchesSkill = !selectedSkill || artist.skills.some((skill) => - skill.toLowerCase().includes(selectedSkill.toLowerCase()) + skill.toLowerCase().includes(selectedSkill.toLowerCase()), ); const matchesService = @@ -116,7 +125,7 @@ export default function AudioServicesForHire() { // Get all unique skills from artists const allSkills = Array.from( - new Set(artists.flatMap((artist) => artist.skills)) + new Set(artists.flatMap((artist) => artist.skills)), ).sort(); return ( @@ -134,7 +143,10 @@ export default function AudioServicesForHire() {
- setSelectedSkill(val || null)} + > @@ -148,7 +160,10 @@ export default function AudioServicesForHire() { - setSelectedService(val || null)} + > @@ -162,7 +177,10 @@ export default function AudioServicesForHire() { - setMinRating(Number(val))} + > @@ -191,12 +209,16 @@ export default function AudioServicesForHire() { {/* Results Count */}
- {loading ? "Loading..." : `${filteredArtists.length} artist${filteredArtists.length !== 1 ? "s" : ""} available`} + {loading + ? "Loading..." + : `${filteredArtists.length} artist${filteredArtists.length !== 1 ? "s" : ""} available`}
{/* Artists Grid */} {loading ? ( -
Loading artists...
+
+ Loading artists... +
) : filteredArtists.length === 0 ? (
No artists found matching your criteria. Try adjusting your filters. @@ -226,7 +248,9 @@ export default function AudioServicesForHire() {
- {artist.rating.toFixed(1)} + + {artist.rating.toFixed(1)} +
@@ -234,7 +258,9 @@ export default function AudioServicesForHire() { {/* Bio */} {artist.bio && ( -

{artist.bio}

+

+ {artist.bio} +

)} {/* Skills */} @@ -242,7 +268,11 @@ export default function AudioServicesForHire() {

Skills

{artist.skills.slice(0, 3).map((skill) => ( - + {skill} ))} diff --git a/client/components/nexus/AudioTracksForSale.tsx b/client/components/nexus/AudioTracksForSale.tsx index f1a6239a..eb8ace57 100644 --- a/client/components/nexus/AudioTracksForSale.tsx +++ b/client/components/nexus/AudioTracksForSale.tsx @@ -66,7 +66,7 @@ export default function AudioTracksForSale() { if (selectedLicense) params.append("licenseType", selectedLicense); const response = await fetch( - `/api/ethos/tracks?${params.toString()}&limit=20` + `/api/ethos/tracks?${params.toString()}&limit=20`, ); if (response.ok) { const { data } = await response.json(); @@ -116,7 +116,10 @@ export default function AudioTracksForSale() {
- setSelectedGenre(val || null)} + > @@ -130,7 +133,10 @@ export default function AudioTracksForSale() { - setSelectedLicense(val || null)} + > @@ -178,7 +184,9 @@ export default function AudioTracksForSale() { {/* Tracks Grid */} {loading ? ( -
Loading tracks...
+
+ Loading tracks... +
) : sortedTracks.length === 0 ? (
No tracks found. Try adjusting your filters. @@ -239,7 +247,9 @@ export default function AudioTracksForSale() {
- {track.rating || 5.0} + + {track.rating || 5.0} +
diff --git a/client/pages/Nexus.tsx b/client/pages/Nexus.tsx index 77befd0e..47945234 100644 --- a/client/pages/Nexus.tsx +++ b/client/pages/Nexus.tsx @@ -224,18 +224,27 @@ export default function Nexus() { Ethos Guild - Music & Audio Services

- Discover original tracks and hire verified audio artists for composition, SFX design, and sound engineering. Support independent creators and get high-quality audio for your projects. + Discover original tracks and hire verified audio artists for + composition, SFX design, and sound engineering. Support + independent creators and get high-quality audio for your + projects.

{/* Tabs for Tracks & Services */} - + Tracks for Sale - + Hire Artists @@ -248,7 +257,9 @@ export default function Nexus() { Browse Pre-made Music

- Find original tracks available under ecosystem licenses (free for non-commercial use) or commercial licenses (for games, films, content). + Find original tracks available under ecosystem licenses + (free for non-commercial use) or commercial licenses (for + games, films, content).

@@ -261,7 +272,10 @@ export default function Nexus() { Hire Verified Artists

- Work directly with Ethos Guild artists for custom compositions, SFX packs, game scores, and audio production services. Artists set their own prices and maintain full creative control. + Work directly with Ethos Guild artists for custom + compositions, SFX packs, game scores, and audio production + services. Artists set their own prices and maintain full + creative control.

@@ -277,7 +291,8 @@ export default function Nexus() { - Artists keep 80% of licensing revenue. AeThex takes 20% to support the platform and help artists grow. + Artists keep 80% of licensing revenue. AeThex takes 20% to + support the platform and help artists grow. @@ -288,7 +303,8 @@ export default function Nexus() { - Artists retain 100% ownership of their music. License on NEXUS, elsewhere, or both. You decide. + Artists retain 100% ownership of their music. License on + NEXUS, elsewhere, or both. You decide. @@ -299,7 +315,8 @@ export default function Nexus() { - Build your portfolio in the FOUNDATION community before launching on NEXUS. Get mentorship and feedback from peers. + Build your portfolio in the FOUNDATION community before + launching on NEXUS. Get mentorship and feedback from peers.
diff --git a/client/pages/ProfilePassport.tsx b/client/pages/ProfilePassport.tsx index 8747ff6a..65916b5f 100644 --- a/client/pages/ProfilePassport.tsx +++ b/client/pages/ProfilePassport.tsx @@ -22,7 +22,14 @@ import { } from "@/lib/aethex-database-adapter"; import { useAuth } from "@/contexts/AuthContext"; import FourOhFourPage from "@/pages/404"; -import { Clock, Rocket, Target, ExternalLink, Award, Music } from "lucide-react"; +import { + Clock, + Rocket, + Target, + ExternalLink, + Award, + Music, +} from "lucide-react"; import { aethexSocialService } from "@/lib/aethex-social-service"; interface ProjectPreview { @@ -231,20 +238,21 @@ const ProfilePassport = () => { authProfile.username.toLowerCase() === resolvedProfile.username.toLowerCase()); - const [achievementList, interestList, projectList, ethos] = await Promise.all([ - aethexAchievementService - .getUserAchievements(resolvedId) - .catch(() => [] as AethexAchievement[]), - aethexUserService - .getUserInterests(resolvedId) - .catch(() => [] as string[]), - aethexProjectService - .getUserProjects(resolvedId) - .catch(() => [] as ProjectPreview[]), - fetch(`/api/ethos/artists?id=${resolvedId}`) - .then(res => res.ok ? res.json() : { tracks: [] }) - .catch(() => ({ tracks: [] })), - ]); + const [achievementList, interestList, projectList, ethos] = + await Promise.all([ + aethexAchievementService + .getUserAchievements(resolvedId) + .catch(() => [] as AethexAchievement[]), + aethexUserService + .getUserInterests(resolvedId) + .catch(() => [] as string[]), + aethexProjectService + .getUserProjects(resolvedId) + .catch(() => [] as ProjectPreview[]), + fetch(`/api/ethos/artists?id=${resolvedId}`) + .then((res) => (res.ok ? res.json() : { tracks: [] })) + .catch(() => ({ tracks: [] })), + ]); if (cancelled) { return; @@ -428,13 +436,21 @@ const ProfilePassport = () => { {ethosProfile.skills && ethosProfile.skills.length > 0 && (
-

Skills

+

+ Skills +

- {ethosProfile.skills.slice(0, 5).map((skill: string) => ( - - {skill} - - ))} + {ethosProfile.skills + .slice(0, 5) + .map((skill: string) => ( + + {skill} + + ))} {ethosProfile.skills.length > 5 && ( +{ethosProfile.skills.length - 5} more @@ -454,16 +470,26 @@ const ProfilePassport = () => {
{ethosTracks.slice(0, 5).map((track: any) => ( - +
-

{track.title}

+

+ {track.title} +

- {track.genre && track.genre.slice(0, 2).map((g: string) => ( - - {g} - - ))} + {track.genre && + track.genre.slice(0, 2).map((g: string) => ( + + {g} + + ))}
@@ -615,35 +656,44 @@ export default function ArtistSettings() {
-

Pending Review

+

+ Pending Review +

- Your verification request is under review. We'll email you when there's an - update. + Your verification request is under review. We'll email + you when there's an update.

{verificationStatus.submitted_at && (

Submitted:{" "} - {new Date(verificationStatus.submitted_at).toLocaleDateString()} + {new Date( + verificationStatus.submitted_at, + ).toLocaleDateString()}

)}
) : verificationStatus.status === "rejected" ? (
-

Application Rejected

+

+ Application Rejected +

{verificationStatus.rejection_reason && (

{verificationStatus.rejection_reason}

)}

- You can resubmit with updates to your portfolio or qualifications. + You can resubmit with updates to your portfolio or + qualifications.

) : ( <>
- +