AOSSIE-Org / AOSSIE-Org/DebateAI

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

未关闭
#414 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
TypeScript
星标
84
派生
198
平均合并
2 天 19 小时
30 天内合并 PR
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
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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