AOSSIE-Org / AOSSIE-Org/DebateAI

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

Offen
#414 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
84
Forks
198
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
30

Beschreibung

### 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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
full-stack
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.