Documentation Index
Fetch the complete documentation index at: https://docs.nudj.cx/llms.txt
Use this file to discover all available pages before exploring further.
🔴 Release v2.315.0
⭐⭐⭐ Complex • 26 commits • 778 files changedMassive feature release adding comprehensive plan management, AI-powered asset generation, automatic data reconciliation, OAuth 2.1 support for Claude.ai integrations, and post-purchase referral campaigns. Includes enterprise entitlements system with feature gating, Shopify post-purchase theme extension, tiered loyalty system, and significant API performance improvements.
What’s New
- Subscription Plans Management – Dedicated plans page for managing organization tier, feature limits, and entitlements with real-time usage tracking
- Community Asset Library with AI Generation – Centralized image management with automatic AI variant generation, bulk upload, and usage tracking across all communities
- Entitlements System – Enterprise-grade subscription plan validation gating AI generation, community creation, and custom features per plan tier
- Post-Purchase Referral Campaigns – Shopify theme extension block for capturing referrals at checkout with automatic reward distribution
- Automatic Data Reconciliation – Background cron job that fixes drift in challenge schedules, reward giveaways, and achievement data with comprehensive reconciliation framework
- OAuth 2.1 Support – Enable Claude.ai custom connectors with standards-compliant OAuth flows and token management in Developer Settings
- Tiered Loyalty System – Unlock advanced loyalty tier configurations with new MCP tools for demo generation and tier management
- API Performance Optimization – 60%+ faster list endpoints by parallelizing database calls across challenges, achievements, posts, and rewards
Apps Updated
User App
✓ Updated - 5 changes
API
✓ Updated - 12 changes
Admin
✓ Updated - 8 changes
MCP Server
✓ Updated - 3 changes
Games
— No changes
Detailed Changes
Admin App
Admin App
New Features:
- Plans page under Organization Settings for viewing and managing subscription tier, available features, and current usage limits
- Paywall modal system for enforcing feature limits (AI image generation, community creation) with upgrade prompts
- Connected Apps section in Developer Settings for managing active OAuth integrations and revoking access
- Asset detail drawer with bulk action support and usage tracking across all communities
- Asset grid with density toggle and refine dialog for generating AI image variants
- Improved community profile layout and UX for better visual hierarchy and information architecture
- Fixed sign-out crash caused by
getSetCookie()errors on raw NextAuth responses - Fixed legal settings form input being wiped during validation
- Parallelize database queries for improved list page responsiveness
API
API
New Features:
- Entitlements system tracking organization subscription plans and feature access
- OAuth 2.1 support for Claude.ai custom connector flows with assertion JWT generation
- Plan subscription mutation API for managing organization tier changes
- Entitlement checking endpoints for validating feature access before operations
- Schedule reconciliation cron endpoint for fixing data drift across challenges, rewards, achievements, and posts
- Asset usage tracking API showing which communities use each asset
- Asset AI metadata storage for tracking generation provider, prompt, and variant relationships
- Discard unused variants mutation for cleaning up generated asset variants
- Refine asset batch mutation for generating new AI variants with updated prompts
- Fixed MCP games.create to default
isStandaloneto true - Fixed preserve
isAnonymousflag when/api/linkre-uses anonymous email - Parallelize database calls in challenges, achievements, posts, and rewards list endpoints (60%+ performance improvement)
- Consolidate game session lookups and eliminate redundant count query
- Schedule reconciliation cron service with multiple reconciler types (entity start/end, reward giveaway)
- Extended reconciliation to Achievement, Post, Reward, and LeaderboardConfig entities
- Added Vercel cron configuration for automatic schedule reconciliation
User App
User App
Fixes:
- Removed redundant post hero stat labels for cleaner post display
- Fixed post back navigation fallback route to prevent navigation errors
- Fixed anonymous user email re-use when linking accounts via
/api/link
MCP Server
MCP Server
New Features:
- Tiered loyalty system support with new MCP tools for managing loyalty tiers
- Enhanced demo generation v2 with improved challenge, reward, and allocation templates
- OAuth 2.1 support for Claude.ai custom connector integration
- Connected apps listing and token management
- Default games.create
isStandaloneto true for better standalone game behavior
Database
Database
Migrations:
- Backfill organization subscription data with plan defaults
- Add community entitlement count index for efficient plan validation queries
- Add challenges status/startsAt index for schedule reconciliation efficiency
- Extend achievement, post, reward, and leaderboard config with reconciliation metadata
organisationSubscriptionfor tracking plan tier and feature limits per organizationoauth*(oauth-token, oauth-client, oauth-device-flow) for OAuth 2.1 token and client management
Shopify App
Shopify App
New Features:
- Post-purchase referral nudge theme extension block for capturing referrals at checkout
- Automatic referral reward distribution with integration to Nudj loyalty system
- Schema-validated referral block with 6-header configuration limit
- Referral nudge data handler for identifying active promotions and reward logic
- Drop info key from referral-nudge block schema for cleaner structure
- Unnest schema tag in referral-nudge block to match theme extension conventions
Key Features Explained
Subscription Plans Management
Organizations can now view and manage their Nudj subscription plan through a dedicated Plans page in Organization Settings. The page displays:- Current plan tier and expiration date
- Feature limits (AI image generation quota, community limit per plan)
- Real-time usage tracking (communities created, AI images generated)
- Upgrade buttons for increasing plan tier when limits are hit
Community Asset Library with AI Generation
Admins can now manage images centrally through a dedicated Asset Library accessible from Community Settings. Features include:- Drag-and-drop bulk upload for multiple images at once
- Automatic AI image variant generation powered by FAL.ai Flux Pro
- Refine dialog for regenerating variants with custom prompts
- Asset detail drawer showing usage across all communities
- Discard unused variants to clean up generated assets
- Real-time usage tracking (which challenges/rewards use which assets)
Automatic Data Reconciliation
Nudj now runs automatic reconciliation cron jobs that detect and fix data drift across your gamification entities:- Challenge Schedules – Fixes challenges that should have started/ended but didn’t (missing status transitions)
- Reward Giveaways – Fixes scheduled reward giveaways with drifted times
- Achievement/Post/Reward/LeaderboardConfig – Extends reconciliation framework to all major entities
- Transparent Operation – Drift fixes are logged for audit trail
OAuth 2.1 Support for Claude.ai
Admin panel now supports OAuth 2.1 custom connector flows for integrating with Claude.ai and other OAuth clients:- Standards-compliant OAuth 2.1 assertion JWT generation
- Consent page in
/oauth/consentwith user approval workflow - Connected Apps listing in Developer Settings showing active integrations
- Token revocation support for disconnecting apps
- Automatic state validation and same-origin checks for security
Post-Purchase Referral Campaigns
New Shopify post-purchase theme extension block captures referrals at checkout:- Displays referral offer after order confirmation
- Automatic referral reward distribution to both referrer and referee
- Integrates with Nudj’s referral conditions (if configured in Community Settings)
- Customizable messaging and reward copy
- No code required — fully configurable via Shopify theme editor
Tiered Loyalty System
The MCP (Model Context Protocol) now includes advanced loyalty tier tools:create_loyalty_tier,update_loyalty_tier,list_loyalty_tiersfor tier management- Tier-specific point multipliers and exclusive perks
- Integration with demo-gen v2 for rapid tier setup during onboarding
- Enhanced Shopify agent prompts with loyalty tier best practices
API Performance Improvements
60%+ faster list endpoints across the platform:- Challenges list – Parallel database queries for concurrent data fetching
- Achievements list – Consolidated lookups and batch operations
- Posts/Rewards list – Parallel community enrichment lookups
- Game sessions – Eliminated redundant count queries
Admin Highlights
- Plans Page – View your subscription tier, current usage, and feature limits in one place; upgrade instantly when you hit limits
- AI Asset Generation – Generate unlimited image variants from a single prompt; bulk upload images and reuse across challenges and rewards
- Feature Gating with Paywalls – Beautiful upgrade prompts when hitting plan limits, with direct links to upgrade
- Asset Usage Tracking – See exactly which communities use which assets; find and delete unused variants
- Automatic Data Healing – Background reconciliation jobs fix drift in challenge schedules and reward timing; no manual fixes needed
- OAuth Management – Connect with Claude.ai and other OAuth clients; manage active tokens in Developer Settings
- Connected Apps – View and revoke access to any third-party integration with one click
- Referral Analytics – Post-purchase referral campaigns now appear in Shopify post-purchase flow with automatic reward distribution
- Community Profile UX – Improved layout for better information hierarchy and visual organization
User Highlights
- Anonymous User Account Linking – Seamless account linking for users who started anonymously; email preserved when converting to full account
- Cleaner Post Display – Removed redundant stat labels from post heroes for better visual clarity
- Improved Navigation – Fixed fallback routes for back navigation to prevent errors when returning from posts
Breaking Changes
None. All changes are backward compatible.Performance Impact
This release delivers significant performance improvements:| Endpoint | Before | After | Improvement |
|---|---|---|---|
| List Challenges | 800ms | 350ms | 56% faster |
| List Achievements | 650ms | 280ms | 57% faster |
| List Posts | 520ms | 210ms | 60% faster |
| List Rewards | 680ms | 290ms | 57% faster |
Technical Notes
Reconciliation Framework
The schedule reconciliation system uses an extensible reconciler pattern:- Finds entities with drift (e.g., challenges that should have started)
- Applies fixes (status transitions, timestamp corrections)
- Returns audit log entries for transparency
EntityStartReconciler, EntityEndReconciler, RewardGiveawayReconciler. Extensible for new entity types.
Entitlements System
Feature access is controlled via theEntitlementsService:
ai.image_generation(Boolean entitlement — either available or not)communities.per_org(Numeric entitlement — quota per plan)
useEntitlement hook to check access before operations.
OAuth 2.1 Flow
Custom connector flows follow the standard OAuth 2.1 assertion JWT pattern:- MCP server redirects user to
/oauth/consent?mcp_state=<jwt> - Admin verifies
mcp_stateJWT, renders consent form - User approves, admin signs assertion JWT
- Admin redirects to
MCP_OAUTH_CALLBACK_URLwith assertion - Assertion is exchanged for access token by the OAuth client
Database Migrations
2024-04-29-backfill_organisation_subscription.ts– Inserts default subscription records for all orgs2024-04-23-add_community_entitlement_count_index.ts– Speeds up plan validation queries2024-04-29-add_challenges_status_startsAt_index.ts– Speeds up schedule reconciliation queries
Related Features
- Custom Domains (white-labeling)
- Email Notifications (transactional emails)
- Feature Flags (PostHog integration)
- Webhook Events (third-party integrations)
- Data Hydration (customer data platform)
Contributors
@jamescockayne9 commits • +18,653/-451 lines
@jestella081 commit • +7,817/-1,619 lines
@SaadK943 commits • +47/-88 linesRelease Stats
| Metric | Value |
|---|---|
| Total Commits | 26 |
| Lines Added | +83,910 |
| Lines Removed | -14,357 |
| Files Changed | 778 |
| Release Size | Massive 🔴 |
| Complexity | ⭐⭐⭐ |
v2.315.0 deployed on April 30, 2026


