Skip to main content

Shared Services Overview

The Resonance Shared Services provide a unified API layer for streak tracking, leaderboards, achievements, and perks across all platform integrations. This ensures consistent behavior and enables cross-platform features.

Architecture

Shared Services Architecture

Base URL

All shared services are available at:

https://services.rsnc.network

Services

ServicePurposeEndpoints
Community ServiceRegister and manage platform communities/community/register, /community/activate, /community/:platform/:communityId
Streak ServiceTrack daily check-ins and activity streaks/streak/record-activity, /streak/claim-milestone, /streak/status/:brandId/:userIdentifier
Leaderboard ServiceGenerate rankings by various metrics/leaderboard/:brandId, /leaderboard/update-stats
Achievement ServiceTrack and unlock achievements/achievements/:brandId/:userIdentifier, /achievements/update-progress
Perks ServiceBrowse and redeem perks/perks/:brandId, /perks/redeem

User Identification

All services use platform-agnostic user identifiers in the format:

{platform}_{userId}@rsnc.network

Examples:

  • Discord: discord_123456789@rsnc.network
  • Telegram: telegram_987654321@rsnc.network
  • Twitter: twitter_1234567890@rsnc.network
  • Farcaster: farcaster_12345@rsnc.network
  • Shopify: shopify_customer@example.com@rsnc.network (or direct email)
  • WordPress: wordpress_user@example.com@rsnc.network (or direct email)

Authentication

Shared services use CORS headers and can be called from any platform integration. No authentication is required for public endpoints, but all requests should include proper Content-Type: application/json headers.

Response Format

All endpoints return JSON responses in this format:

{
"success": true,
"data": { ... },
"error": null
}

Error responses:

{
"success": false,
"error": "Error message",
"data": null
}

CORS Support

All endpoints support CORS preflight requests. Include appropriate headers in your requests:

const response = await fetch('https://services.rsnc.network/streak/record-activity', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
brandId: '0x...',
userIdentifier: 'discord_123@rsnc.network',
platform: 'discord',
streakType: 'daily'
})
});

Health Check

Check service health:

GET https://services.rsnc.network/health

Response:

{
"status": "healthy",
"service": "shared-services",
"timestamp": "2026-01-15T10:30:00.000Z"
}

Platform Integration

Each platform integration should:

  1. Call shared services for streak, leaderboard, achievement, and perks data
  2. Use consistent user identifiers following the platform pattern
  3. Handle errors gracefully with fallback behavior
  4. Cache responses when appropriate to reduce API calls

Next Steps