-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: None
-
None
-
FLW Mobile App
-
UAT
Goal
Let admins switch the FLW Gamification module (Badges, Monthly Recap, Evening Notifications, My Impact card) ON or OFF for each ASHA. The mobile app reads the flag from the existing user-details API.
Scope (backend)
- Storage: a per-user feature flag, for example table m_user_feature_flag(userID, featureKey, enabled, createdBy, createdDate, modifiedBy, lastModDate, deleted). Optional: a state/district/block default, with a per-user override winning.
- Read: extend GET flw-api/user/getUserDetail (already called at login and on every Home open) with a new optional block in data:
"gamification": { "enabled": true, "badges": true, "monthlyRecap": true, "notifications": true }
- enabled is the master switch for the ASHA. The per-mechanic keys only apply when enabled is true. A missing key is treated as false.
- Leave the block out (or send null) for users who aren't configured. This must be additive: older app versions must not break.
- Write (admin): an API (and Admin UI, if it's in scope) to set the flag for one ASHA, a list of userIds, or a whole block/district. Bulk upload via CSV would help rollout.
- Audit: record who changed the flag and when.
- Optional: if flw-api/badges/* (config/freezes/earned) are built, return 403 or skip them for disabled users.
Acceptance criteria
- getUserDetail returns the gamification block for configured ASHAs and leaves it out otherwise. The existing response shape is unchanged.
- Admin can enable or disable the module for a single ASHA and in bulk. The change shows up in the next getUserDetail call.
- Swagger and API contract shared with the FLW mobile team.
Related
Mobile counterpart in the FLW project (linked). Branch naf_feature_gamification.