The system is built on a relational database utilizing three core tables to separate the English curriculum from target languages and user progress.
iditem_type (vocab/sentence)decadeenglish_texttarget_emojiidconcept_id (Foreign Key)language_code (e.g., 'es')translated_textidconcept_id (Foreign Key)status (locked/active/mastered)hearts (0 to 5)The basic script currently successfully handles the following logic flow:
active cards.+1 heart for a correct answer.mastered and automatically changes the next sequential locked card to active.To turn this basic loop into a fully functional "ugly but testable" trainer for family and friends, we must build the following systems into the Phase 3 script:
Currently, the user_deck is global. If your cousin plays, they overwrite your progress. We need to add a user_id to the deck table so multiple people can log in and have their own distinct saves.
Right now, wrong answers do nothing. We need logic that deducts a heart (or resets to 0) if they get it wrong, forcing them to actually learn it.
Once a card is mastered, it disappears forever. We need a "Review" mechanic that periodically pulls mastered cards back into the active rotation so they don't forget them.
The user should be able to choose: Am I translating Spanish-to-English (reading comprehension), or English-to-Spanish (active recall)?
Endless loops cause burnout. The game needs to serve a specific "Session" (e.g., 10 cards: 7 reviews, 3 new ones) and give a "Session Complete" summary screen with their session stats and accuracy.