Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Phase 5: Reviews & ratings system

オープン
#37 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
supabase, typescript

調査の方向性

Start with PRD §8.11 and the existing reviews table in src/db/schema.ts, then inspect the resource and authentication flows used by the listed files. Review src/app/reviews/actions.ts, src/lib/resources.ts, resource-card.tsx, resource-detail-dialog.tsx, and the new rating-stars.tsx component. Done means authenticated eligible users can manage reviews, public users can view them, and cards show the specified aggregate rating.

索引モデルが issue の本文から書いたものです。

説明

enhancement

Description

Implement reviews and ratings as specified in PRD §8.11. This is a P2 requirement for Phase 5.

Acceptance Criteria (from PRD §8.11)

  • reviews table already modeled; ship the read path once there's enough logged-in traffic to expect write volume
  • Users can rate (1-5) and comment on resources they've bookmarked/used

Current State

  • Database schema already has reviews table (src/db/schema.ts lines 83-92):
    • id, resourceId, userId, rating (1-5), comment, createdAt
    • RLS enabled
  • No UI or API for reviews exists yet
  • Requires authenticated users (Phase 3)

Implementation Plan

  1. Review API/Server Actions:
    • Create review (requires auth, must have bookmarked resource)
    • Update review
    • Delete review
    • Get reviews for a resource
  2. ResourceCard integration:
    • Show average rating + review count
    • "Write a review" button for authenticated users who bookmarked
  3. Review display:
    • On resource detail (if /resource/[slug] page exists) or in card dialog
    • List reviews with rating, comment, user (anonymous), date
  4. Aggregate stats:
    • Average rating per resource
    • Review count
    • Update resource card to show stars

Files to Create/Modify

  • src/app/reviews/actions.ts (new) - Server Actions for review CRUD
  • src/lib/resources.ts - add getResourceReviews(), getResourceRating(), createReview(), updateReview()
  • src/components/directory/resource-card.tsx - show rating stars
  • src/components/directory/resource-detail-dialog.tsx - add reviews section
  • src/components/ui/rating-stars.tsx (new) - star rating display/input component

Database Schema (already exists)

reviews: {
  id: serial PK
  resourceId: integer (FK to resources)
  userId: uuid (FK to auth.users)
  rating: integer (1-5)
  comment: text
  createdAt: timestamp
}

RLS Policy

  • Users can only INSERT/UPDATE/DELETE their own reviews
  • Anyone can SELECT reviews (public read)
  • Consider: only allow reviews if user has bookmarked the resource (application tracker integration)

UX Notes

  • Star rating input (1-5) + optional text comment
  • Show "Verified student" badge if user has .edu email (from Supabase Auth)
  • Aggregate: "4.2 ★ (23 reviews)"
  • Sort reviews: most recent, highest rated, most helpful
主要言語
TypeScript
スター
1
フォーク
6
平均マージ
12時間 7分
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Your-Voldemort/StudentStack のほかの issue

Your-Voldemort/StudentStack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。