🔴 Massive Release v2.168.1
⭐⭐⭐ High Complexity • 38 commits • 1,395 files changedMajor release introducing enterprise-grade role-based access control at the community level, unified theming system for consistent brand experiences, AI-powered Shopify integration with full context awareness, and improved game experiences. Teams now get granular permission control with RBAC-aware tokens, admins benefit from single-source-of-truth theming, and community managers can leverage AI to design better campaigns.
What’s New
- Community-Level RBAC — Assign granular permissions (Viewer, Moderator, Manager, Admin) to team members per community with server-side enforcement across all APIs
- Unified Theme System — Single theme configuration applied consistently across main app, embedded widget, Shopify integration, and admin with ShadCN CSS variables
- Shopify AI Chat — Ask Claude questions about store data, customer segments, discounts, and sync status—agent understands your full Nudj and Shopify configuration
- Per-Community Level Configuration — Customize XP progression, level brackets, and gamification rules for each community independently
- Flick Game — New interactive game type with animations and scoring, ships with default images
- Game Complete Flow — Polished experience showing earned XP, next level progress, and available rewards
- Mobile-Optimized Shopify Widget — Responsive design for 390px mobile viewports with improved touch targets
- Shopify Admin API Integration — Read-only access to products, customers, discounts, orders, and more for AI-powered insights
- Referral Codes Infrastructure — New system for managing and tracking referral links with API endpoints
Apps Updated
User App
✓ Updated - Theme unification, game complete flow
API
✓ Updated - RBAC, levels, Shopify APIs, referrals
Admin
✓ Updated - Theme UI, RBAC enforcement, Shopify chat
MCP Server
✓ Updated - Shopify tools, RBAC-aware tokens
Games
✓ Updated - Flick game, complete flow
Design System
✓ Updated - Theme enums and utilities
Detailed Changes
Admin App
Admin App
Enterprise RBAC Implementation
- Client-side RBAC with role validation for UI elements
- Community-level role assignment UI with Viewer, Moderator, Manager, Admin, Creator, and Analytics roles
- Enhanced team management with per-user access tokens
- Granular permission enforcement on admin operations
- ReadOnlyFieldset pattern for Viewer-only access scenarios
- Audit trail for role changes and access modifications
- Move game configuration from organization to community scope
- Community-specific level system configuration (moved from org-level)
- Level settings UI at community level for better customization
- Game builder updated to work with community-scoped configs
- Improved game and level listing per community
- Single community.theme configuration interface
- Theme preset selector with pre-built color schemes
- Visual color picker for custom theme customization
- Real-time preview of theme changes
- ShadCN CSS variable mapping for consistent styling
- Admin UI fully styled with unified theme variables
- Context injection for Shopify chat with full platform state
- Admin dashboard chat widget with Shopify-aware assistant
- Request context includes community data, user segments, and sync status
- MCP UI components for displaying Shopify integration state
- Read-only Shopify Admin API endpoint integration
- Chat evaluations and test data for Shopify scenarios
- Fixed analytics stats calculation for active user count
- Optimized admin filter UI with API-level filtering support
- Improved org/community dashboard performance
- Better data aggregation for org stats overview
- Admin UI cleanup and documentation improvements
- Fixed community creation layout issues
- Improved redemption code upload and management
- Image re-upload functionality with proper error handling
- Better organization of community settings
- Redirect to /create-community after organization creation
- Improved community list navigation
- Better team settings layout and accessibility
- Enhanced form validation and error messaging
- New question configuration tab in user details/map variables
- Support for question-based variable mapping
- Better organization of variable configuration options
User App
User App
Unified Theme Application
- Main app now uses unified community theming system
- All components styled with ShadCN CSS variables from community.theme
- Consistent theming from challenges to rewards sections
- Responsive theme application across all breakpoints
- Widget unified with ShadCN CSS variables (route groups)
- Consistent color application across widget components
- Theme inheritance from community configuration
- Mobile-optimized theme rendering
- Replaced hardcoded colors with theme variables in vertical nav
- Dynamic color application based on community theme
- Better visual consistency with brand identity
- Signal nudj-widget-ready event for full-app widget variant
- Widget preview CSP (Content Security Policy) compliance
- Environment override support for deployments
- Improved widget initialization and readiness detection
- Polished game completion experience
- Visual reward preview with animations
- Seamless transition to next challenge or leaderboard
- Completion feedback with point displays
- Invalidate reward listing queries after successful purchase
- Fresh data displayed immediately after redemption
- No stale reward states
- Better reward status indicators
- Fixed crash on immersive challenge complete view
- Improved error handling for challenge completion
- Better state management for multi-step challenges
- Proper cleanup of challenge state
API
API
Community-Level RBAC
- Implement community-level RBAC for all queries and mutations
- RBAC checks on community fetch operations
- Enforce RBAC on org list counts and aggregations
- Per-user API tokens with role-based permissions
- Community-scoped token validation
- 9 new read-only Shopify Admin API endpoints (products, customers, orders, etc.)
- Use fresh DB read for Shopify linking code to prevent stale cache domain errors
- Improved Shopify store session management
- Better credential handling and validation
- Shopify context injection for MCP chat system
- Implement configurable level system API endpoints
- Move level config from organization to community scope
- Level configuration endpoints for community-level management
- Game complete endpoint implementation
- New referral codes collection and endpoints
- Generate and track referral codes
- API endpoints for referral code creation and validation
- Referral tracking infrastructure
- Analytics stats performance improvements for active user calculations
- MongoDB index optimization with proper shard key usage (location first)
- Avoid passing unique: null to MongoDB index options
- Fresh DB reads for cache invalidation scenarios
- Better query optimization for frequently-accessed data
- Move pointsForSpend config from PlatformConfig to Community
- Unified theme schema fields with shared utilities
- API client regeneration with updated endpoints
- Improved type safety across services package (85 type errors fixed)
MCP Server
MCP Server
Shopify MCP Implementation
- Full Shopify MCP backend with read-only Shopify Admin API integration
- MCP context injection for complete platform state-of-play
- Chat evaluations for Shopify-specific scenarios
- Admin UI components for MCP interactions
- Token-based RBAC for MCP access control
- MCP tokens now respect community-level RBAC roles
- Token generation with embedded role information
- Role validation on MCP operations
- Per-user API tokens with granular permissions
- Enhanced API token generation with RBAC awareness
- Token lifecycle management
- Role-based token capabilities
Games
Games
Flick Game
- New Flick game type with default images included
- Complete game configuration for immediate use
- Visual feedback and scoring system
- Game completion endpoint implementation
- Proper state transition after game completion
- Reward calculation and award process
- Next challenge recommendation
Shopify Embedded App
Shopify Embedded App
Mobile Optimization
- Full responsive redesign for 390px mobile viewports (iPhone SE, older devices)
- Improved touch targets and mobile-first navigation
- Stacked layout for better mobile readability
- Mobile-optimized Shopify chat integration
- Responsive theme preset selector
- Prefer customDomains over userDomain for widget preview URL
- Better preview accuracy for deployment scenarios
- Improved environment-based URL selection
- Theme presets with unified config save to community.theme
- Pre-built mobile-optimized color schemes
- Mobile-friendly theme preview
- One-click theme application from presets
Design System & Packages
Design System & Packages
Unified Theme Schema
- New community.theme schema with comprehensive fields
- ShadCN CSS variable mapping utilities
- Shared theme transformation utilities
- Theme inheritance and override system
- Type-safe theme configuration
- New Creator and Analytics role enums
- Added Moderator role to RBAC hierarchy
- Referral code DTO and models
- Enhanced game configuration DTOs with community scope
- Level configuration DTOs
- Automatic theme system setup migration
- MongoDB index optimization for analytics queries
- Support for new referral codes collection
- Community-level game and level configuration migration
- Proper index creation with shard key awareness
Infrastructure & Tooling
Infrastructure & Tooling
Version Tagging
- Use semver sort instead of git describe for version tagging
- More reliable version detection in CI/CD
- Better release versioning accuracy
- Regenerated API client with new Shopify endpoints
- Updated type definitions for new DTOs
- Fresh client for 9 new read-only Shopify endpoints
- API playground rendering fixes
- Improved docs structure and cleanup
- Shopify MCP documentation and evaluations
Breaking Changes
Community-Level Game Configuration
Community-Level Game Configuration
Area: Admin - Game Configs, API - Game EndpointsDescription: Game configurations are now strictly scoped to the community level. Organization-level game configs are no longer supported. This was an evolution from v2.168.0’s community scoping to ensure consistency.Migration: Game configurations created before this release remain available in their associated communities. No manual migration needed, but ensure new games are always created at the community level through the Admin UI.
Community-Level Level Configuration
Community-Level Level Configuration
Area: Admin - Gamification Settings, API - Level EndpointsDescription: Level system configuration has moved from organization scope to community scope. This allows each community to have independent progression systems.Migration: Existing organization-level level configs are automatically inherited by communities. You can override at the community level if needed. Update any API calls referencing org-level level endpoints to use community-level endpoints instead.
RBAC Enforcement on Community Operations
RBAC Enforcement on Community Operations
Area: API - Community Queries and MutationsDescription: All community-level operations now enforce RBAC checks. Users must have appropriate role permissions (Community Manager or above) to access community data.Migration: If you have scripts or integrations that fetch community data, ensure the API token used has appropriate community-level RBAC permissions. Contact support if you need to grant elevated permissions.
Shopify API Endpoint Changes
Shopify API Endpoint Changes
Area: API - Shopify IntegrationDescription: New read-only Shopify Admin API endpoints added. These are in addition to existing endpoints; no existing endpoints were removed. However, the Shopify context injection for MCP means admin chat behavior may change.Migration: No action required for existing integrations. The 9 new read-only endpoints are available for advanced use cases but entirely optional.
Technical Notes
Unified Theming Architecture The new unified theme system provides:- Single source of truth for visual branding (community.theme)
- ShadCN CSS variable mapping for consistent styling across all surfaces
- Theme inheritance from organization to community level
- Support for theme presets with one-click application
- Type-safe theme configuration with TypeScript enums
- Roles (Viewer, Moderator, Manager, Admin, Creator, Analytics) scoped to communities
- Per-user API tokens with embedded role information
- MCP tokens respect community-level RBAC
- Client-side RBAC enforcement in Admin UI prevents unauthorized actions
- Backend enforces RBAC on all query/mutation operations
- Chat context automatically includes community configuration, Shopify linking status, and user segment data
- Read-only access to 9 Shopify Admin API endpoints for data gathering
- Evaluations and test data for common Shopify support scenarios
- UI components for displaying integration state in the chat interface
- Analytics dashboard queries optimized with proper MongoDB indexes
- Fresh DB reads for Shopify linking to prevent cache staleness
- Reward queries invalidated immediately after redemption
- Active user calculation improved with better aggregation logic
- Proper state transitions from game play to completion
- Visual reward preview with amounts
- Automatic transition to next challenge or leaderboard
- Completion analytics tracking for engagement metrics
Usage Examples
Setting Up Community-Level RBAC with API Tokens
Setting Up Community-Level RBAC with API Tokens
Setup Steps:
- Navigate to Admin → Settings → Team Settings
- Click “Add Team Member” and enter their email
- Select role: Viewer, Moderator, Manager, Admin, Creator, or Analytics
- Click “Generate API Token”
- Copy the token (contains embedded role information)
- Share token securely with team member
- User identity
- Community association
- Role permissions
- RBAC enforcement on all requests
Applying Unified Theming Across Your Community
Applying Unified Theming Across Your Community
Configuration:
- Go to Admin → Gamification → Community Settings
- Click “Appearance” tab
- Choose pre-built theme preset (Modern, Vibrant, Minimal, etc.)
- Or customize with color picker:
- Primary color (buttons, links)
- Secondary color (accents)
- Background & text colors
- Click “Save Theme”
- Main user app (challenges, rewards, leaderboards)
- Embedded Shopify widget
- Admin panel (if community theme override enabled)
- Email notifications
Using Shopify MCP Chat for Store Integration Help
Using Shopify MCP Chat for Store Integration Help
Scenario: Troubleshooting Store Linking
- Open Admin → Chat (bottom right)
- Ask: “Why isn’t my Shopify store linking?”
- MCP context automatically includes:
- Current store connection status
- Recent linking attempts
- API credential validity
- User segment sync status
- Assistant provides specific troubleshooting steps based on your setup
- “How many customers have synced from Shopify?”
- “Is my store credentials still valid?”
- “Can I see recent purchase events?”
- “Why are some orders not appearing?”
- No need to navigate multiple dashboards
- Assistant understands your exact configuration
- Faster troubleshooting with contextual guidance
Generating Referral Codes for User Growth
Generating Referral Codes for User Growth
API Endpoint:User Flow:
- User sees referral code in their account
- Shares code with friends via email/social
- Friend uses code during signup
- Original user gets bonus points when friend completes first challenge
Configuring Community-Level Game Settings
Configuring Community-Level Game Settings
For Game Configuration:
- Go to Admin → Gamification → Games
- Select or create a game for your community
- All settings now apply only to this community
- Other communities see their own independent games
- Go to Admin → Gamification → Levels
- Configure progression levels for this community
- Set XP thresholds and rewards per level
- Each community can have completely different progression systems
Related Features
- Role-Based Access Control — Fine-grained team permissions with org and community scoping
- Gamification — Challenges, rewards, points, and XP systems
- Leaderboards — Rank users by points earned or XP progression
- Shopify Integration — Sync store data and reward customer purchases
- Theming & Customization — Brand your community with custom colors
- Achievements — Badge-based accomplishment system
- Streaks — Consecutive day tracking with point bonuses
- API & Integrations — Programmatic access to Nudj platform
Contributors
@ZuhayrK0010 commits • +23,558/-8,157 lines
@SaadK948 commits • +12,817/-5,762 lines
@jamescockayne4 commits • +22,092/-3,113 linesRelease Stats
| Metric | Value |
|---|---|
| Total Commits | 38 |
| Lines Added | +103,725 |
| Lines Removed | -25,831 |
| Files Changed | 1,395 |
| Release Size | 🔴 Massive |
| Complexity | ⭐⭐⭐ Complex |
v2.168.1 deployed on February 20, 2026




