Community Builder
Turn groups into thriving communities with invitation tracking, viral growth mechanics, and engagement analytics
Overview
Community Builder transforms OMOBL SSO from a simple access control system into a powerful community growth engine. Track invitation chains, measure engagement, reward top builders, and create engaging onboarding experiences.
Core Features
Track who invited whom, measure invitation conversion rates, and identify top community builders. Each user record includes invitedById and originalGroupId fields.
Create custom onboarding workflows with steps, progress tracking, and completion rewards. Different workflows for members vs. admins.
Track member growth, engagement rates, app adoption, active builders, and more. Visual dashboards powered by Recharts.
Real-time feed of community activity: new members, app launches, milestones, and achievements. Keeps communities engaged and aware.
Invitation Tracking
Every user record tracks their community origin and inviter:
Database Schema
model User {
id String @id
// ... other fields
// Community Builder Tracking
invitedById String?
invitedBy User? @relation("CommunityInviter")
invitedMembers User[] @relation("CommunityInviter")
originalGroupId String?
originalGroup Group? @relation("OriginalGroupMember")
}Invitation Analytics
Query invitation chains to identify top builders:
// Get top 10 community builders
const topBuilders = await prisma.user.findMany({
include: {
_count: {
select: { invitedMembers: true }
}
},
orderBy: {
invitedMembers: {
_count: 'desc'
}
},
take: 10
});Onboarding Workflows
Guide new members through structured onboarding experiences:
Workflow Schema
model OnboardingWorkflow {
id String @id
groupId String
group Group @relation(fields: [groupId])
name String
description String?
targetRole UserRole // MEMBER or GROUP_ADMIN
steps Json // Array of step objects
isActive Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
userProgress OnboardingProgress[]
}Step Structure
{
"steps": [
{
"id": "welcome",
"title": "Welcome to the Community",
"description": "Learn about our mission",
"type": "content",
"required": true,
"order": 0
},
{
"id": "profile",
"title": "Complete Your Profile",
"description": "Add photo and bio",
"type": "action",
"actionType": "complete_profile",
"required": true,
"order": 1
},
{
"id": "first-app",
"title": "Launch Your First App",
"description": "Try one of our apps",
"type": "action",
"actionType": "launch_app",
"required": false,
"order": 2
}
]
}Tracking Progress
model OnboardingProgress {
id String @id
userId String
user User @relation(fields: [userId])
workflowId String
workflow OnboardingWorkflow @relation(fields: [workflowId])
completedSteps Json // Array of completed step IDs
currentStep String?
progress Float // 0-100 percentage
startedAt DateTime @default(now())
completedAt DateTime?
@@unique([userId, workflowId])
}Community Metrics Widget
Real-time dashboard widget showing key community KPIs:
- Total members
- New members this week/month
- Growth rate (%)
- Active vs inactive members
- Active users (last 7/30 days)
- App launches per member
- Average session duration
- Engagement score
- Active inviters count
- Invitations sent this week
- Conversion rate (%)
- Top 5 builders leaderboard
- Apps per member (average)
- Most popular apps
- Adoption rate by app
- First-app completion rate
Activity Feed Widget
Live stream of community events to drive engagement:
Sarah Johnson joined the community
Invited by Michael Smith • 2 minutes ago
Emma Williams launched BMB App
First app launch • 15 minutes ago
James Brown completed onboarding
100% progress • 1 hour ago
Michael Smith reached 10 invitations!
Builder milestone • 3 hours ago
API Reference
GET /api/groups/[id]/community/metrics
Get community metrics for a group (member growth, engagement, builder activity, app adoption)
GET /api/groups/[id]/activity
Get the group activity feed, cursor-paginated. Requires the activity-feed module to be enabled for the group.
GET /api/groups/[id]/community/projects
Get subgroups (projects) with member counts and energy levels
GET /api/groups/[id]/onboarding/workflows
Get all onboarding workflows for a group
POST /api/onboarding/progress
Update user's onboarding progress (complete step, mark workflow complete)
Best Practices
See Also
- Widget System - Learn about the widget framework
- Group Management - Manage groups and members
- Invitations - Invitation system details
- Analytics - Analytics and reporting