AOSSIE-Org / AOSSIE-Org/DebateAI

[FEATURE]: Direct Friend Challenge invite specific users via shareable link

オープン
#414 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
TypeScript
スター
84
フォーク
198
平均マージ
2日 19時間
マージ済み PR(30日)
30

説明

### Feature and its Use Cases

## Problem
Right now, users can only debate through public rooms or matchmaking.
There is no easy way to challenge a specific friend directly.

## What we want
Add a **"Challenge a Friend"** feature so one user can invite another user to a private 1v1 debate.

## How it should work

### 1. Create challenge
- User is logged in
- User clicks **Challenge a Friend**
- User enters:
- Debate topic (required)
- Opponent username (optional)
- System creates a private 2-player room

### 2. Share invite link
- System gives a private invite link
- User shares that link with their friend (WhatsApp, copy link, etc.)

### 3. Friend joins
- Friend opens the invite link
- If not logged in, friend signs in first and is redirected back to the room
- Friend joins the same room (max 2 players)
- Both users use the existing online debate room flow (same lobby + WebSocket)

### 4. Rematch
- After the debate ends, either player can click **Rematch**
- A new room is created with the same topic
- They can debate again using a new invite link

## Technical approach
- Reuse existing room and WebSocket logic
- Add only small backend changes:
- Invite token validation
- Max 2 players for challenge rooms
- Challenge create + rematch APIs

## Acceptance criteria
- [ ] User can create a challenge with a topic
- [ ] User gets a shareable invite link
- [ ] Friend can join using the link
- [ ] Only 2 players can join the challenge room
- [ ] Debate works with existing online room flow
- [ ] Rematch option appears after challenge debates

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by locating the existing room, lobby, authentication redirect, and WebSocket flow, then trace how rooms are created and joined. Use those entry points to assess the challenge create, invite-link, two-player limit, and rematch requirements. Done means each acceptance criterion is supported and the existing online debate flow still works.

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

評価

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

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

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