Skip to content

Gamification

Spec Source: Document 8 -- Gamification System | Last Updated: Feb 2026

DoCurious uses gamification to motivate real-world experiences, not screen time. The system rewards completing challenges offline, not browsing, clicking, or staying logged in. Everything in the gamification layer -- XP, levels, badges, streaks, leaderboards, and the Journey Map -- exists to celebrate what users do in the real world, and to encourage them to keep exploring.

STATUS: BUILT

Types: src/types/gamification.types.ts (402 lines) + src/types/learningPath.types.ts | Store: src/store/useGamificationStore.ts | API: src/api/gamification.api.ts + gamification.real.api.ts | Components: 13 gamification components including LevelProgress, BadgeCard, BadgeGrid, BadgeCollection, BadgeShowcase, LeaderboardTable, LeaderboardOptIn, NewBadgeModal, LevelUpModal, XPGainToast, StreakDisplay, JourneyMap | Pages: XPHistory, Badges, JourneyMap (all in src/pages/profile/) | Storybook: stories for BadgeCard, BadgeGrid, LevelProgress, StreakDisplay, XPGainToast, LeaderboardTable | School: LearningPathDesigner page in src/pages/school/ | Community: CommunityGoals page + GoalCard + GoalDetail components + useCommunityGoalStore + communityGoal.api.ts | Group: GroupChallenge page in src/pages/challenges/


Philosophy

The gamification system is grounded in Self-Determination Theory (SDT), which identifies three core human needs: autonomy, competence, and relatedness. Every gamification decision maps back to at least one of these:

Human NeedHow DoCurious Satisfies It
AutonomyChoice in what challenges to pursue, Bucket List curation, Dealer's Choice selection
CompetenceClear progression (levels, Journey Map), appropriate difficulty, mastery badges
RelatednessCommunity participation, cooperative goals, celebrating shared achievements

The design priorities are intentionally ordered:

  1. Mastery and Collection (Primary) -- Levels that show personal growth over time. Badges as collectible achievements. Journey Map revealing exploration progress. Learning Paths for structured skill building.
  2. Cooperation (Secondary) -- Community goals everyone contributes to. Group challenges with shared success. Celebrating others' achievements. Partner/buddy completion bonuses.
  3. Competition (Tertiary, Opt-In) -- Leaderboards available but not prominent. Limited visibility (top performers only, not full rankings). Opt-in at school/class level. Never the default experience.

