Conversation
…nvitations, messaging, and materials - Add complete speaker service microservice with Prisma schema - Implement speaker profile CRUD operations - Add invitation management system for admin-speaker communication - Implement messaging system for admin-speaker communication - Add material upload and management functionality - Include RabbitMQ integration for user profile synchronization - Add comprehensive API routes and error handling
…tion - Add USER_PROFILE_UPDATED and USER_DELETED message types - Implement user profile update event publishing to RabbitMQ - Add speaker-specific profile update queue for real-time sync - Include updatedFields tracking for efficient synchronization - Enable automatic speaker profile updates when user data changes
…ls, invitations, and messaging - Add comprehensive speaker dashboard with tabbed navigation - Implement ProfileManagement component for speaker profile setup and updates - Add MaterialUpload component with drag-and-drop file upload functionality - Create InvitationManagement component for viewing and responding to invitations - Implement MessageCenter component for admin-speaker communication - Add useSpeakerData hook for centralized data management - Include speaker API client with all CRUD operations - Support profile setup flow for new speakers - Add real-time data loading and error handling
…nt features - Add SpeakerSearchModal component for admin speaker search and invitation - Implement admin API client with speaker search and invitation management - Enhance event modification page with speaker assignment functionality - Add invitation history tracking and accepted speaker display - Implement speaker profile loading from accepted invitations - Fix speaker profile API endpoint routing issues - Add comprehensive error handling and loading states
- Add Alert component for user notifications and error messages - Implement Progress component for file upload progress indication - Add Switch component for toggle functionality - Include Textarea component for multi-line text input - Support dark mode and responsive design - Provide consistent styling across speaker and admin interfaces
…ntegration - Add speaker service to docker-compose configuration - Update nginx gateway routing for speaker service endpoints - Add new frontend dependencies for enhanced UI components - Include react-dropzone for file upload functionality - Update package versions and lock files for consistency - Configure service discovery and load balancing
🧪 Test Results ✅
Summary: All automated checks have been completed for this PR. |
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive Speaker Service microservice for the Event Management System, enabling speaker profile management, invitation handling, messaging, and presentation material uploads. The service integrates with the existing auth service via RabbitMQ for automatic profile creation and provides full CRUD operations through REST APIs.
Key changes:
- New speaker-service microservice with TypeScript/Express/Prisma stack
- Speaker profile, invitation, messaging, and material management APIs
- RabbitMQ integration for event-driven speaker profile creation
- Frontend components for speaker dashboard with profile, invitations, messages, and material uploads
- Admin components for speaker search and invitation workflow
- Gateway routing configuration for speaker service endpoints
Reviewed Changes
Copilot reviewed 40 out of 42 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| ems-services/speaker-service/* | Complete new microservice implementation with TypeScript, Express, Prisma |
| ems-services/auth-service/* | Integration with speaker service via RabbitMQ messaging |
| ems-gateway/nginx.conf | Routing configuration for speaker service endpoints |
| ems-client/lib/api/* | API client implementations for speaker and admin operations |
| ems-client/components/speaker/* | Speaker dashboard UI components |
| ems-client/components/admin/* | Admin speaker search and invitation modal |
| ems-client/hooks/* | Custom React hook for speaker data management |
| docker-compose.yaml | Speaker service and database container configuration |
Files not reviewed (1)
- ems-client/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // src/utils/logger.ts | ||
|
|
||
| interface LogMeta { | ||
| [key: string]: any; |
There was a problem hiding this comment.
Using 'any' type defeats TypeScript's type safety. Consider using 'unknown' or a more specific type like 'Record<string, string | number | boolean | null>' to maintain type safety while allowing flexibility.
| try { | ||
| logger.debug('Searching speakers', filters); | ||
|
|
||
| const where: any = {}; |
There was a problem hiding this comment.
Using 'any' type bypasses TypeScript's type checking. Define a proper Prisma WhereInput type or use 'Prisma.SpeakerProfileWhereInput' to ensure type safety.
| @@ -0,0 +1,104 @@ | |||
| import { connect, Channel, ChannelModel } from 'amqplib'; | |||
There was a problem hiding this comment.
The 'ChannelModel' type does not exist in amqplib. The correct type for the connection should be 'Connection' from 'amqplib'. Line 18 should use 'Connection | undefined' instead of 'ChannelModel | undefined'.
| }); | ||
|
|
||
| // Get speaker's own profile | ||
| router.get('/profile/me', async (req: Request, res: Response) => { |
There was a problem hiding this comment.
The route order is problematic. '/profile/me' comes after '/:id', so this route will never match as Express will treat 'profile' as an ID parameter. Move this route definition before the '/:id' route (before line 44) to ensure proper matching.
| }); | ||
| } | ||
|
|
||
| const decoded = jwt.verify(token, JWT_SECRET) as any; |
There was a problem hiding this comment.
Using 'any' type defeats TypeScript's type safety. Define a proper JWT payload interface and use type assertion with that interface instead of 'any'.
| import { | ||
| User, | ||
| Mail, | ||
| Briefcase, | ||
| MapPin, | ||
| Calendar, | ||
| Save, | ||
| Edit, | ||
| CheckCircle, | ||
| AlertCircle, | ||
| Plus, | ||
| X | ||
| } from 'lucide-react'; |
There was a problem hiding this comment.
Unused imports Briefcase, MapPin.
| }; | ||
|
|
||
| // Component to render invitation card with event details | ||
| const InvitationCard = ({ invitation }: { invitation: SpeakerInvitation }) => { |
There was a problem hiding this comment.
Unused variable InvitationCard.
| import { | ||
| MessageSquare, | ||
| Send, | ||
| Mail, | ||
| MailOpen, | ||
| Clock, | ||
| User, | ||
| Reply, | ||
| AlertCircle | ||
| } from 'lucide-react'; |
There was a problem hiding this comment.
Unused import Clock.
| @@ -0,0 +1,342 @@ | |||
| import { useState, useEffect, useCallback } from 'react'; | |||
| import { useAuth } from '@/lib/auth-context'; | |||
| import { speakerApiClient, SpeakerProfile, SpeakerInvitation, Message, PresentationMaterial, MessageThread, CreateSpeakerProfileRequest, UpdateSpeakerProfileRequest } from '@/lib/api/speaker.api'; | |||
There was a problem hiding this comment.
Unused import MessageThread.
| import { speakerApiClient, SpeakerProfile, SpeakerInvitation, Message, PresentationMaterial, MessageThread, CreateSpeakerProfileRequest, UpdateSpeakerProfileRequest } from '@/lib/api/speaker.api'; | |
| import { speakerApiClient, SpeakerProfile, SpeakerInvitation, Message, PresentationMaterial, CreateSpeakerProfileRequest, UpdateSpeakerProfileRequest } from '@/lib/api/speaker.api'; |
| @@ -0,0 +1,206 @@ | |||
| import { BaseApiClient } from './base-api.client'; | |||
| import { eventAPI } from './event.api'; | |||
| import { speakerApiClient, SpeakerProfile, SpeakerSearchRequest, CreateInvitationRequest } from './speaker.api'; | |||
There was a problem hiding this comment.
Unused import SpeakerSearchRequest.
| import { speakerApiClient, SpeakerProfile, SpeakerSearchRequest, CreateInvitationRequest } from './speaker.api'; | |
| import { speakerApiClient, SpeakerProfile, CreateInvitationRequest } from './speaker.api'; |
• Speaker Service Backend: Complete microservice with profile management, invitations, messaging, and material uploads
• Speaker Dashboard: Full-featured dashboard with profile setup, material uploads, invitation management, and messaging
• Admin Speaker Management: Enhanced admin interface with speaker search, invitation system, and event-speaker assignment
• Real-time Synchronization: RabbitMQ integration for automatic speaker profile updates when user data changes
• File Upload System: Drag-and-drop material upload with progress tracking and file management
• Invitation Workflow: Complete invitation system allowing admins to invite speakers and speakers to accept/decline
• Messaging System: Admin-speaker communication with user-friendly interface (no ID memorization required)
• Profile Management: Speaker profile creation, updates, and synchronization across services
• API Integration: Comprehensive API clients for speaker and admin operations with proper error handling
• UI Components: Enhanced UI components (alerts, progress bars, switches) with dark mode support