Achievements
Achievements
The achievements service is one of the key elements of platform gamification. It allows creating, managing, and tracking user progress in completing various achievements.
Core Concepts
Achievement
An achievement is a reward that a user can receive for meeting certain conditions. Each achievement has:
- Name and description (with multilingual support)
- Image (achievement badge)
- Completion conditions
- Rewards for completion
- Activity status (active/inactive)
Achievement Conditions (AchievementCondition)
Conditions define under what circumstances a user receives an achievement:
- Event type - what event should occur (e.g., task completion, stream viewing)
- Event count - how many times the event should occur
- Time frame - period during which events should occur
- Restrictions - additional conditions (e.g., only for certain games or activities)
- Available quantity - limit on the number of users who can receive the achievement (or
unlimitedfor unlimited quantity)
Achievement Rewards (AchievementReward)
For completing an achievement, a user can receive various rewards:
- In-game currency
- Experience
- Store items
- Special statuses or titles
- Access to exclusive content
Issue Batch (AchievementBatch)
The system processes achievement issuance in batches:
- A batch of users meeting achievement conditions is created
- Each user in the batch receives the achievement and corresponding rewards
- The system tracks who received the achievement and when
Business Processes
Achievement Creation
Administrator creates a new achievement, specifying:
- Name and description in all supported languages
- Uploads achievement image
- Determines whether the achievement will be active immediately after creation
Administrator configures achievement completion conditions:
- Selects event type (from available event types)
- Specifies required number of events
- Sets time frames (if applicable)
- Determines maximum number of users who can receive the achievement
Administrator configures achievement rewards:
- Selects reward types (currency, experience, items)
- Specifies quantity for each reward type
System activates the achievement, making it available for users to obtain
User Achievement Completion
Achievements can be issued in two ways:
1. Automatic issuance based on events
- User performs an action in the system (e.g., completes a task)
- System generates corresponding event
- Achievement service receives the event and checks if it matches conditions of any achievements
- If achievement conditions are met:
- A record of user achievement completion is created
- User receives corresponding rewards
- User receives notification about achievement completion
2. Periodic processing (for complex conditions)
- System periodically runs achievement verification task
- For each active achievement:
- Users who have met achievement conditions are determined
- Achievement issuance batch is formed
- Users receive corresponding rewards
- Achievement completion notifications are sent
Displaying User Achievements
- User opens achievements section in their profile
- System displays:
- Completed achievements
- Achievements in progress with progress indicator
- Available but not yet completed achievements
- Rewards for each achievement
Event Types for Achievements
The system supports various event types that can lead to achievement completion:
- Task completion - events related to completing tasks from the task service
- Game events - events from integrated games (Dota 2, CS2)
- Social activity - events from social integrations (Discord, Twitch, etc.)
- Platform interaction - events related to using the platform itself
- Clan activity - events related to clan activities
- Store transactions - store purchase events
- Time events - events related to specific time frames or dates
Achievement Tags
For convenient organization and search, achievements can be tagged:
- By game (Dota 2, CS2)
- By activity type (social, gaming, platform)
- By difficulty (easy, medium, hard)
- By season or event
- By theme
Integration with Other Services
The achievement service is closely integrated with other system services:
- Task service - achievements can be obtained for completing tasks
- Store service - store items can be rewards for achievements
- User service - tracking progress and issuing achievements to users
- Notification service - sending notifications about achievement completion
- Game services - achievements based on game events
- Social services - achievements for social media activity