Additional psychological principles applied throughout: collection motivation (badges, category completion, "catch 'em all" instinct), progress visualization (Journey Map, level bars, streak counters), variable rewards (Dealer's Choice card reveals, rare badge surprises), and social proof ("47 people completed this" -- information, not pressure).

Age Considerations

The core gamification system is identical for all ages. The underlying data model is the same regardless of user age. Presentation adapts:

Age GroupEmphasisDe-Emphasis
Under 10Visual rewards, collection, simple progressComplex stats, competition
10--12Mastery progression, streaks, cooperative goalsIndividual rankings
13+Full system access including opt-in leaderboards--

What We Don't Do

These are not accidental omissions. Each is a deliberate design decision grounded in the platform's philosophy of encouraging real-world experiences without creating unhealthy digital habits.

  • No loss mechanics -- Users never lose XP or progress. (One exception: Dealer's Choice abandonment; see XP System below.)
  • No daily login rewards -- No pressure to open the app every day. Streaks are weekly, not daily.
  • No time-limited pressure -- No "complete in 24 hours or lose your chance" mechanics.
  • No public shame -- Never show who is "last place" or struggling. Leaderboards only show the top tier.
  • No pay-to-win -- XP, badges, and progression cannot be purchased.
  • No notification spam -- Gamification events are discovered in-app, not pushed via notifications. Zero push notifications for any gamification event.

XP System

STATUS: BUILT

Types: XPEvent, XPTransaction, XPEventType, XP_VALUES constant in src/types/gamification.types.ts | Store actions: fetchStats, refreshXp in useGamificationStore | API: addXPEvent, getUserTotalXP, getXPEvents in gamification.api.ts | Components: XPGainToast (animated +XP notification), LevelProgress (progress bar) | Page: XPHistory (full ledger view with running balance)

XP (Experience Points) is the primary progression currency. It accumulates over time and never decreases (with one exception). XP is always tied to real-world activity that has been verified.

XP Earning Events

EventBase XPNotes
Challenge completed (verified)By difficultySee difficulty table below
Milestone completedProportionalTotal challenge XP / milestone count
First challenge ever+100 bonusWelcome reward
First challenge in a category+50 bonusEncourages breadth
Dealer's Choice completionBase x DC multiplier1.5x--2.0x per card type
Learning Path checkpoint+25 bonusAt designated path milestones
Learning Path completed+100 bonusFinishing entire path
Community goal contribution+25 bonusWhen community goal is met
Group challenge completion+25 bonusWhen all group members complete
Streak milestone+25 to +500At 2, 4, 8, 12, 26, 52 weeks

What does NOT earn XP: Logging in, browsing or searching, time spent on platform, social actions (comments, thumbs up), adding to Bucket List.

Difficulty-Based XP

Challenge creators set difficulty. DoCurious staff may adjust if miscategorized.

DifficultyBase XP
Beginner50 XP
Intermediate100 XP
Advanced200 XP

XP Multipliers

Multipliers stack as noted. Dealer's Choice multipliers are exclusive of each other (you can only have one DC multiplier at a time), but streak and Learning Path multipliers stack on top.

ConditionMultiplierStacks
Dealer's Choice: Comfort Push1.5xNo (DC multipliers exclusive)
Dealer's Choice: Rarely Tried1.75xNo
Dealer's Choice: Uncharted2.0xNo
Active streak (4+ weeks)1.1xYes
Active streak (12+ weeks)1.2xYes (replaces 1.1x)
Learning Path challenge1.1xYes

Example: An Intermediate challenge (100 XP) dealt via DC Uncharted (2.0x) with a 12-week streak (1.2x): 100 x 2.0 x 1.2 = 240 XP.

Diminishing Returns on Repeats

To encourage variety over farming, repeating the same challenge earns progressively less XP:

Completion #XP Earned
1st100%
2nd50%
3rd25%
4th+10% (floor)

Users can still repeat challenges; they just earn less XP each time.

XP Display

  • Dashboard: Current XP and level progress bar
  • Profile: Total XP, current level
  • On completion: "+X XP" animation (rendered by XPGainToast component)
  • History: Full viewable log of XP-earning events with running balance (the XPHistory page)

No Negative XP (General Rule)

XP only increases. Users cannot lose accumulated XP.

Exception -- Dealer's Choice abandonment: DC challenges use symmetric XP penalties as specified in Explore & Discovery. When a user abandons a DC challenge, they lose the XP they would have gained. This is the only mechanism in the platform where XP can decrease. The penalty is intentional: the risk/reward symmetry makes the DC choice meaningful and prevents abuse (dealing repeatedly until getting an easy challenge).

Under-13 exception to the exception: Under-13 users playing "Practice DC" do not receive abandonment penalties (XP cannot go negative for minors).


Levels and Progression

STATUS: BUILT

Types: LevelDefinition, LEVEL_DEFINITIONS constant (15 levels), MAX_LEVEL, calculateLevel(), calculateXpProgress() in src/types/gamification.types.ts | Store: currentLevel, xpProgress, totalXp in useGamificationStore | Components: LevelProgress (progress bar with level badge), LevelUpModal (celebration with confetti)

Levels provide long-term progression and status. They are recognition-based, not feature gates. Every user starts at Level 1 (Newcomer) and progresses through 15 named levels.

The 15 Levels

LevelTitleXP RequiredCumulative XP
1Newcomer00
2Curious100100
3Explorer250350
4Adventurer500850
5Pathfinder7501,600
6Trailblazer1,0002,600
7Pioneer1,5004,100
8Voyager2,5006,600
9Wayfinder3,50010,100
10Discoverer5,00015,100
11Seeker7,00022,100
12Ranger10,00032,100
13Champion15,00047,100
14Master20,00067,100
15Legend30,00097,100

Beyond Level 15: Continue with "Legend II," "Legend III," etc. at 30,000 XP increments.

Pacing rationale: Level 2 takes about 2 Beginner challenges (a quick first win). Level 5 requires roughly 20 challenges (a consistent month of activity). Level 10 takes about 100 challenges (a dedicated user over several months). Level 15 requires 500+ challenges (a long-term committed user).

Level-Up Experience

When a user reaches a new level, the LevelUpModal component fires with:

  • Celebration modal with confetti animation using Scout Green (#2D5016) and Brass Gold (#C49B2A) brand colors
  • New title revealed: "You've become a [Title]!"
  • Level badge added to collection
  • Optional prompt to share the achievement
  • No push notification (discovered in-app only)

Level Display

Level is shown in multiple contexts: profile (level badge and title), Track Record cards (small level indicator), community feeds (level visible on posts), and challenge galleries (level shown on featured TRs).

Level Unlocks

DECISION PENDING

The level unlock model is under review. Three options are being evaluated.

OptionDescriptionTradeoff
A: Recognition OnlyLevels are status/achievement markers. All features available from start.Simplest, most inclusive
B: Cosmetic UnlocksProfile customization unlocks at levels (frames, colors, themes). All functionality still available.Adds reward feeling without barriers
C: Feature UnlocksCertain features require minimum level (e.g., Dealer's Choice at Level 3).Creates "grind to unlock" dynamic. May frustrate new users.

Badges

STATUS: BUILT

Types: Badge, UserBadge, BadgeCategory (9 values), BadgeRarity (5 tiers) in src/types/gamification.types.ts | Store: allBadges, userBadges, newBadgeEarned, fetchAllBadges, fetchUserBadges, checkForNewBadges in useGamificationStore | API: getAllBadges, getUserBadges, awardBadge, checkAndAwardBadges in gamification.api.ts | Components: BadgeCard (rarity-styled single badge), BadgeGrid (grid with earned/locked states), BadgeCollection (full collection with category filters and detail modal), BadgeShowcase (profile top-5 showcase), NewBadgeModal (celebration with confetti) | Page: Badges in src/pages/profile/ | Mock data: 12 default badges seeded in gamification.api.ts

Badges are collectible achievements -- trophies that recognize specific accomplishments. The badge system is designed around the "catch 'em all" collection instinct.

Badge Categories

There are 7 main categories plus 2 special types (9 total values in BadgeCategory):

1. Milestone Badges -- Earned for reaching completion counts.

BadgeCriteriaRarity
First StepsComplete 1 challengeCommon
Getting StartedComplete 5 challengesCommon
Double DigitsComplete 10 challengesCommon
Quarter CenturyComplete 25 challengesUncommon
Half CenturyComplete 50 challengesUncommon
Century ClubComplete 100 challengesRare
BicentennialComplete 200 challengesRare
High AchieverComplete 500 challengesEpic

2. Category Mastery Badges -- Earned for exploring and mastering categories. Each category gets its own badge tier.

BadgeCriteriaRarity
[Category] Curious1 completion in categoryCommon
[Category] Explorer5 completions in categoryUncommon
[Category] Enthusiast15 completions in categoryRare
[Category] Master30 completions in categoryEpic

3. Breadth Badges -- Earned for exploring across categories.

BadgeCriteriaRarity
Variety SeekerComplete challenges in 3 categoriesCommon
Well-RoundedComplete challenges in 5 categoriesUncommon
Renaissance SoulComplete challenges in all categoriesRare
Category CompletionistReach "Explorer" in all categoriesEpic

4. Streak Badges -- Earned for consistent weekly activity.

BadgeCriteriaRarity
Getting Regular2-week streakCommon
Steady Pace4-week streakUncommon
Dedicated8-week streakRare
Committed12-week streakRare
Marathon Runner26-week streakEpic
Year of Curiosity52-week streakLegendary

5. Dealer's Choice Badges -- Earned through DC participation.

BadgeCriteriaRarity
Card SharkComplete 5 DC challengesUncommon
Dealer's FavoriteComplete 15 DC challengesRare
High RollerComplete 5 Uncharted DC challengesRare
All InComplete 50 DC challengesEpic

6. Learning Path Badges -- Earned through path completion.

BadgeCriteriaRarity
Path FinderComplete 1 Learning PathUncommon
Path WalkerComplete 3 Learning PathsRare
Path MasterComplete 10 Learning PathsEpic
[Path-Specific]Complete a specific pathVaries

7. Cooperation Badges -- Earned through community participation.

BadgeCriteriaRarity
Team PlayerContribute to 1 community goalCommon
Community ChampionContribute to 5 community goalsUncommon
Group FinisherComplete 3 group challengesUncommon
Reliable PartnerComplete 10 group challengesRare

Special Badges -- Limited or unique circumstances.

BadgeCriteriaRarity
Early AdopterJoin during launch periodLegendary
Challenge CreatorHave user-created challenge approvedRare
InspirationHave TR featured in challenge galleryRare
HelpfulReceive 100 total thumbs-up on TRsRare

Challenge-Specific Badges -- Some challenges award unique badges on completion (defined by the challenge creator).

Badge Rarity

Rarity determines both the visual presentation and the XP bonus awarded when earned.

RarityVisualXP BonusTypical Criteria
CommonBronze border+10 XPEarly milestones, easy to achieve
UncommonSilver border+25 XPModerate effort
RareGold border+50 XPSignificant dedication
EpicPurple border, subtle glow+100 XPExceptional achievement
LegendaryPrismatic/rainbow, animated+250 XPExtremely rare or limited

The BadgeCard component renders these rarity tiers with distinct colors (gray, green, blue, purple, yellow) and glow effects that intensify with rarity.

Badge Display

Profile showcase: Users select up to 5 badges to display prominently (rendered by BadgeShowcase). The full collection is viewable in the "My Badges" tab (rendered by BadgeCollection), organized by category and sortable by date earned or rarity. Unearned badges are shown as locked silhouettes with criteria.

Badge detail view (via the modal in BadgeCollection): Badge image, name, description, date earned, rarity, how many users have it, source (which challenge/action earned it), and a "How to earn" section for unearned badges.

Badge notifications: In-app celebration via NewBadgeModal when earned (confetti, rarity-colored gradient header, XP bonus display). Added to collection immediately. No push notifications for badges. Optional sharing prompt.

Design Decisions on Badges

  • Badge trading/gifting: No. Badges are personal achievements and cannot be traded or gifted to other users.
  • Assigned vs. self-chosen XP: Challenges assigned by a school or teacher award the same XP as challenges the user selects independently. There is no XP distinction based on how a challenge was initiated.

Journey Map

STATUS: BUILT

Component: JourneyMap in src/components/gamification/JourneyMap.tsx | Page: JourneyMap in src/pages/profile/JourneyMap.tsx | Data: categoryCounts from UserGamificationStats type; currently uses hardcoded mock data in page | 12 territory regions defined

The Journey Map is a visual representation of exploration across all challenge categories -- the centerpiece of the mastery/collection experience.

Concept

A stylized map where each region represents a challenge category. The core appeal is watching the map fill in over time -- the satisfaction of revealing new territory and developing mastery.

Region States

StateCriteriaVisual
Unexplored0 completionsDense fog, only silhouette. Lock icon. Dimmed to 50% opacity.
Discovered1+ completionsFog clearing, terrain visible. Completion count shown.
Explored5+ completionsFull terrain, landmarks appear.
Advanced15+ completionsRich detail, special features.
Mastered30+ completionsGolden border, "Mastered" banner. Checkmark icon.

The current JourneyMap component implements Unexplored, Discovered (1+ completions), and Mastered (5+ completions) states as a grid of territory cards. Each territory has an emoji, name, color, and completion count.

STATUS: PARTIAL

The current implementation uses a flat grid layout with emoji icons and basic fog/reveal. The spec envisions a richer stylized world map with interconnected territories, zoom levels (zoomed-out full map vs. zoomed-in single region), individual challenge markers within regions, and pulsing indicators for in-progress challenges. The 5-tier region state system (Unexplored/Discovered/Explored/Advanced/Mastered) is partially implemented -- the component currently treats 5+ completions as "Mastered" rather than the spec's 30+ threshold. Integration with real category data from the backend is pending.

Map Interactions

Tap/click a region shows: Region name and category, completion count and progress to next tier, "Explore This Category" button (filters Explore page), and list of completed challenges in the region.

Zoom levels: Zoomed out shows the entire map with overall exploration progress. Zoomed in shows a single region with individual challenge markers.

Progress stats: "X of Y regions discovered," "X regions explored, Y regions mastered," and percentage of total map revealed.

Integration with Other Features

  • Dealer's Choice: DC "Uncharted" cards highlight unexplored regions. Completing Uncharted DC triggers a map reveal animation.
  • Best Fit algorithm: Can suggest challenges to fill in map gaps. "Discover a new region" option in recommendations.
  • Badges: Category badges appear as landmarks when earned. "Reveal the whole map" is an implicit collection goal.

Weekly Streaks

STATUS: BUILT

Types: STREAK_CONFIG constant (grace period + milestone thresholds) in src/types/gamification.types.ts | Store: currentStreak in useGamificationStore | API: calculateStreak() function in gamification.api.ts (uses ISO week keys for consecutive-week tracking) | Component: StreakDisplay (flame icon with color intensity based on streak length)

Streaks reward consistent activity without creating daily pressure.

Streak Definition

A streak is maintained by completing at least one challenge per week (7-day rolling window).

Why weekly, not daily: Real-world challenges take time. It respects that users have lives outside the app, reduces anxiety and guilt, and aligns with the "off-screen first" principle.

How it works: User completes a challenge. A 7-day window begins. Complete another challenge within 7 days to continue the streak. Streak count equals consecutive weeks with at least one completion.

Streak Rewards

MilestoneBonus XPBadgeOngoing Multiplier
2 weeks+25 XPGetting Regular--
4 weeks+50 XPSteady Pace1.1x on completions
8 weeks+75 XPDedicated1.1x
12 weeks+100 XPCommitted1.2x
26 weeks+150 XPMarathon Runner1.2x
52 weeks+500 XPYear of Curiosity1.2x (cap)

The StreakDisplay component uses color intensity to reflect streak length: gray for under 4 weeks, yellow from 4 weeks, orange from 12 weeks, and red from 26 weeks. The flame icon uses a CSS flicker animation when the streak is active.

Streak Forgiveness

Grace period: If the 7-day window expires, the user has an additional 3 days to complete a challenge and save their streak. The messaging is: "Your streak is at risk! Complete a challenge by [date] to keep it going." The grace period can only be used once per streak (resets after a completion).

DECISION PENDING

Streak freeze mechanic: Under review as part of the broader gamification strategy evaluation. A freeze would allow users to "bank" freeze days to preserve a streak during vacations or unavoidable breaks. The grace period above is sufficient for the initial implementation.

Streak Display

Current streak is prominently shown on the dashboard. The streak flame icon grows at milestones. "Streak at risk" warning appears when in the grace period (in-app only, no push). Longest streak ever is recorded on the profile.

Streak Break

If a streak breaks: Gentle message -- "Your streak ended at X weeks. Start a new one today!" No punishment, shame, or loss of anything already earned. Previous streak badges remain (you cannot un-earn a badge). Longest streak stat is preserved.


Learning Paths

STATUS: BUILT

Types: LearningPath, UserPathProgress, PathCheckpoint, PathStatus, UserPathStatus in src/types/learningPath.types.ts | Page: LearningPathDesigner in src/pages/school/LearningPathDesigner.tsx (drag-and-drop builder with search, category filters, step reordering, required/optional toggle, teacher notes) | Mock data: sample "Science Explorers -- 5th Grade" path with 5 steps

Learning Paths are curated challenge sequences for structured progression.

Path Types

Platform Paths -- Created by DoCurious staff. Available to all users. Featured in Explore. Examples: "Outdoor Explorer: Backyard to Backcountry" (12 challenges, Beginner to Advanced), "Kitchen Fundamentals" (8 challenges, cooking skills progression), "Creative Maker Journey" (10 challenges), "Family Adventure Series" (6 challenges, designed for parent-child).

School Paths -- Created by School Admins or teachers. Visible within school context only. Examples: "5th Grade Science Curriculum" (semester-long), "Summer Reading Challenge" (8-week program), "After-School STEM Club" (year-long progression).

Path Structure

FieldRequiredDescription
TitleYesMax 100 characters
DescriptionYesWhat users will learn/experience (max 500 chars)
Cover imageYesVisual representation
ChallengesYesOrdered list of 4--20 challenges
Ordering modeYesRecommended (any order) or Strict (sequential)
CheckpointsNoMilestones with bonus XP
Estimated durationYes"4 weeks," "One semester," etc.
Path badgeNoUnique badge awarded on completion

Path Progression

Recommended ordering (default): All challenges visible from start. Suggested sequence shown but not enforced. User can complete in any order.

Strict ordering: Next challenge unlocks only after previous is verified. Progress shown as a linear path with "You are here" marker. School paths often use strict ordering for curriculum purposes.

Progress tracking: Progress bar showing X of Y challenges completed. Checkpoints award bonus XP when reached. Completion requires all challenges verified.

Starting and Managing Paths

Starting a path: Discover path in Explore (or receive as school assignment), click "Start This Path," path appears in "My Paths" on dashboard, first challenge (or all) ready to begin.

Abandoning a path: User can abandon incomplete paths at any time. No penalty -- completed challenges still count and XP is retained. Can re-start later from scratch.

Path completion: All challenges verified, path badge awarded (if defined), +100 XP bonus, path marked "Completed" on profile.

Path Creation (School Context)

STATUS: BUILT

The LearningPathDesigner page provides a full drag-and-drop builder with challenge search, category filtering, step reordering (up/down), required/optional toggle per step, teacher notes per step, path stats (total steps, total XP, estimated hours, required count), and draft/published/archived status.

Teachers and SAs can create paths: navigate to "Create Learning Path" in dashboard, enter title, description, and cover image, add challenges from library (search/browse), set ordering mode and checkpoints, optionally assign to classes, path available to assigned students.

Editing paths: Can edit before anyone enrolls. After enrollment, can add to the end but cannot remove or reorder.

Design decision -- School path approval: No -- schools are trusted to create appropriate learning paths without DoCurious staff approval.


Cooperative Social Features

STATUS: BUILT

Community Goals: CommunityGoals page in src/pages/communities/, GoalCard and GoalDetail components in src/components/community/, useCommunityGoalStore in src/store/, communityGoal.api.ts + communityGoal.real.api.ts in src/api/, types in src/types/communityGoal.types.ts | Group Challenges: GroupChallenge page in src/pages/challenges/

Social gamification emphasizes contribution over competition.

Community Goals

A community sets a collective target that all members contribute to. Example: "Our community will complete 100 challenges this month!"

FieldDescription
TitleGoal name
TargetNumeric (completions, XP, or category-specific)
DurationStart and end dates
EligibilityWhich challenges count (all, category, specific list)
RewardXP bonus and/or badge for contributors
Minimum participationCompletions required to receive reward (default: 1)

Progress: Visible progress bar in community feed ("73 of 100 -- keep going!"). Recent contributor names shown (celebration, not ranking). Milestone announcements ("Halfway there!").

Completion: When goal is met, celebration in community feed. All contributors meeting minimum participation get the reward. Community earns bragging rights / community badge.

Group Challenges

A group of users commits to complete the same challenge together.

How it works: User initiates group challenge, selects a challenge. Invites 1--4 friends/community members. All participants see shared progress. When all complete: everyone gets +25 XP group bonus. If some complete and others don't: completers get normal XP, no penalty for non-completers.

Visibility: Shared progress visible to group members. Can cheer each other on in group chat (simple, not full messaging). Completion celebrated together.

Difference from Group DC: Group DC (see Explore & Discovery) is a specific Dealer's Choice variant with card dealing. Group Challenges work with any challenge.

Celebration Moments

When users achieve milestones, shareable celebration cards are created:

  • Level up: "I just became an Adventurer on DoCurious!"
  • Badge earned: Card with badge image and how it was earned
  • Path completed: Card with path name and duration
  • Streak milestone: "12 weeks and counting!"

Sharing is always user-initiated, never auto-posted. Users can share to communities or export as an image for external sharing (social media, messaging).

Social Proof in Discovery

Gamification data informs challenge discovery without pressure: "47 people completed this" (validation), "Trending: 23 completions this week" (momentum), "Popular with Explorers" (level-based affinity), community feed showing what others are doing. This is information, not ranking or competition.


Leaderboards (Opt-In)

STATUS: BUILT

Types: LeaderboardEntry in src/types/gamification.types.ts | Store: leaderboard, leaderboardType, fetchLeaderboard in useGamificationStore | API: getLeaderboard in gamification.api.ts (supports xp/challenges/streak ranking) | Components: LeaderboardTable (ranked list with avatars, top-3 highlighting, current user highlighting), LeaderboardOptIn (settings panel with granular visibility controls, display name options, public/community/school/global toggles)

Leaderboards exist for users who want competitive motivation, but are not the default experience.

Design Principles

  • Not prominent: Leaderboards are a feature to seek out, not a homepage element.
  • Top performers only: Show top 10--20, not full rankings.
  • No shame: Users outside the top tier see their own score, not their rank among lower performers.
  • Opt-in at school level: SAs decide whether leaderboards are visible to students.
  • Time-bounded: Monthly resets prevent permanent hierarchies.

Leaderboard Types

LeaderboardScopeDefault State
Platform: Monthly XPAll users platform-wideVisible (opt-in to view)
Dealer's Choice: MonthlyDC participantsVisible to DC participants
School: MonthlyStudents in schoolSA controls (default: off)
Class: MonthlyStudents in classTeacher controls (default: off)
Community: MonthlyCommunity membersCreator controls (default: off)

Age separation: Platform-wide leaderboards separate under-13 and 13+. School/class leaderboards do not separate (same community context).

What Users See

Top performers: Names, levels, XP earned this period (rank 1--10 or 1--20). The LeaderboardTable component highlights the top 3 with colored rank badges (gold, silver, bronze).

Own position: "Your XP: 1,234" -- shown regardless of rank. The current user's row is highlighted with a blue background and a "You" badge.

What is NOT shown: Full rankings below top tier. "You're #47 of 200" for non-top users. Who is at the bottom. Comparative language ("You're behind Sarah by 50 XP").

Leaderboard Opt-In Settings

The LeaderboardOptIn component provides granular controls:

  • Master toggle: Show me on public leaderboards (yes/no)
  • Granular controls (when opted in): Show on community leaderboards, Show on school leaderboards, Show on global leaderboards
  • Display name: Choose between real name, username, or anonymous
  • When opted out: Informational panel explaining that progress is still tracked privately, and the user can opt back in at any time

Design decision -- Student leaderboard opt-out: All users (not just students) can opt in or out of leaderboards at any time from their gamification settings.

School Leaderboard Configuration

SAs configure in School Settings:

SettingOptionsDefault
School leaderboard visibleYes / NoNo
Class leaderboards visibleYes / NoNo
Who can seeStudents only / Students + Parents / AllStudents only
Display top N10 / 20 / 5010

Teacher override: Teachers can enable class leaderboards for their classes even if school-wide is disabled, with SA permission.

Where to Find Leaderboards

Leaderboards are found in: user Profile ("Leaderboards" tab), Community ("Leaderboard" section, if enabled), School Dashboard ("Leaderboard" section, if enabled). They are NOT on the home dashboard or primary navigation.


Anti-Gaming Measures

The system prevents exploitation while keeping the experience positive.

Verification Requirement

XP is only awarded for verified Track Records. Submission alone does not earn XP. See Track Records & Verification for the verification flow.

Rate Limits

LimitValuePurpose
Verifications per day10Prevent mass-submission
DC rounds per week5Prevent DC farming
Streak XP multiplier cap1.2xLimit streak advantage

These constants are defined in RATE_LIMITS in src/types/gamification.types.ts.

Quality over Quantity

Track Record verification considers quality (meaningful entries, appropriate documentation). Low-effort TRs may be rejected.

Monitoring

Staff can review suspicious patterns: unusually rapid completions, repeated easy challenges, bot-like behavior. Manual review and adjustment are available. Users can be warned or have XP frozen if abuse is confirmed.


Notifications

No push notifications for any gamification event. Everything is discovered in-app.

EventChannelTiming
XP earnedIn-app animation (XPGainToast)Immediate
Level upIn-app celebration (LevelUpModal)Immediate
Badge earnedIn-app celebration (NewBadgeModal)Immediate
Streak at riskIn-app banner2 days before expiry
Streak brokenIn-app messageOn next login after expiry
Path checkpointIn-app celebrationImmediate
Path completedIn-app celebrationImmediate
Community goal milestoneCommunity feedOn milestone
Community goal achievedIn-app notificationImmediate
Group challenge updateIn-app notificationWhen groupmate completes

Roles and Permissions

ActionGeneral UserStudentParentTeacherSchool AdminPlatform Admin
Earn XP and badgesYesYesYesYes----
View own stats and XP historyYesYesYesYesYesYes
Manage badge showcase (select 5)YesYesYesYes----
View Journey MapYesYesYesYes----
Opt in/out of leaderboardsYesYesYesYes----
View leaderboardsYesIf SA enablesVia studentIf SA enablesYesYes
Create Learning Paths------YesYesYes
Assign Learning Paths to classes------YesYes--
Create community goalsYes (if community creator)----YesYesYes
Enable/disable school leaderboards--------YesYes
Configure level definitions----------Yes
Manage badge library----------Yes
Manage platform paths----------Yes
Set XP values and multipliers----------Yes
Adjust anti-gaming thresholds----------Yes
Review suspicious XP patterns----------Yes

Constraints and Limits

ConstraintValueSource
Maximum level (standard)15 (Legend)MAX_LEVEL constant
XP for Level 1597,100 cumulativeLEVEL_DEFINITIONS
Prestige levels beyond 1530,000 XP eachSpec Doc 8 Section 3.1
Badge showcase slots5BadgeCollection maxShowcase prop
Streak window7 daysSTREAK_CONFIG
Grace period3 daysSTREAK_CONFIG.gracePeriodDays
Grace period uses per streak1Spec Doc 8 Section 6.3
Max streak multiplier1.2xRATE_LIMITS.max_streak_multiplier
Max verifications per day10RATE_LIMITS.max_verifications_per_day
Max DC rounds per week5RATE_LIMITS.max_dc_rounds_per_week
Learning Path challenges4--20Spec Doc 8 Section 7.2
Group challenge members1--4 inviteesSpec Doc 8 Section 8.2
Leaderboard top N (default)10getLeaderboard default
Monthly leaderboard resetMonthlySpec Doc 8 Section 9.1
Repeat XP floor10% of baseXP_VALUES.repeat_multiplier
Celebration animationsUser can disableAccessibility setting

Design Decisions

These decisions have been resolved and are documented in the spec:

DecisionResolutionRationale
Dealer's Choice penaltiesXP loss for DC abandonment is confirmed. Sole exception to "No Negative XP" rule. Under-13 exempt.Risk/reward symmetry makes the DC choice meaningful and prevents abuse.
Leaderboard defaultsDefault to off. Users and schools must opt in.Avoids unintended competitive pressure, especially for younger users.
Streak freezeUnder review. Grace period is sufficient for initial implementation.Need more data on user behavior before deciding.
School path approvalNo staff approval needed. Schools are trusted.Reduces friction for educators.
Badge trading/giftingNot allowed. Badges are personal achievements.Preserves meaning of individual accomplishment.
Assigned vs. self-chosen XPSame XP regardless of how challenge was initiated.No perverse incentive to avoid school assignments.
Student leaderboard opt-outAll users can opt in or out at any time.Respects user autonomy across all roles and ages.

Technical Implementation

Key Files

PurposeFile Path
Types -- Gamificationsrc/types/gamification.types.ts
Types -- Learning Pathssrc/types/learningPath.types.ts
Types -- Community Goalssrc/types/communityGoal.types.ts
Store -- Gamificationsrc/store/useGamificationStore.ts
Store -- Community Goalssrc/store/useCommunityGoalStore.ts
API -- Gamification (mock)src/api/gamification.api.ts
API -- Gamification (real)src/api/gamification.real.api.ts
API -- Community Goals (mock)src/api/communityGoal.api.ts
API -- Community Goals (real)src/api/communityGoal.real.api.ts

Components

ComponentFile PathDescription
LevelProgresssrc/components/gamification/LevelProgress.tsxXP progress bar with level badge. Sizes: sm/md/lg.
BadgeCardsrc/components/gamification/BadgeCard.tsxSingle badge with rarity styling and earned/locked states.
BadgeGridsrc/components/gamification/BadgeGrid.tsxGrid of badges. Filters, sorts earned-first, rarity ordering.
BadgeCollectionsrc/components/gamification/BadgeCollection.tsxFull collection with category filter tabs and detail modal.
BadgeShowcasesrc/components/gamification/BadgeShowcase.tsxProfile top-5 showcase with tier-based styling and tooltips.
NewBadgeModalsrc/components/gamification/NewBadgeModal.tsxCelebration modal with confetti and rarity gradients.
LevelUpModalsrc/components/gamification/LevelUpModal.tsxLevel-up celebration with confetti, Scout Green/Brass Gold branding.
XPGainToastsrc/components/gamification/XPGainToast.tsxAnimated "+X XP" toast with shimmer effect.
StreakDisplaysrc/components/gamification/StreakDisplay.tsxStreak counter with flame icon and color intensity.
JourneyMapsrc/components/gamification/JourneyMap.tsxCategory exploration grid with territory states.
LeaderboardTablesrc/components/gamification/LeaderboardTable.tsxRanked user list with top-3 highlighting.
LeaderboardOptInsrc/components/gamification/LeaderboardOptIn.tsxSettings panel for leaderboard visibility controls.
GoalCardsrc/components/community/GoalCard.tsxCommunity goal progress card.
GoalDetailsrc/components/community/GoalDetail.tsxCommunity goal detail view.

Pages

PageFile PathDescription
XPHistorysrc/pages/profile/XPHistory.tsxFull XP ledger with filters, running balance, and level summary.
Badgessrc/pages/profile/Badges.tsxBadge collection with showcase selector.
JourneyMapsrc/pages/profile/JourneyMap.tsxFull-page Journey Map view.
LearningPathDesignersrc/pages/school/LearningPathDesigner.tsxDrag-and-drop path builder for teachers/SAs.
CommunityGoalssrc/pages/communities/CommunityGoals.tsxCommunity goal management page.
GroupChallengesrc/pages/challenges/GroupChallenge.tsxGroup challenge creation and tracking.

Constants and Utilities

The src/types/gamification.types.ts file exports several critical constants and functions:

  • LEVEL_DEFINITIONS -- Array of 15 LevelDefinition objects with level number, name, minXp, maxXp, and color.
  • MAX_LEVEL -- 15
  • XP_VALUES -- Object with all base XP values, multipliers, penalties, and badge XP bonuses.
  • RATE_LIMITS -- Anti-gaming rate limits.
  • STREAK_CONFIG -- Grace period days and milestone thresholds with XP bonuses.
  • calculateLevel(xp) -- Returns the LevelDefinition for a given cumulative XP total.
  • calculateXpProgress(xp) -- Returns { progress, toNext } with percentage and XP remaining.

Database Schema (Backend)

The backend PostgreSQL schema (from the spec) includes these tables: user_progression, xp_events, user_badges, badges, user_streaks, learning_paths, learning_path_challenges, user_path_enrollment, community_goals, community_goal_contributions, group_challenges, group_challenge_members, level_definitions, leaderboard_settings, leaderboard_snapshots. All IDs are UUIDs. All timestamps in UTC. The adapter layer in src/adapters/ handles SQL-to-FE type mapping.


  • Challenge System -- Challenges are the core content that generates all XP. Difficulty levels drive base XP values.
  • Track Records & Verification -- Verification is the gate that determines when XP is awarded. No verification, no XP.
  • Explore & Discovery -- The Explore page is where users discover challenges, Dealer's Choice, and Learning Paths. DC multipliers are a major gamification mechanic.
  • Communities & Social -- Community goals and group challenges are cooperative gamification features that live within the community system.
  • School Administration -- School Admins and teachers create Learning Paths, configure leaderboard visibility, and manage class-level gamification settings.
  • Accounts & Authentication -- User roles determine gamification permissions. Age determines UI adaptation and DC penalty exemptions.

DoCurious Platform Documentation