feat: implement Phase 2 - Matches API with real-time notifications

Backend changes:
- Add matches API routes (POST, GET, PUT, DELETE)
- Create/accept/reject match requests
- Auto-create private chat rooms on match acceptance
- Socket.IO notifications for match events (received, accepted, cancelled)
- Users join personal rooms (user_{id}) for notifications

Frontend changes:
- Add MatchesPage component with inbox UI
- Matches navigation link with notification badge
- Real-time match request count updates
- Accept/reject match functionality
- Filter matches by status (all/pending/accepted)
- Integrate match requests in EventChatPage (UserPlus button)

Features:
- Send match requests to event participants
- Accept incoming match requests
- Real-time notifications via Socket.IO
- Automatic private chat room creation
- Match status tracking (pending/accepted/completed)
- Authorization checks (only participants can match)
- Duplicate match prevention
This commit is contained in:
Radosław Gierwiało
2025-11-14 19:22:23 +01:00
parent eaf80c6c6f
commit 4a3e32f3b6
8 changed files with 1102 additions and 9 deletions

View File

@@ -10,6 +10,7 @@ import EventChatPage from './pages/EventChatPage';
import EventDetailsPage from './pages/EventDetailsPage';
import EventCheckinPage from './pages/EventCheckinPage';
import MatchChatPage from './pages/MatchChatPage';
import MatchesPage from './pages/MatchesPage';
import RatePartnerPage from './pages/RatePartnerPage';
import HistoryPage from './pages/HistoryPage';
import ProfilePage from './pages/ProfilePage';
@@ -118,6 +119,14 @@ function App() {
</ProtectedRoute>
}
/>
<Route
path="/matches"
element={
<ProtectedRoute>
<MatchesPage />
</ProtectedRoute>
}
/>
<Route
path="/matches/:matchId/chat"
element={