Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature (Phase 3): Accountless localStorage eligibility profile ('Only what I'm eligible for' toggle) + auth sync & per-user ICS

未关闭
#84 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
nextjs, react, supabase, typescript
领域
api, frontend

调研方向

Start with src/lib/directory-filters.ts and its test src/lib/directory-filters.test.ts: add the eligibility check inside applyFilters() and let the existing unit tests drive it. Then wire the toggle and the new src/components/directory/eligibility-sheet.tsx into src/components/directory/directory-client.tsx, persisting the profile to localStorage. The ICS route src/app/u/[token]/deadlines.ics/route.ts and the Supabase profile sync are separate pieces that can land later. Done means the toggle filters the directory and the new unit tests pass.

由索引模型根据 Issue 内容生成。

描述

enhancement

Description

Tracked from docs/2026-09-18-improvement-plan.md (§3.4 #1, §4 Phase 3.1 & 3.3). Relates to #34 and #42.

A key insight from the competitive landscape (§3.4 #1) is that students shouldn't have to create an account just to filter the directory down to what they can claim or apply to.

Implementation Plan

  1. Accountless Eligibility Profile (localStorage first, optional Supabase sync):
    • Build a skippable "My Eligibility" sheet/drawer accessible from the directory header:
      • Country / State (default IN)
      • Degree Level (UG / PG / PhD / HighSchool)
      • Year of study (1–5+)
      • Branch / Field (CS, ECE, Mechanical, Design, etc.)
      • Checkboxes: "I have a .edu / college email", "I have the GitHub Student Developer Pack", "I have a valid Student ID"
    • Persist immediately in localStorage so it works with zero sign-up friction.
    • When a user signs in (via existing Supabase Auth), sync the profile to profiles.
  2. "Only what I'm eligible for" toggle in Directory (src/lib/directory-filters.ts, src/components/directory/directory-client.tsx):
    • Single toggle switch in the directory filter bar: "Only what I'm eligible for".
    • Evaluates client-side inside applyFilters():
      • Matches resource.verificationNeeded against user's verification methods (.edu, GitHub Pack, Student ID).
      • Matches resource.region / regions against user's country.
      • Matches resource.eligibility (levels, countries, states, minYear, fields) where populated on the resource (treating unset eligibility fields as open/unrestricted).
  3. Per-user saved deadlines ICS feed (/u/[token]/deadlines.ics):
    • For signed-in users with bookmarked/tracked opportunities (#33), generate a personal calendar token so they can subscribe to /u/<token>/deadlines.ics containing only their saved/applied items with -P1D alerts.

Acceptance Criteria

  • Users can configure their eligibility profile without signing in, persisted in localStorage.
  • Toggling "Only what I'm eligible for" in /directory accurately filters resources across verificationNeeded, region, and eligibility JSONB rules.
  • Signed-in users have their local eligibility profile synced and can subscribe to /u/[token]/deadlines.ics for their bookmarked deadlines.
  • Unit tests in src/lib/directory-filters.test.ts verify client-side eligibility matching.

Files Involved

  • src/lib/directory-filters.ts
  • src/lib/directory-filters.test.ts
  • src/components/directory/directory-client.tsx
  • src/components/directory/eligibility-sheet.tsx (new)
  • src/app/u/[token]/deadlines.ics/route.ts (new)
主要语言
TypeScript
星标
1
派生
6
平均合并
23 小时 53 分钟
30 天内合并 PR
27

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Your-Voldemort/StudentStack 的其他 Issue

查看 Your-Voldemort/StudentStack 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。