Skip to content

Conversation

rixitgithub
Copy link
Contributor

Implement Live Debate Room Creation and Join Flow with Authenticated Participation

Overview

This PR establishes the backend foundation for live, open debate rooms. It allows users to create, discover, and join ongoing debates in real-time, paving the way for future matchmaking and WebSocket-based interactions.

New API Endpoints

  • POST /rooms
    Creates a new debate room of type public, private, or invite. The authenticated user is automatically added as the first participant using their JWT-based identity.

  • GET /rooms
    Fetches all currently active rooms. This is intended for room discovery on the frontend (e.g., room lobby or browser).

  • POST /rooms/:id/join
    Adds the requesting user to the room's participant list. User metadata — such as ID, display name, and Elo rating — is retrieved from the users collection based on their JWT-derived email.

Key Details

  • Authenticated routes via JWT-based middleware (AuthMiddleware).
  • Participant info is enriched dynamically from the database rather than passed in the request.
  • Ensures room and participant structure is consistent for real-time front-end integration.

Video

player_matchmaking.mp4

Zahnentferner and others added 25 commits December 3, 2024 10:38
…-Hide-Password-Functionality-46

password hide-visible feature added ( issue AOSSIE-Org#46 )
…DebateAI

- Added seamless post-sign-in user flow with navigation logic in React
- Implemented profile UI and /user backend routes with edit functionality
- Built leaderboard UI and /leaderboard API, sorting users by EloRating
- Created user and debate schemas in MongoDB with Go integration
- Seeded test data; updated config, auth, and dependencies for full stack support
…es and AI judgment using WebSocket and WebRTC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants