Skip to main content

TekTree Gamification System

Version: 1.0.0 Last Updated: 2025-12-16 Status: Foundation (Pre-Implementation)

Core Gamification Philosophy

TekTree’s gamification is designed to motivate knowledge sharing and learning through:
  • Immediate feedback (real-time XP, badges)
  • Progress visibility (levels, leaderboards)
  • Social proof (achievements, followers)
  • Intrinsic motivation (mastery, autonomy, purpose)
  • Sustainable engagement (daily streaks, quests)

XP (Experience Points) System

XP Earning Mechanics

ActionXP AwardDaily CapNotes
Onboarding
Sign up+100One-timeWelcome bonus
Complete profile (80%+)+50One-timeFirst name, bio, avatar
Email verification+25One-time
Content Creation
Create area+10100/dayKnowledge organization
Post question+550/day
Answer question+10200/day
Publish insight+25500/dayLong-form content
Start discussion+10100/day
Share resource+550/day
Engagement
Add comment+330/dayQuality over quantity
Receive like (author)+2100/dayBatched per item
Receive upvote (author)+5200/day
Quality Bonuses
Answer accepted+50500/dayBest answer
Content featured+200UnlimitedCurated quality
Moderator quality mark+50UnlimitedExpert validation
Social
Get new follower+150/day
Milestones
7-day streak+100N/AWeekly consistency
30-day streak+500N/AMonthly dedication
100-day streak+2000N/AHardcore engagement
365-day streak+10000N/AElite status

XP Multipliers (Pro+ Tiers)

  • Pro: 1.2x XP on all actions
  • Team: 1.5x XP on all actions
  • Enterprise: 2.0x XP on all actions

Anti-Gaming Mechanisms

  1. Daily Caps: Prevent XP farming through spam
  2. Quality Signals: Upvotes, accepted answers weight higher
  3. Time Delays: Can’t delete and recreate for XP
  4. Moderation Penalties: Spam flagged content = XP deduction
  5. XP Decay: 5% per month for inactive users (no activity 30+ days)

Level System

Level Progression Table

LevelXP RequiredCumulative XPTitleUnlocks
100SeedlingBasic features
2100100SproutUpvote content
3250350SaplingCreate areas
4500850Young TreePublish insights
510001850Growing TreeDownvote (with reason)
615003350Branching TreeEdit own content history
720005350Leafy TreeCreate collections
825007850Strong TreeSuggest edits to others
9300010850Tall TreeCreate custom badges
10500015850Mature TreeBasic moderator tools
151000050850Mighty TreeAdvanced analytics
2020000150850Wise TreeMentor program access
3050000550850Elder TreeCustom profile URL
501000002050850Ancient TreeElite badge + hall of fame
10050000025000000+LegendLifetime achievement

Leveling Formula

XP required for next level follows exponential curve:
xp_required(level) = 100 * (1.2 ^ (level - 1))

Level-Up Experience

When a user levels up:
  1. Real-time animation (WebSocket push)
  2. Notification “Congratulations! You’re now a [Title]”
  3. Sound effect (optional, user preference)
  4. Confetti animation on profile page
  5. Feature unlock message if new features available
  6. Social share prompt (optional)

Achievement System

Achievement Categories

1. Onboarding Achievements

AchievementDescriptionXP BonusBadge Tier
First StepsComplete your profile+50Bronze
Tree PlanterCreate your first area+50Bronze
Curious MindPost your first question+50Bronze
Problem SolverAnswer your first question+50Bronze
Knowledge SharerPublish your first insight+100Silver

2. Contribution Achievements

AchievementDescriptionXP BonusBadge Tier
Question AskerPost 10 questions+100Bronze
Inquisitive MindPost 50 questions+300Silver
Question MasterPost 200 questions+1000Gold
Helpful HelperSubmit 10 answers+100Bronze
Answer MachineSubmit 50 answers+300Silver
Answer LegendSubmit 200 answers+1000Gold
Insight AuthorPublish 5 insights+200Silver
Insight MasterPublish 25 insights+800Gold
Insight GuruPublish 100 insights+3000Legendary
Resource CuratorShare 20 resources+150Bronze
Resource LibraryShare 100 resources+500Silver

3. Quality Achievements

AchievementDescriptionXP BonusBadge Tier
UpvotedReceive 50 upvotes+200Bronze
Highly UpvotedReceive 200 upvotes+600Silver
Top ContributorReceive 1000 upvotes+2500Gold
Accepted Answer5 answers accepted+300Silver
Answer Expert25 answers accepted+1200Gold
Featured Content1 content item featured+500Gold
TrendingContent reached #1 trending+800Gold

4. Social Achievements

AchievementDescriptionXP BonusBadge Tier
First FollowerGet your first follower+25Bronze
Popular100 followers+200Silver
Influencer1000 followers+1000Gold
Celebrity10000 followers+10000Legendary
Community BuilderFollow 50 users+100Bronze
EngagedReceive 100 likes+150Bronze
LikedReceive 500 likes+500Silver
LovedReceive 2000 likes+1500Gold
CommenterLeave 50 comments+100Bronze
ConversationalistLeave 200 comments+300Silver

5. Consistency Achievements

AchievementDescriptionXP BonusBadge Tier
Week Warrior7-day streak+100Bronze
Month Champion30-day streak+500Silver
Quarter Hero90-day streak+1500Gold
Year Master365-day streak+5000Legendary
DedicatedActive 30 days (non-consecutive)+200Silver
RegularActive 100 days (non-consecutive)+800Gold

6. Expertise Achievements

AchievementDescriptionXP BonusBadge Tier
Area Specialist50 contributions in one area+300Silver
Area Expert200 contributions in one area+1000Gold
PolymathContribute to 10 different areas+500Gold
Deep DiverReach level 20 in knowledge depth+2000Gold

7. Special Achievements

AchievementDescriptionXP BonusBadge Tier
Early AdopterJoined in first 1000 users+500Legendary
Founding MemberJoined in beta+1000Legendary
Bug HunterReport 5 valid bugs+300Gold
Feature RequesterSuggest implemented feature+500Gold

Achievement Tiers

  • Bronze: Common achievements (70% of users)
  • Silver: Uncommon achievements (30% of users)
  • Gold: Rare achievements (10% of users)
  • Legendary: Ultra-rare achievements (<1% of users)

Leaderboard System

Leaderboard Types

1. Global XP Leaderboard

  • Scope: All users, all-time XP
  • Reset: Never
  • Top: 100 users displayed
  • Update Frequency: Real-time (throttled to 5s intervals)

2. Weekly XP Leaderboard

  • Scope: All users, current week (Monday-Sunday)
  • Reset: Every Monday 00:00 UTC
  • Top: 100 users displayed
  • Prizes: Top 10 get special “Weekly Champion” badge

3. Monthly XP Leaderboard

  • Scope: All users, current month
  • Reset: First day of month 00:00 UTC
  • Top: 100 users displayed
  • Prizes: Top 3 get featured on homepage

4. Area-Specific Leaderboards

  • Scope: Users active in specific area
  • Reset: Weekly
  • Top: 50 users per area
  • Badge: Area expert badge for top contributor

5. Contribution-Specific Leaderboards

  • Types:
    • Most questions posted (this week)
    • Most answers submitted (this week)
    • Most insights published (this month)
    • Most helpful (most accepted answers)

Leaderboard Privacy

Users can opt out of leaderboards:
  • Profile setting: “Hide from leaderboards”
  • Still earn XP and achievements
  • Leaderboard position shown as ”-” to user

Streak Tracking System

Daily Activity Definition

A day counts toward streak if user performs any XP-earning action.

Streak Mechanics

  • Streak Counter: Displayed on profile and dashboard
  • Streak Freeze: Earn 1 freeze per 7-day streak (use to skip 1 day)
  • Streak Recovery: 24-hour grace period after day ends
  • Streak Notification: Daily reminder at 8 PM local time if no activity

Streak Milestones

Streak LengthXP BonusBadgeSpecial Reward
7 days+100Week Warrior1 streak freeze
30 days+500Month ChampionPro trial (3 days)
100 days+2000CenturionCustom profile badge
365 days+10000Year MasterLifetime Elite badge

Quest System (Future P2)

Quest Types

Daily Quests (Reset 00:00 UTC)

  • Answer 3 questions → +30 XP
  • Post 1 insight → +50 XP
  • Give 5 upvotes → +15 XP
  • Comment on 3 items → +20 XP

Weekly Quests (Reset Monday)

  • Publish 2 insights → +150 XP
  • Earn 100 XP from content → +100 XP bonus
  • Help 10 people (answers) → +200 XP
  • Reach top 50 on leaderboard → +300 XP

Special Quests (Time-Limited)

  • Holiday events
  • Platform milestones (e.g., “1M questions posted”)
  • Collaborative quests (community goals)

Social Proof Mechanics

Profile Badges

Displayed on user profile:
  • Level badge: Current level title
  • Achievement badges: Top 5 favorite achievements (user-selected)
  • Special badges: Pro/Team/Enterprise tier, Moderator, Early Adopter
  • Streak badge: Current streak count (if 7+ days)

Content Author Badges

Displayed next to username on content:
  • Level tier: Icon indicating level range (1-5, 6-10, 11-20, 21+)
  • Expertise badge: If user is top contributor in this area
  • Quality badge: If user has high acceptance rate (50%+)

