This project is a Ruby on Rails application developed for the IKEA Foundation. It is a multi-lingual, interactive game/educational tool where players progress through various stages, making choices or facing "chance" events.
mobility gem for translating content into numerous languages. Supported locales include: en, zh, hr, cs, da, nl, fi, fr, fr-CA, de, hu, it, ja, ko, nb, pl, pt, ro, sr, sk, sl, es, sv, uk.ancestry) for managing pages, stages, and interactive elements.Player model's progress JSONB field.StagesController, featuring:
pg_search integration for content discovery.Node: The central content model. Templates are hierarchy-dependent:
startstagechoice, chancebest, bad, good, game_overPlayer: Tracks session state, progress, current_stage, and score.Asset & Attachment: Handles media and its contextual content (body text, styling) associated with nodes.User: Admin authentication and roles.app/controllers/admin/: Admin backend logic.app/controllers/stages_controller.rb: Main game loop (Flip -> Reveal -> Pick -> Result).app/controllers/site_controller.rb: Content delivery for standard pages.app/models/concerns/: Shared logic for ancestry, attachments, and tags.config/locales/: YAML translation files.