AOSSIE-Org / AOSSIE-Org/DebateAI

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

Open
#414 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
84
Forks
198
Avg merge
2d 19h
Merged PRs (30d)
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

Contributor guide

No contributing guide indexed for this repository

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.