social.plus SDK uses a decentralized user management approach that gives you complete control over your user data while providing powerful social features.

Core Principles

No User Data Storage: social.plus SDK does not store or manage any personal user data. This means no user profiles, emails, or personal information is stored in social.plus systems.

Key Benefits

Privacy First

Your users’ data stays in your systems, ensuring privacy and compliance

No Migration

Integrate social.plus without importing or migrating existing user profiles

Full Control

Handle user management with your existing application logic and systems

User Identification

Every user in social.plus is represented by a unique userId - a string that uniquely identifies the user and remains immutable throughout their lifetime.

Choosing the Right User ID

Important: Once a user is created in social.plus, their userId cannot be changed. Choose your user identification strategy carefully.

User Data Structure

While social.plus doesn’t store personal data, it maintains essential information for social features:

User Attributes

AttributeData TypeDescription
userIdstringThe unique identifier of this user
displayNamestringThe display name shown to other users
rolesArray<string>A list of roles assigned to this user
metadataObjectCustom metadata for this user
avatarCustomUrlstringCustom URL for user avatar
flagCountintegerNumber of users that have flagged this user
hashFlagObjectInternal hash for checking if user was flagged
isGlobalBanbooleanIndicates if user is globally banned
isDeletedbooleanIndicates if user is deleted
createdAtdateWhen the user was created in social.plus
updatedAtdateWhen the user was last updated

User Roles & Permissions

Enhance user capabilities by assigning roles with specific permissions defined in your admin panel.
Role-Based Access Control: social.plus uses a comprehensive permission system that allows you to create hierarchical moderation structures and fine-grained access control.

Quick Overview

Default Roles

Built-in Role Hierarchy
Member → Channel Moderator → Community Moderator → Super Moderator → Global Admin

Custom Roles

Flexible Permissions
Create custom roles with specific permissions in the social.plus Console

User Repository

While social.plus doesn’t store user profiles, it provides tools for querying and searching users within your social features.

Initializing User Repository

let userRepository = AmityUserRepository(client: client)

Best Practices

User ID Strategy

Do:
  • Use database primary keys
  • Ensure immutability
  • Keep IDs consistent across your app
Don’t:
  • Use changeable identifiers
  • Include personal information
  • Create complex ID schemes

Data Management

Do:
  • Keep user profiles in your system
  • Sync display names as needed
  • Use metadata for social.plus specific data
Don’t:
  • Store personal data in social.plus
  • Rely on social.plus for user management
  • Ignore privacy compliance

Role Management

Do:
  • Define clear role hierarchies
  • Use roles for feature access
  • Plan for role changes
Don’t:
  • Hardcode role permissions
  • Create too many role levels
  • Forget to update roles

Performance

Do:
  • Cache user repository queries
  • Implement pagination
  • Use efficient search patterns
Don’t:
  • Make unnecessary API calls
  • Load all users at once
  • Ignore query optimization

Next Steps