diff --git a/prisma/schema.prisma b/prisma/schema.prisma index edf8229..7a22fe8 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -199,7 +199,8 @@ model User { country String? // User's home country (for mentor matching) metadataJson Json? @db.JsonB - // Profile image + // Profile + bio String? // User bio for matching with project descriptions profileImageKey String? // Storage key (e.g., "avatars/user123/1234567890.jpg") profileImageProvider String? // Storage provider used: 's3' or 'local' diff --git a/src/app/(auth)/onboarding/page.tsx b/src/app/(auth)/onboarding/page.tsx index d25ba25..4678a86 100644 --- a/src/app/(auth)/onboarding/page.tsx +++ b/src/app/(auth)/onboarding/page.tsx @@ -25,6 +25,7 @@ import { import { toast } from 'sonner' import { ExpertiseSelect } from '@/components/shared/expertise-select' import { AvatarUpload } from '@/components/shared/avatar-upload' +import { Textarea } from '@/components/ui/textarea' import { User, Phone, @@ -36,9 +37,10 @@ import { ArrowLeft, Camera, Globe, + FileText, } from 'lucide-react' -type Step = 'name' | 'photo' | 'country' | 'phone' | 'tags' | 'preferences' | 'complete' +type Step = 'name' | 'photo' | 'country' | 'bio' | 'phone' | 'tags' | 'preferences' | 'complete' export default function OnboardingPage() { const router = useRouter() @@ -48,6 +50,7 @@ export default function OnboardingPage() { // Form state const [name, setName] = useState('') const [country, setCountry] = useState('') + const [bio, setBio] = useState('') const [phoneNumber, setPhoneNumber] = useState('') const [expertiseTags, setExpertiseTags] = useState([]) const [lockedTags, setLockedTags] = useState([]) @@ -70,6 +73,10 @@ export default function OnboardingPage() { if (userData.country) { setCountry(userData.country) } + // Pre-fill bio if available + if (userData.bio) { + setBio(userData.bio) + } // Pre-fill phone if available if (userData.phoneNumber) { setPhoneNumber(userData.phoneNumber) @@ -96,10 +103,10 @@ export default function OnboardingPage() { // Dynamic steps based on WhatsApp availability const steps: Step[] = useMemo(() => { if (whatsappEnabled) { - return ['name', 'photo', 'country', 'phone', 'tags', 'preferences', 'complete'] + return ['name', 'photo', 'country', 'bio', 'phone', 'tags', 'preferences', 'complete'] } // Skip phone step if WhatsApp is disabled - return ['name', 'photo', 'country', 'tags', 'preferences', 'complete'] + return ['name', 'photo', 'country', 'bio', 'tags', 'preferences', 'complete'] }, [whatsappEnabled]) const currentIndex = steps.indexOf(step) @@ -128,6 +135,7 @@ export default function OnboardingPage() { await completeOnboarding.mutateAsync({ name, country: country || undefined, + bio: bio || undefined, phoneNumber: phoneNumber || undefined, expertiseTags, notificationPreference, @@ -302,7 +310,49 @@ export default function OnboardingPage() { )} - {/* Step 4: Phone (only if WhatsApp enabled) */} + {/* Step 4: Bio */} + {step === 'bio' && ( + <> + + + + About You + + + Tell us a bit about yourself and your expertise. This helps us match you with relevant projects. (Optional) + + + +
+ +