AOSSIE-Org / AOSSIE-Org/DebateAI

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

Ouverte
#414 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
TypeScript
Étoiles
84
Forks
198
Merge moyen
2 j 19 h
PR mergées (30 j)
30

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
typescript
Domaine
full-stack
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.