Add bio field and enhance smart assignment with bio matching
- Add bio field to User model for judge/mentor profile descriptions - Add bio step to onboarding wizard (optional step with 500 char limit) - Enhance smart assignment to match judge bio against project description - Uses keyword extraction and Jaccard-like similarity scoring - Only applies if judge has a bio (no penalty for empty bio) - Max 15 points for bio match on top of existing scoring - Fix geographic distribution query to use round relation for programId - Update score breakdown: tags (40), bio (15), workload (25), country (15) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,7 @@ export const userRouter = router({
|
||||
metadataJson: true,
|
||||
phoneNumber: true,
|
||||
country: true,
|
||||
bio: true,
|
||||
notificationPreference: true,
|
||||
profileImageKey: true,
|
||||
createdAt: true,
|
||||
@@ -789,6 +790,7 @@ export const userRouter = router({
|
||||
name: z.string().min(1).max(255),
|
||||
phoneNumber: z.string().optional(),
|
||||
country: z.string().optional(),
|
||||
bio: z.string().max(500).optional(),
|
||||
expertiseTags: z.array(z.string()).optional(),
|
||||
notificationPreference: z.enum(['EMAIL', 'WHATSAPP', 'BOTH', 'NONE']).optional(),
|
||||
})
|
||||
@@ -811,6 +813,7 @@ export const userRouter = router({
|
||||
name: input.name,
|
||||
phoneNumber: input.phoneNumber,
|
||||
country: input.country,
|
||||
bio: input.bio,
|
||||
expertiseTags: mergedTags,
|
||||
notificationPreference: input.notificationPreference || 'EMAIL',
|
||||
onboardingCompletedAt: new Date(),
|
||||
|
||||
Reference in New Issue
Block a user