I need to completely overhaul the content system from a static list to a generative system that creates infinite unique cards by mixing templates, authors, facts, and challenges from large pools.
I need to fix several issues. Let me create the random utility and fix the type mismatches.
Now I need to fix the content generators to include labelColor, remove the unused variable, and update the components to match the new interface.
Let me fix the CATEGORY_COLORS to use labelColor instead of color to match the interface:
Now let me update the Card component to match the new interface:
Now update the Feed component to use the new generateCards function:
Now let me check if Hat is referenced in the content.ts file:
The build succeeded! But I realize the fixed-content pools (brain facts, fun facts, etc.) are still limited. Once all items are exhausted, duplicates will slip through. Let me make ALL categories use template-based generation for true infinity.
I need to convert ALL static categories to template-based generation too, just like quotes. Let me rewrite the entire content system:
I need to fix a bug in the fill function - the regex /\{noun(?!\d)\}/g is too broad. Let me fix it:
Now fix the brain/fun fill functions similarly:
I need to add {Adjective} support to the main fill() function:
Good, {Adjective} is already handled. Let me build:
The build works, but I realize dad jokes are limited to 25 fixed items. Let me make them truly infinite too with templates:
Now I need to update the genDadJoke function to use the new arrays:
Build succeeds! Here's what changed:
Truly Infinite Content Engine — Every category now uses template-based generation with massive pools of randomized components:
| Category | Template Combinations |
|---|
| Quotes | 25 templates × 32 actions × 13 contrasts × 15 subjects × 28 nouns × 20 qualities × 55+ authors = billions |
| Brain Boosts | 15 title templates × 20 body templates × multiple topic/adjective pools = thousands |
| Life Lessons | 12 title templates × 20 body templates × 10 wisdom authors = thousands |
| Challenges | 9 title templates × 20 body templates = hundreds |
| Fun Facts | 9 title templates × 25 body templates × 8 topics × 8 adjectives = thousands |
| Dad Jokes | 40 setups × 40 punchlines × 50 wisdom lines = 80,000+ |
Duplicate Prevention — A seenHashes Set tracks every card's content hash. If a generated card duplicates anything previously shown, it retries up to 100 times until it finds a unique one. Combined with the massive combination pools, your dad can scroll forever and never see the same card twice.
Files built: src/data/content.ts, src/utils/random.ts, src/components/Card.tsx, src/components/Feed.tsx