We've built a comprehensive 4-step profile onboarding system that integrates seamlessly with your existing TribeFind infrastructure.
-
Step 1: Avatar & Basic Info
- Photo upload with avatar cropping (1:1 aspect ratio)
- Display name input with validation
- Username input with real-time uniqueness checking
- Visual feedback for upload progress
-
Step 2: Bio Creation
- 150-character bio textarea with live character count
- Helpful tips for writing engaging bios
- Optional step (users can skip)
-
Step 3: Interest Selection
- Full integration with existing
ActivitySelectorcomponent - Max 10 activity selections
- Skill level selection for each activity
- Category filtering and search functionality
- Full integration with existing
-
Step 4: Review & Complete
- Preview of complete profile
- Summary of selected interests
- Final confirmation before saving
- Dual Mode Search: Nearby users + Username search
- Smart Friend Management: Send/Accept/View friend requests
- Shared Interest Display: Shows count of common activities
- Real-time Friendship Status: Pending/Accepted/None indicators
- Pull-to-Refresh: Stay updated with latest users
- Smart Routing: New users → ProfileSetup → Main App
- Profile Completion Detection: Checks for required fields
- Gesture Prevention: Can't go back during setup
- 5-Tab Navigation: Home, Camera, Friends, Map, Profile
const isProfileComplete = (user: any): boolean => {
const hasUsername = user.username && user.username.trim() !== ''
const hasDisplayName = user.display_name && user.display_name.trim() !== ''
const isUsernameCustom = user.username && !user.username.startsWith('user_')
return hasUsername && hasDisplayName && isUsernameCustom
}- Uses existing
userstable for profile data - Uses existing
user_activitiestable for interests - Uses existing
friendshipstable for friend connections - Uses existing Supabase storage for avatar uploads
- Avatar-focused uploads: Square cropping, optimized for profiles
- Reuses existing storage infrastructure: Same bucket, different path structure
- Fallback gracefully: Uses emoji if upload fails
- Progress indicators: Visual feedback during upload
1. User signs up → AuthScreen
2. Profile incomplete → ProfileSetupScreen (4 steps)
3. Setup complete → Main App (5 tabs)
4. Discover friends → Friends tab → UserSearchScreen
5. Build tribe → Map tab shows friends + nearby users
1. User signs in → AuthScreen
2. Profile complete → Main App directly
3. Access all features immediately
- Create New Account: Sign up with new email
- Should Route to ProfileSetup: Not main app yet
- Step 1: Add avatar, enter display name & username
- Step 2: Write bio (optional)
- Step 3: Select 3-5 activities with skill levels
- Step 4: Review and complete
- Should Route to Main App: With 5 tabs visible
- Go to Friends Tab: New people icon in tab bar
- See Nearby Users: List of other signed-up users
- Search by Username: Type to search specific users
- Send Friend Requests: Tap "Add Friend" button
- Accept Requests: If someone sent you one
- Check Status: Pending/Friends/Accept indicators
- Complete Profile: Should see main app
- Incomplete Profile: Should see setup flow
- Can't Skip Setup: No back navigation during setup
- Proper Tab Order: Home, Camera, Friends, Map, Profile
- ✅ Minimum 3 characters
- ✅ Letters, numbers, underscores only
- ✅ Real-time uniqueness checking
- ✅ Case-insensitive storage
- ✅ No reserved usernames
- ✅ 150 character limit
- ✅ Live character count
- ✅ Optional field
- ✅ XSS prevention
- ✅ Row Level Security on friendships table
- ✅ Prevent duplicate friend requests
- ✅ Proper status management
- ✅ Users can only manage their own requests
- Snapchat-inspired: Yellow gradient backgrounds
- Modern Components: Cards, shadows, smooth animations
- Consistent Iconography: Ionicons throughout
- Responsive Layout: Works on all screen sizes
- Progress Indicators: Step progress bars
- Loading States: Spinners and disabled states
- Error Handling: Inline validation messages
- Success Feedback: Alerts and status indicators
- Clear Labels: Descriptive text for all inputs
- Visual Hierarchy: Proper font sizes and weights
- Touch Targets: Adequate button sizes
- Color Contrast: Readable text on all backgrounds
- ✅ ActivitySelector: Full integration with selection logic
- ✅ Supabase Storage: Reuses photo upload infrastructure
- ✅ Auth System: Seamless integration with authentication
- ✅ Database Schema: Uses existing tables and relationships
- ✅ Profile Completion Check: Smart routing logic
- ✅ Friends Tab: New dedicated friend discovery
- ✅ Setup Prevention: Can't skip onboarding
- ✅ Progressive Enhancement: Works with existing features
-- Updates users table with profile data
UPDATE users SET
username = ?,
display_name = ?,
bio = ?,
avatar = ?
WHERE id = user_id
-- Inserts selected activities
INSERT INTO user_activities (user_id, activity_id, skill_level)
VALUES (?, ?, ?)-- Searches users with shared interests
SELECT users.*, COUNT(shared_activities) as shared_count
FROM users
JOIN user_activities ON users.id = user_activities.user_id
WHERE username ILIKE '%query%' OR display_name ILIKE '%query%'
-- Manages friendship status
INSERT INTO friendships (requester_id, addressee_id, status)
VALUES (?, ?, 'pending')"ProfileSetup not showing"
- Check user.username is not auto-generated
- Verify isProfileComplete logic
- Check navigation state in console
"Avatar upload failing"
- Ensure Supabase storage bucket exists
- Check photo permissions granted
- Verify storage policies are set up
"Activities not saving"
- Check ActivitySelector integration
- Verify user_activities table exists
- Check RLS policies on database
"Friends not loading"
- Verify friendships table exists
- Check user authentication
- Run COMPLETE_DATABASE_SETUP.sql
Your implementation is successful if:
- ✅ New users see ProfileSetup before main app
- ✅ Existing users skip ProfileSetup and go to main app
- ✅ Avatar upload works with visual feedback
- ✅ Username validation works with uniqueness checking
- ✅ ActivitySelector integration saves to database
- ✅ Friend search/discovery shows real users
- ✅ Friend requests work with proper status management
- 🎨 Profile themes and customization
- 📸 Multiple profile photos
- 🏆 Achievement badges
- 📊 Profile completion percentage
- 💬 Direct messaging between friends
- 👥 Friend groups and categories
- 🌍 Location-based friend suggestions
- 🔔 Friend activity notifications
- 🎭 Profile personality quiz
- 🎯 Interest recommendation engine
- 📍 Location-based activity suggestions
- 🎥 Video profile introductions
ProfileSetup + Friend Discovery is now fully functional!
Users get a beautiful 4-step onboarding experience that captures their profile, interests, and helps them discover their tribe. The system integrates seamlessly with your existing infrastructure while providing a modern, engaging user experience.
Ready to find your tribe! 🌟