-
Notifications
You must be signed in to change notification settings - Fork 1
Sprint4
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. Over this sprint, our frontend team implemented several significant enhancements to the Sportify platform, dramatically improving both functionality and user experience. We completely revamped the Home page with an intuitive search feature that allows users to filter events by title or description, complemented by a clean card-based UI displaying event details with sport-specific emojis and participant counts. The EventDetails page received a major upgrade with an interactive map integration, real-time participant tracking, and a WebSocket-powered chat system enabling event attendees to communicate seamlessly. We also refined the event creation workflow with Google Maps location selection, making it easier for users to precisely pinpoint event locations. The authentication flow was strengthened with proper JWT token handling and profile verification, ensuring users are directed to appropriate pages based on their profile status. Additionally, we implemented responsive design improvements across all pages, enhanced navigation between components, and added visual feedback for user actions like joining or leaving events. These frontend changes collectively create a more cohesive, intuitive, and engaging platform for sports enthusiasts to connect and organize activities.
| 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 |
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.
- Created a new lightweight
GET /events-simpleendpoint, which returns all the events without needing a request body. - Enhanced the original
GET /eventsto include:- Event participants list
- Event owner's details (name, email, etc.)
- Previously required email in PUT/POST payload. Now, email is fetched from middleware context, ensuring data security and consistency.
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
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
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
- Intuitive Search Feature: Implemented dynamic filtering of events by title or description, allowing users to quickly find relevant activities.
- Interactive Map Integration: Added map visualization of event locations to help users easily find where activities are taking place.
- Comprehensive User Profiles: Created a robust profile page where users can manage personal information, sports preferences, and view a personalized dashboard of their activity.
- Event Management Interface: Added sections in the profile page that display events created by the user and events they've joined, enabling easy tracking and management of sports activities.
- Streamlined Event Creation: Developed an intuitive form with validation for creating new sports events with all necessary details including title, sport type, location, and participant limits.
- Event Modification System: Implemented a dedicated page for event owners to update event details, with pre-populated fields and real-time validation for a seamless editing experience.
- WebSocket-powered Chat System: Enabled seamless communication between event participants through a real-time messaging interface.
- Google Maps Integration: Refined event creation workflow with precise location selection capabilities for more accurate event coordination.
- JWT Token Handling: Strengthened user authentication with proper token management and profile verification for secure access control.
- Responsive Design: Implemented responsive layouts across all pages for optimal viewing on various devices and screen sizes.
- Enhanced Component Navigation: Improved the flow between different sections of the application for a more intuitive user journey.
- Visual Action Feedback: Added clear visual indicators for user actions like joining or leaving events to improve interaction clarity.
- Seamless API Communication: Optimized the data exchange between React frontend and Go backend through standardized API calls, implementing proper error handling and state management to ensure consistent user experience across all features.
-
src/__tests__/CreateEvent.test.js- Tests for event creation form rendering and validation -
src/__tests__/Login.test.js- Tests for login form functionality and navigation -
src/__tests__/Main.test.js- Tests for main landing page components and navigation -
src/App.test.js- Basic tests for the main App component
-
cypress/e2e/login.cy.js- End-to-end tests for login flow, profile access, and event creation
-
cypress/component/Main.cy.js- Component tests for the main landing page navigation and UI elements -
cypress/component/Profile.cy.js- Component tests for profile creation form validation and interactions -
cypress/component/MyProfile.cy.js- Component tests for user profile dashboard and event management -
cypress/component/Register.cy.js- Component tests for user registration form validation and navigation -
cypress/component/Forgotpass.cy.js- Component tests for password reset functionality
-
jest.config.js- Jest configuration with JSDOM environment setup -
jest.setup.js- Global test setup with testing library imports -
cypress.config.js- Cypress configuration with webpack preprocessor -
src/setupTests.js- Setup file for React Testing Library
- 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"
}
]
}
]- 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).
- Description: Initiates Google SSO login.
- Response: Redirects to Google OAuth.
- Description: Handles callback from Google SSO and processes the login.
- Response: Creates user session or returns JWT token.
The backend includes comprehensive unit tests for the WebSocket and chat functionality, ensuring reliable real-time communication:
-
TestNewHub: Verifies proper hub initialization with all required channels and maps -
TestHubRun: Tests the hub's main event loop, including:- Client registration
- Client unregistration
- Message broadcasting
-
TestHandleWebSocket: Tests WebSocket connection handling:- Connection establishment
- Message sending/receiving
- Client registration in the hub
-
TestMessageBroadcast: Validates message broadcasting between multiple clients:- Message delivery to all connected clients
- Proper message formatting
- Correct sender information
-
TestMessageHistory: Ensures new clients receive message history when joining:- Message storage
- History retrieval
- Proper message ordering
-
TestMessageJSON: Verifies proper JSON serialization/deserialization of chat messages
-
TestEventStore_Join: Tests event joining functionality:- Successful join operation
- Duplicate join prevention
- Invalid event handling
-
TestCreateEventHandler: Validates event creation with WebSocket support -
TestGetEventHandler: Tests event retrieval with participant information -
TestUpdateEventHandler: Ensures proper event updates -
TestDeleteEventHandler: Verifies event deletion and cleanup
-
TestJWTAuthenticator_GenerateToken: Validates token generation for WebSocket authentication -
TestJWTAuthenticator_ValidateToken_Success: Tests successful token validation -
TestJWTAuthenticator_ValidateToken_InvalidToken: Verifies rejection of invalid tokens -
TestJWTAuthenticator_ValidateToken_WrongSecret: Ensures token security
These tests ensure the reliability and security of our chat and WebSocket implementation, covering:
- Connection handling
- Message broadcasting
- Authentication and authorization
- Error handling
- Data persistence
- Real-time communication
- Client management
Here's our Github Repository for Sportify - Sportify Repo
Here's our Github Project Board - Sportify Project Board
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.