Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature (Phase 1): Extend resources schema for opportunities (kind, opensAt, recurrence, amount, provider, eligibility)

Đang mở
#78 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Aryan-Techie đang làm issue này rồi.

Từ ngày 20/10/2026.

  • #99 của @Aryan-Techie — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
database, frontend

Hướng nghiên cứu

Start with the resources table definition in src/db/schema.ts, then follow the Resource type and column list in src/lib/resources.ts and the fixtures in src/lib/mock-data.ts. Add the new columns and the ResourceEligibility type, generate the Drizzle migration, and check that it applies without changing the existing rows, which should default to kind = 'perk'. Done when the admin form in src/components/admin/resource-form.tsx and the actions in src/app/admin/(dashboard)/actions.ts create and edit the new fields.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Description

Tracked from docs/2026-09-18-improvement-plan.md (§4 Phase 1 — Schema additions).

To support scholarships, fellowships, internships, mentorship programs, and open-source/hackathon programs alongside software perks, resources needs orthogonal opportunity fields (all nullable or defaulted with zero migration risk to existing perk rows).

Schema Additions (src/db/schema.ts)

  1. kind enum column:
    kind: text("kind", {
      enum: ["perk", "scholarship", "fellowship", "internship", "mentorship", "program"],
    })
      .notNull()
      .default("perk"),
    
    (Categories stay as they are; kind is orthogonal.)
  2. Timeline & funding metadata:
    • opensAt: timestamp("opens_at")
    • deadline: timestamp("deadline") (already exists)
    • recurrence: text("recurrence") (e.g. "annual, opens Feb")
    • amount: text("amount") (e.g. "₹31,000/month", "$1,500–6,600")
    • provider: text("provider") (e.g. "Google", "AICTE", "Ministry of Education")
  3. Structured eligibility JSONB column:
    export type ResourceEligibility = {
      levels?: ("UG" | "PG" | "PhD" | "HighSchool")[];
      countries?: string[]; // ISO codes e.g. ["IN"]
      states?: string[];
      minYear?: number;
      maxAge?: number;
      gender?: string;
      incomeCapInr?: number;
      fields?: string[]; // e.g. ["CS", "ECE"]
    };
    
    • eligibility: jsonb("eligibility").$type<ResourceEligibility>()
  4. Update Resource type & Admin form:
    • Expose the new columns in src/lib/resources.ts (resourceColumns, Resource type) and src/lib/mock-data.ts.
    • Add inputs for kind, opensAt, recurrence, amount, provider, and eligibility in src/components/admin/resource-form.tsx and admin actions (src/app/admin/(dashboard)/actions.ts).

Acceptance Criteria

  • src/db/schema.ts defines kind, opensAt, recurrence, amount, provider, and eligibility on resources (and ingestion_candidates where applicable).
  • Drizzle migration is generated and applies cleanly without breaking existing 593 rows (which default to kind = 'perk').
  • Resource TypeScript type, mock data, and /admin create/edit resource form support the new fields.

Files Involved

  • src/db/schema.ts
  • src/lib/resources.ts
  • src/lib/mock-data.ts
  • src/components/admin/resource-form.tsx
  • src/app/admin/(dashboard)/actions.ts
Ngôn ngữ chính
TypeScript
Star
1
Fork
6
Merge trung bình
1 ngày 41 phút
Pull request đã merge (30 ngày)
28

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Your-Voldemort/StudentStack

Tất cả issue của Your-Voldemort/StudentStack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.