Skip to content

Sprint4

abdul kalam azad shaik edited this page Apr 21, 2025 · 4 revisions

Sprint 4 Report - Sportify

Work Completed in Sprint 4

In Sprint 4, we focused on enhancing the user interaction features and making the platform more integrated and intuitive. We implemented chat functionality for event participants, enabling smoother communication within events. The backend was refined to better support frontend needs, such as adding missing participant and owner details in the event queries and fixing endpoint inconsistencies. Additionally, Google SSO was finally integrated for login, and the frontend was synced with backend APIs to bring full-stack functionality to the platform.


Issues for Sprint 4

Issue Number Title Objective Status
74 Enable Chat for Event Participants Allow users to chat within events they joined Completed
75 Simplified GET Events Endpoint Create new GET endpoint without requiring body Completed
78 Add Participants to Event List Modify query to include participant details Completed
79 Include Owner Details in Events Fetch event owner info in GET all events Completed
80 Simplify Profile API Payload Use middleware context to fetch user email Completed
82 Frontend-Backend Event Integration Complete integration of event-related APIs on frontend Completed
12 Implement Google SSO Add Google login for streamlined authentication Completed
81 Update DB Migrations for Google SSO Modify database to support Google SSO user model Completed

1. Chat Feature for Events

We introduced a real-time chat feature that enables participants of an event to communicate with each other directly through the platform. This supports:

  • Pre-event coordination (timing, equipment, etc.)
  • Quick Q&A between attendees
  • Last-minute changes or cancellations

Each event now has a dedicated chatroom, accessible once a user joins the event.


2. Backend API Improvements

Event API Enhancements

  • Created a new lightweight GET /events-simple endpoint, which returns all the events without needing a request body.
  • Enhanced the original GET /events to include:
    • Event participants list
    • Event owner's details (name, email, etc.)

Profile API Fixes

  • Previously required email in PUT/POST payload. Now, email is fetched from middleware context, ensuring data security and consistency.

3. Google SSO Integration

We finally rolled out Google Single Sign-On (SSO) to simplify the login process and reduce signup friction. This feature:

  • Allows users to log in with their Google account
  • Stores relevant user data via updated migrations
  • Works seamlessly with our existing auth middleware

4. Full Frontend Integration

We completed the frontend integration with all event endpoints, including:

  • Displaying participant info
  • Owner info on event tiles
  • Updating profile without needing user email
  • Ensuring chat, join, and leave functionalities are fully synced with backend
  • integrating google sso

5. Database Migrations

To support Google SSO, we made several database updates:

  • Added new fields for OAuth authentication in our auth tables
  • Updated user model and login flow to handle both email/password and Google login methods

6. API Documentation & Backend Endpoints

Event APIs

GET /events/all

  • Description: Retrieves a list of events with full detail.
  • Response (200 OK):
[
  {
    "id": 1,
    "event_owner": 2,
    "owner_first_name": "Alice",
    "owner_last_name": "Smith",
    "owner_email": "alice@example.com",
    "sport": "Basketball",
    "event_datetime": "2025-05-10T14:00:00Z",
    "max_players": 10,
    "location_name": "Community Center",
    "latitude": 40.712776,
    "longitude": -74.005974,
    "description": "Pickup basketball game",
    "title": "Weekend Hoops",
    "is_full": false,
    "created_at": "2025-04-18T10:00:00Z",
    "updated_at": "2025-04-18T10:00:00Z",
    "registered_count": 3,
    "participants": [
      {
        "id": 101,
        "event_id": 1,
        "user_id": 4,
        "first_name": "John",
        "last_name": "Doe",
        "joined_at": "2025-04-18T12:00:00Z"
      },
      {
        "id": 102,
        "event_id": 1,
        "user_id": 5,
        "first_name": "Jane",
        "last_name": "Smith",
        "joined_at": "2025-04-18T12:30:00Z"
      }
    ]
  }
]

GET /events/:id/chat

  • Description: Retrieves chat messages for a specific event ID.
  • Headers:
Authorization: Bearer JWT_TOKEN_HERE
  • Response: Returns a list of chat messages (structure varies based on implementation).

GET /auth/google

  • Description: Initiates Google SSO login.
  • Response: Redirects to Google OAuth.

GET /auth/google/callback

  • Description: Handles callback from Google SSO and processes the login.
  • Response: Creates user session or returns JWT token.

7. Github Repository Link

Here's our Github Repository for Sportify - Sportify Repo

8. Github Project

Here's our Github Project Board - Sportify Project Board

9. Docs

This document is also available in our Github Wiki Page

We have also updated our Design Docs with the latest architecture and changes in this sprint.


Clone this wiki locally