Phase 3: Implement personalization signals (branch/year onboarding + ranking boost)
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- postgresql, supabase, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 6
- 平均マージ
- 22時間 9分
- マージ済み PR(30日)
- 42
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Your-Voldemort/StudentStack のほかの issue
-
/submit, /my-list, and /onboarding return 500 when Supabase isn't configured対応中かも @Aryan-Techie が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Your-Voldemort/StudentStack#127 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Your-Voldemort/StudentStack#126 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Your-Voldemort/StudentStack#120 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Your-Voldemort/StudentStack#119 ·
メンテナーはふだん 1 日以内に返信
-
Past deadlines labelled "today"; search placeholder ignores eligibility filter対応中かも @Aryan-Techie が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Your-Voldemort/StudentStack#118 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
Your-Voldemort/StudentStack の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
phivk/rubiks-lab#33 ·
メンテナーはふだん 1 日以内に返信
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be edited対応中かも @ManyaJain111 が今日担当しました。 オープンbug enhancement possible-duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
AOSSIE-Org/PictoPy#1637 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
chaitin/MonkeyCode#1437 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area:cards enhancement migration ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
fil-donadoni/tolaria#6309 ·
メンテナーはふだん 1 日以内に返信