Step 1: Prompt Vocabulary Generation
This step creates the foundation for the entire image generation pipeline. The backend script serverA.js
uses GPT-4 to generate structured, creative prompt components. These components are inserted into a Supabase table called prompt_components
.
Each inserted row contains exactly 9 fields, grouped to form a complete and coherent image concept. The generation prompt explicitly enforces format and variety. No simulation is done here — this system runs live, continuously, and in production.
How It Works
- GPT-4 is prompted to generate a valid JSON object with these exact keys:
{ "noun1": "...", "noun2": "...", "verb": "...", "adjective1": "...", "adjective2": "...", "style": "...", "setting": "...", "era": "...", "mood": "..." }
- The raw JSON output is parsed and checked for validity. If parsing fails, the output is discarded silently.
- If the result is valid, the script checks Supabase for a duplicate by doing an exact-match lookup across all 9 fields.
- If it is not a duplicate, the row is inserted into the
prompt_components
table. - The process then loops indefinitely, generating a new set every 10 seconds.
Recent Component Sets
Scrambled Wordset
This section mirrors what serverB
does during the generation process. It takes real component sets from your Supabase database and creates a new randomized wordset by sampling one field at a time from across the most recent entries. No new data is generated — this is a combinatorial remix of actual production input, providing insight into how recombination logic drives final output.