Gamification
Integrate Smartico gamification features into your brand.
Prerequisites
- An active Smartico account with keys provided by the Cactus team
- Keys:
labelKey,brandKey,saltKey(and optionally visitor keys)
Configuration
Configure by file (base + brand override):
app/config/gamification/gamification.tsapp/config/gamification/gamification.server.tsoverrides/<brand-key>/app/config/gamification/gamification.tsoverrides/<brand-key>/app/config/gamification/gamification.server.ts
<brand-key> is derived from ORIGIN_DOMAIN (state77.com -> state77-com).
Edit gamification.config.ts:
smartico: {
labelKey: 'your_label_key',
brandKey: 'your_brand_key',
// ...
}
Server-side salt key
The saltKey used for user hash generation is a server-side secret and must be configured via the SMARTICO_SALT_KEY environment variable (.dev.vars for local dev, Cloudflare secret for production).
The gamification.server.config.ts file still exists as a fallback, but the environment variable takes priority:
SMARTICO_SALT_KEYenv var (Cloudflare secret /.dev.vars)gamification.server.config.tsconfig file (fallback)
Never commit real salt keys in override files. Use the environment variable instead. The Cactus team will configure the Cloudflare secret for your brand.
Gamification/Smartico settings are driven by config overrides per brand.
Enabling / disabling modules
Each gamification feature can be toggled in app/config/gamification/gamification.ts:
modules: {
missions: { enabled: true, native: true },
tournaments: { enabled: true, native: true },
store: { enabled: true, native: true },
miniGames: { enabled: true, native: true },
levels: { enabled: true, native: true },
notifications: { enabled: true, native: true },
badges: { enabled: true, native: true },
bonuses: { enabled: true, native: true },
jackpots: { enabled: true, native: true },
raffles: { enabled: true, native: true },
}
enabled: true— module is activeenabled: false— module is completely hidden (no buttons, no pages)native: true— uses custom React UI (recommended)native: false— uses Smartico's built-in overlay widget
Available routes
When modules are enabled with native: true, these pages are available. The paths shown below are the defaults — they are configurable via the Route Registry.
| Key | Default path | Description |
|---|---|---|
gamification | /vip | Gamification hub |
gamification.missions | /vip/missions | Missions listing with filters |
gamification.tournaments | /vip/tournaments | Tournaments listing with filters |
gamification.tournament | /vip/tournaments/:id | Tournament detail (leaderboard, prizes) |
gamification.store | /vip/store | Store with filters |
gamification.miniGames | /vip/mini-games | Mini-games listing |
gamification.levels | /vip/levels | Level progress timeline |
gamification.badges | /vip/badges | Badges listing |
gamification.bonuses | /vip/bonuses | Bonuses listing |
user.notifications | /user/notifications | Notifications inbox |
Brands can customise all gamification paths. For example, state77 uses /gamificacion/misiones instead of /vip/missions. Use routeHref("gamification.missions") for links — never hardcoded paths.
Visitor mode
Logged-out users can browse mission and tournament listings. When they try to open a detail page, they are prompted to log in.
Customization tips
- Naming: Change
naming.programNameandnaming.coinsNamein the config to match your brand - Sidebar buttons: The VIP highlight buttons in the sidebar can be styled via your theme tokens
- Disable specific modules: Set
enabled: falsefor modules you don't need - Use Smartico UI for everything: Set
native: falseon all modules to use Smartico's built-in overlays instead of custom React pages