SDK v7.x · Last verified March 2026 · iOS · Android · Web · Flutter
Speed run — just the code
Speed run — just the code
Data Model
Prerequisites: SDK installed and authenticated → SDK Setup. By default, all authenticated users can create communities.
After completing this guide you’ll have:
- Community creation flow (public and private) with categories
- Member join/leave and role assignment wired up
- Trending and recommended communities discoverable in-app
Quick Start: Create a Community
UseAmityCommunityRepository to create a community with privacy and moderation settings:
Full reference → Create Community
Step-by-Step Implementation
Choose community settings
Pick the right
Full reference → Create Community
postSettings for your community type before creating it. This controls the entire content governance model.postSettings | Who can post | Best for |
|---|---|---|
ANYONE_CAN_POST | All members | Open communities |
ADMIN_REVIEW_POST_REQUIRED | All members, but posts need approval | Curated communities |
ONLY_ADMIN_CAN_POST | Admins/moderators only | Announcement channels |
TypeScript
Add categories
Categorizing communities improves discoverability. Fetch available categories, then set category IDs on creation.Full reference → Community Categories
TypeScript
Handle membership — join and leave
For public communities, join is immediate. For private communities, joining sends a request that moderators can accept or reject.Full reference → Join / Leave Community
TypeScript
Manage member roles
Promote members to moderator or admin, ban members, or remove them from the community.Full reference → Member Management
TypeScript
Invite members (private communities)
For private communities, invite specific users by their user IDs. Invitees receive a notification and can accept or decline.Full reference → Community Invitation
TypeScript
Discover communities
Query trending and recommended communities for an explore page, or browse by category.Full reference → Trending & Recommended Communities · Query Communities
TypeScript
Connect to Moderation & Analytics
.png?fit=max&auto=format&n=1NUkPv8NmKhPS-wU&q=85&s=b1ea7db571336128b914173b4e53ae74)
Admin Console: community management
Admin Console: community management
The Admin Console gives moderators a full view of every community: member lists, post queues (when
ADMIN_REVIEW_POST_REQUIRED is set), banned users, and community settings.→ Admin Console: Social ManagementWebhook: community events
Webhook: community events
Subscribe to
community.created, member.joined, member.left, and post.flagged webhook events to sync community state with your own backend or trigger automation.→ Webhook EventsPush notifications: community activity
Push notifications: community activity
Subscribe users to community push notifications so they’re alerted when new posts are approved or when they’re mentioned.→ Community Notification Settings
Common Mistakes
Best Practices
Privacy & governance
Privacy & governance
- Default new communities to public unless your use case requires private — discoverability drives growth
- Use
ADMIN_REVIEW_POST_REQUIREDfor communities with compliance requirements (e.g., healthcare, finance) - Define clear community guidelines and surface them during the join flow
- Assign at least two moderators per community to avoid single-point-of-failure moderation
Performance
Performance
- Cache category lists — they change infrequently
- Paginate member queries (
queryMembers) with a reasonable page size (20-50) - Use Live Collections for member counts so they update in real-time without manual refresh
User experience
User experience
- Show the member count and post count on community cards to signal activity level
- Surface trending communities on the home screen to drive initial engagement
- Send an in-app notification when a private community approves a join request
Next Steps
Your next step → Roles, Permissions & Governance
Communities are live — now set up moderator roles, post review gating, and ban management.
Build a Social Feed
Query and render the community feed
Rich Content Creation
Let community members create posts
Content Moderation Pipeline
Set up moderation for community content