rename to core

This commit is contained in:
2025-12-15 13:46:07 +01:00
parent aedf58643d
commit 5c22f8820c
559 changed files with 415 additions and 767 deletions

View File

@@ -0,0 +1,35 @@
/**
* Port: AvatarGenerationPort
*
* Defines the contract for AI-powered avatar generation.
*/
import type { RacingSuitColor, AvatarStyle } from '../../domain/types/AvatarGenerationRequest';
export interface AvatarGenerationOptions {
facePhotoUrl: string;
prompt: string;
suitColor: RacingSuitColor;
style: AvatarStyle;
count: number;
}
export interface GeneratedAvatar {
url: string;
thumbnailUrl?: string;
}
export interface AvatarGenerationResult {
success: boolean;
avatars: GeneratedAvatar[];
errorMessage?: string;
}
export interface AvatarGenerationPort {
/**
* Generate racing avatars from a face photo
* @param options Generation options including face photo and styling preferences
* @returns Generated avatar URLs
*/
generateAvatars(options: AvatarGenerationOptions): Promise<AvatarGenerationResult>;
}

View File

@@ -0,0 +1,20 @@
/**
* Port: FaceValidationPort
*
* Defines the contract for validating face photos.
*/
export interface FaceValidationResult {
isValid: boolean;
hasFace: boolean;
faceCount: number;
confidence: number;
errorMessage?: string;
}
export interface FaceValidationPort {
/**
* Validate that an image contains exactly one valid face
*/
validateFacePhoto(imageData: string | Buffer): Promise<FaceValidationResult>;
}

View File

@@ -0,0 +1,6 @@
export interface ImageServicePort {
getDriverAvatar(driverId: string): string;
getTeamLogo(teamId: string): string;
getLeagueCover(leagueId: string): string;
getLeagueLogo(leagueId: string): string;
}