feat: add card generator

This commit is contained in:
xavidop
2025-07-21 13:14:24 +02:00
parent 7695d8c6a7
commit 2bae46ad8d
19 changed files with 1017 additions and 34 deletions
+27
View File
@@ -9,6 +9,8 @@ export interface PokemonCard {
imageDataUrl: string; // data URI of the card image
createdAt: Timestamp;
updatedAt: Timestamp;
isGenerated?: boolean; // Flag to indicate if this is an AI-generated card
prompt?: string; // The prompt used to generate the card (for generated cards)
}
// For AI Scan result, before saving to Firestore
@@ -17,3 +19,28 @@ export interface ScannedCardData {
set?: string;
rarity?: string;
}
// For Pokemon card generation parameters
export interface CardGenerationParams {
pokemonName: string;
pokemonType: string;
isIllustrationRare: boolean;
isHolo: boolean;
backgroundDescription: string;
pokemonDescription: string;
language: 'english' | 'japanese' | 'chinese' | 'korean' | 'spanish' | 'french' | 'german' | 'italian';
hp?: number;
attackName1?: string;
attackDamage1?: number;
attackName2?: string;
attackDamage2?: number;
weakness?: string;
resistance?: string;
retreatCost?: number;
}
export interface GeneratedCard {
imageBase64: string;
prompt: string;
params: CardGenerationParams;
}