Points System Overview
Learners earn points (also called “tokens”) by completing lessons and quizzes. Points can be saved toward reward goals set by their parents, creating a motivating incentive system.Earning Points
Points are awarded automatically when learners demonstrate learning progress.Point Sources
QUIZ_CORRECT - Answering Quiz Questions
QUIZ_CORRECT - Answering Quiz Questions
The primary way to earn points is by answering quiz questions correctly.Base Rate: 1 point per correct answerExample: A 5-question quiz where you get 4 correct = 4 points
LESSON_COMPLETE - Finishing Lessons
LESSON_COMPLETE - Finishing Lessons
Additional points awarded for completing entire lessons.Purpose: Rewards sustained engagement, not just quiz performanceTypical Award: Bonus points on top of quiz performance
ACHIEVEMENT - Unlocking Badges
ACHIEVEMENT - Unlocking Badges
Some achievements come with point bonuses.Examples:
- First lesson completed: Bonus points
- Perfect quiz score: Extra points
- Milestone achievements: Point rewards
ADMIN_ADJUST - Manual Adjustments
ADMIN_ADJUST - Manual Adjustments
Parents or admins can manually award or deduct points.Use Cases:
- Rewarding offline learning
- Correcting errors
- Special bonuses for exceptional effort
Points Service Architecture
Thepoints-service.ts manages all point transactions:
Awarding Points
Transaction Safety: All point awards use database transactions to ensure consistency. If any part fails, the entire operation rolls back.
Getting Balance
Points History
Browsing Rewards Catalog
Parents create rewards that learners can work toward.Viewing Available Rewards
Reward Structure
Goals Page Display
- Goals Tab
- History Tab
Shows all active reward goals with:
- Emoji icon and title
- Progress bar (saved / total needed)
- Percentage complete
- “Save Points” or “Cash Out!” buttons
Point Delegation (Saving Toward Goals)
Learners can move points from their general balance to specific reward goals.Delegation Modal
Preset Amounts
Backend Delegation
Redeeming Rewards
When a learner has saved enough points for a goal, they can request redemption.Redemption Request
Backend Process
Redemption Statuses
PENDING
Initial State: Request submitted, awaiting parent reviewLearner sees: ”⏳ Waiting for parent approval…”
APPROVED
Parent Approved: Reward granted
- Saved points reset to 0
- Learner can earn the same reward again
- Parent notes may be included
Redemption History
Next Steps
Learning Goals
Understand how parents set up reward goals
Achievements
See how achievements can award bonus points