Dattavani Backend: Gamification

Dattavani Backend: Gamification A data-flow diagram generated by Archify. 01 / Kid actions 02 / Reward rules 03 / Writers 04 / Stored state 05 / Read surfaces Quiz submit · v2 quiz route · 01 / Kid actions Quiz submit v2 quiz route Lesson finished · chunk completes chapter · 01 / Kid actions Lesson finished chunk completes chapter Home screen open · GET home-stats · 01 / Kid actions Home screen open GET home-stats Story finished · v2 story route · 01 / Kid actions Story finished v2 story route Tataji question · Ask Tataji chat · 01 / Kid actions Tataji question Ask Tataji chat Quiz reward math · per correct + bonuses · 02 / Reward rules · Python Quiz reward math per correct + bonuses Python Epic intro rule · once per chapter · 02 / Reward rules · SQL Epic intro rule once per chapter SQL Daily login rule · once per day · 02 / Reward rules · SQL Daily login rule once per day SQL Story + Tataji XP · daily caps · 02 / Reward rules · Python Story + Tataji XP daily caps Python Badge service · rules + direct award · 03 / Writers Badge service rules + direct award Daily stats RPC · update_daily_stats · 03 / Writers · single writer Daily stats RPC update_daily_stats single writer user_badges · dedup unique index · 04 / Stored state user_badges dedup unique index kid_profiles · coins, XP, level, streak · 04 / Stored state kid_profiles coins, XP, level, streak daily_stats · ring flags + day totals · 04 / Stored state daily_stats ring flags + day totals kid_streaks · app_usage_3_on_3 · 04 / Stored state kid_streaks app_usage_3_on_3 weekly_summary · per ISO week · 04 / Stored state weekly_summary per ISO week Profile stats · get_kid_profile_stats · 05 / Read surfaces Profile stats get_kid_profile_stats Levels path · GET /api/kids/levels · 05 / Read surfaces Levels path GET /api/kids/levels Home stats · get_home_stats_rpc · 05 / Read surfaces Home stats get_home_stats_rpc Leaderboard · get_leaderboard_rpc · 05 / Read surfaces · dense rank Leaderboard get_leaderboard_rpc dense rank score, attempt chapter done first open today story completed questions today score, quiz type coins + XP +5 XP once +5 XP XP + ring flag streak days badge rows badge coins, XP coins, XP, level rings, day totals 3-of-3 streak weekly coins, XP badge count XP, level today's rings effective streak weekly XP rank Legend primary data data store data flow