Phase 3: Implement personalization signals (branch/year onboarding + ranking boost)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, supabase, typescript
- Lĩnh vực
- authentication, database, frontend, full-stack
Hướng nghiên cứu
Start with PRD §8.8 and inspect src/db/schema.ts, src/app/onboarding/page.tsx, src/app/onboarding/actions.ts, src/lib/resources.ts, src/components/directory/directory-client.tsx, src/proxy.ts, and scripts/normalize-data.ts. Trace the existing authentication, directory sorting, resource tags, and database conventions before choosing among the listed branch-mapping options. Done means optional branch/year onboarding, persisted profiles, incomplete-profile routing, and a non-filtering personalized ranking are covered by the acceptance criteria.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Implement personalization signals as specified in PRD §8.8. This is a P1 requirement for Phase 3.
Acceptance Criteria (from PRD §8.8)
- Onboarding asks branch + year (optional, skippable)
- Resources tagged to a branch (e.g., MATLAB, SolidWorks → ECE/Mechanical) sort higher for matching users — a ranking boost, never a hard filter
Current State
- No user profile table exists yet (only Supabase auth.users)
- Resources have tags but no branch mapping
- No onboarding flow exists
- Directory sorting currently: recommended (Fuse.js relevance), name, recent
Implementation Plan
- Create profiles table (extends Supabase auth.users):
userId(uuid, PK, references auth.users)branch(text, nullable) - e.g., "CSE", "ECE", "Mechanical", "Civil", etc.year(integer, nullable) - 1, 2, 3, 4, 5+completedOnboarding(boolean, default false)
- Add branch tags to resources:
- Map existing tags to branches (e.g., "MATLAB" → "ECE", "SolidWorks" → "Mechanical")
- Could add
branchTagscolumn to resources or use existing tags with a mapping
- Onboarding flow:
- After first sign-in, redirect to
/onboardingif not completed - Simple form: branch (select), year (select), skip button
- Store in profiles table
- After first sign-in, redirect to
- Personalized sorting:
- New sort option: "For you" (default for logged-in users with profile)
- Boost resources matching user's branch/year
- Ranking boost, not hard filter — all resources still visible
Files to Create/Modify
src/db/schema.ts- addprofilestablesrc/app/onboarding/page.tsx(new) - onboarding formsrc/app/onboarding/actions.ts(new) - Server Action to save profilesrc/lib/resources.ts- addgetUserProfile(),getPersonalizedResources()src/components/directory/directory-client.tsx- add "For you" sort optionsrc/proxy.ts- redirect to onboarding if profile incompletescripts/normalize-data.ts- add branch tag mapping (or separate seed)
Database Schema Addition
export const profiles = pgTable('profiles', {
userId: uuid('user_id').notNull().references(() => auth.users.id).primaryKey(),
branch: text('branch'), // 'CSE', 'ECE', 'Mechanical', 'Civil', 'EEE', etc.
year: integer('year'), // 1, 2, 3, 4, 5
completedOnboarding: boolean('completed_onboarding').notNull().default(false),
createdAt: timestamp('created_at').notNull().defaultNow(),
updatedAt: timestamp('updated_at').notNull().defaultNow(),
}).enableRLS();
Branch Mapping Strategy
Option A: Add branchTags array column to resources (explicit mapping)
Option B: Use existing tags with a static mapping in code (e.g., BRANCH_TAG_MAP = { 'MATLAB': 'ECE', ... })
Option C: Add branch column to resources (single branch per resource)
Recommend Option B for simplicity - use existing tags with a mapping config.
Sorting Algorithm
- Base score from Fuse.js (if searching) or 1.0
- If user has branch: +0.5 for each matching branch tag
- If user has year: +0.2 for resources relevant to that year (e.g., internships for year 3-4)
- Sort by combined score descending
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 6
- Merge trung bình
- 11 giờ 16 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Your-Voldemort/StudentStack
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Your-Voldemort/StudentStack#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Your-Voldemort/StudentStack#41 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Your-Voldemort/StudentStack#40 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Your-Voldemort/StudentStack#38 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Your-Voldemort/StudentStack#37 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Your-Voldemort/StudentStack
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
MystenLabs/MemWal#1163 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mondriaan
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
knaw-huc/textannoviz#709 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
billion-context-pi
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ranxianglei/billion-context#2521 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: YRF Music NepalĐang mởstreams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100