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

Mentorship: session booking + ICS emails (Phase 6.4)

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
csharp, postgresql

調査の方向性

まず #9 と #10 の作業を確認し、次に既存の IEndpointModule.MapEndpoints パターンと tests/CommunityPro.Tests/Members/MembersTestHarness.cs のテストハーネスに従ってください。ここで説明されている3つのセッションエンドポイントと予約/メールの動作を実装し、DST の両方の切り替え、メンター関係をまたぐ重複、同時予約、アサートされた ICS の内容をカバーするテストを追加してください。

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

説明

mentorship

Scope

Book sessions against mentor availability, with calendar-attachment emails.

Data model

public sealed class Session
{
    public Guid Id { get; set; }
    public Guid MentorshipId { get; set; }
    public DateTimeOffset StartUtc { get; set; }  // stored UTC, always
    public int DurationMinutes { get; set; }      // 30 | 60
    public SessionStatus Status { get; set; }     // Scheduled | Completed | Cancelled
    public string? MeetingUrl { get; set; }       // mentor-provided free text (Meet/Zoom)
}

Endpoints (participants of the mentorship only)

Method Path Notes
GET /mentorship/{id}/slots?weekOf= open slots: availability minus existing sessions, computed in the mentor's IANA tz via NodaTime, returned as UTC instants
POST /mentorship/{id}/sessions book; validations below
POST /mentorship/sessions/{id}/cancel either participant, only while Scheduled

Booking validations

  1. Slot falls entirely inside the mentor's availability (evaluated in mentor-local time — DST-correct via NodaTime).
  2. No overlap with any of the mentor's existing Scheduled sessions (across all their mentorships).
  3. Start ≥ 12h in the future.
  4. Duration ∈ {30, 60}; mentorship is Active.

Emails

Booked/cancelled → both parties via Brevo, with an .ics attachment generated via Ical.Net (UTC times, summary, meeting URL when present). Best-effort as always.

Error codes

mentorship.not_found, mentorship.slot_unavailable, mentorship.slot_conflict, mentorship.too_soon, mentorship.invalid_state, mentorship.forbidden

Dependencies

Blocked by #9 and #10.

Acceptance criteria

  • DST boundary tests are mandatory: a slot spanning a DST transition in e.g. Europe/London or America/New_York books correctly; test both spring-forward and fall-back weeks
  • Overlap check covers sessions from the mentor's other mentorships
  • Concurrent booking of the same slot → exactly one succeeds
  • ICS content asserted in tests (times, attendees)
Conventions (project-wide, non-negotiable)
  • .NET 9, records for immutable shapes, file-scoped namespaces, primary constructors where they read well. Minimal-API endpoints grouped per module via IEndpointModule.MapEndpoints.
  • Result<T> (SharedKernel) instead of exception-driven control flow. Endpoint results map failures to ProblemDetails with the stable error codes listed above — the frontend keys off them.
  • Module owns its EF Core DbContext mapped to its own Postgres schema. Modules never reference each other's internals — cross-module needs go through a public contract interface or an in-process domain event (IEventPublisher).
  • All external calls (GitHub, Stripe, Brevo, Cloudinary, Meilisearch) behind interfaces owned by the consuming module.
  • Every list endpoint paginated (offset is fine). xUnit tests in tests/CommunityPro.Tests/<Module>/ following the existing harness patterns (see Members/MembersTestHarness.cs).
主要言語
C#
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

CommunityPro/community-pro-api のほかの issue

CommunityPro/community-pro-api の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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