Profile Stats Showcase

Public profile displays:
  • Total XP
  • Current level
  • Rank on global leaderboard (if top 1000)
  • Total contributions (questions, answers, insights)
  • Acceptance rate (% of answers accepted)
  • Follower count
  • Areas of expertise (top 3 by contribution)

Gamification Analytics

Metrics Tracked

Engagement Metrics:
  • Daily Active Users (DAU) interacting with gamification features
  • Average XP earned per user per day
  • Leaderboard view rate
  • Achievement unlock rate
Retention Metrics:
  • Streak retention (% of users maintaining 7+ day streaks)
  • Level progression velocity
  • Churn rate by level
Monetization Metrics:
  • Conversion rate (free → paid) by XP level
  • XP multiplier usage (Pro+ tiers)

A/B Testing

Gamification mechanics are A/B testable:
  • XP values (test +10 XP vs +15 XP for insights)
  • Achievement thresholds
  • Leaderboard formats
  • Notification frequency

Technical Implementation

Data Models

type UserGamificationProfile struct {
    UserID              string     `bson:"user_id"`
    TotalXP             int        `bson:"total_xp"`
    CurrentLevel        int        `bson:"current_level"`
    XPToNextLevel       int        `bson:"xp_to_next_level"`
    DailyXPEarned       int        `bson:"daily_xp_earned"`
    DailyXPResetAt      time.Time  `bson:"daily_xp_reset_at"`
    CurrentStreak       int        `bson:"current_streak"`
    LongestStreak       int        `bson:"longest_streak"`
    StreakFreezes       int        `bson:"streak_freezes"`
    LastActivityAt      time.Time  `bson:"last_activity_at"`
    Achievements        []string   `bson:"achievements"`
    FeaturedAchievements []string  `bson:"featured_achievements"`
    LeaderboardOptOut   bool       `bson:"leaderboard_opt_out"`
}

type Achievement struct {
    ID                string     `bson:"_id"`
    Name              string     `bson:"name"`
    Description       string     `bson:"description"`
    Tier              string     `bson:"tier"` // bronze, silver, gold, legendary
    XPBonus           int        `bson:"xp_bonus"`
    BadgeImageURL     string     `bson:"badge_image_url"`
    UnlockCriteria    string     `bson:"unlock_criteria"` // JSON query
    UnlockedCount     int        `bson:"unlocked_count"`
}

type XPTransaction struct {
    TransactionID     string     `bson:"_id"`
    UserID            string     `bson:"user_id"`
    Amount            int        `bson:"amount"`
    Source            string     `bson:"source"` // question_posted, answer_accepted, etc.
    RelatedEntityID   string     `bson:"related_entity_id"`
    Timestamp         time.Time  `bson:"timestamp"`
    DailyCap          int        `bson:"daily_cap"`
    DailyTotal        int        `bson:"daily_total"`
}

Event-Driven XP Calculation

func (s *GamificationService) HandleKnowledgeEvent(event Event) {
    switch event.Type {
    case "knowledge.question.posted":
        s.AwardXP(event.UserID, 5, "question_posted", event.QuestionID)
    case "knowledge.answer.accepted":
        s.AwardXP(event.AnswerAuthor, 50, "answer_accepted", event.AnswerID)
    case "knowledge.insight.published":
        s.AwardXP(event.UserID, 25, "insight_published", event.InsightID)
    }
}

func (s *GamificationService) AwardXP(userID string, amount int, source string, entityID string) {
    // Check daily cap
    dailyTotal := s.GetDailyXPTotal(userID, source)
    cap := s.GetDailyCap(source)
    if dailyTotal >= cap {
        log.Info("Daily XP cap reached", "user_id", userID, "source", source)
        return
    }

    // Apply tier multiplier
    multiplier := s.GetUserTierMultiplier(userID)
    finalAmount := int(float64(amount) * multiplier)

    // Record transaction
    txn := XPTransaction{
        UserID:          userID,
        Amount:          finalAmount,
        Source:          source,
        RelatedEntityID: entityID,
        Timestamp:       time.Now(),
    }
    s.RecordTransaction(txn)

    // Update user profile
    s.UpdateUserXP(userID, finalAmount)

    // Check for level up
    if newLevel := s.CheckLevelUp(userID); newLevel > 0 {
        s.EmitLevelUpEvent(userID, newLevel)
    }

    // Check for achievements
    s.CheckAchievements(userID, source)

    // Emit XP earned event
    s.EmitXPEarnedEvent(userID, finalAmount, source, entityID)
}

Document Status: ✅ Complete Related Documents: FUNCTIONAL_REQUIREMENTS.md, EVENT_CATALOG.md, MONETIZATION_STRATEGY.md