Skip to content

CreateInfotech2024/frontend

Repository files navigation

Beauty LMS Frontend

This repository contains two frontends for the Beauty LMS video conferencing system:

  1. React TypeScript Frontend (in src/ directory) - Original web-based implementation
  2. Flutter Frontend (in flutter_app/ directory) - Cross-platform mobile and web application

🎯 Flutter App (Recommended)

The Flutter application provides the same functionality as the React frontend but with cross-platform support for Android, iOS, and Web.

Quick Start - Flutter

cd flutter_app
flutter pub get
flutter run

See flutter_app/README.md for detailed Flutter setup and usage instructions.

πŸ“± React Frontend (Legacy)

A React TypeScript frontend for testing the Beauty LMS video conferencing system, including meeting management, real-time chat, and participant features.

Quick Start - React

npm install
npm start

πŸš€ React Features

βœ… Implemented Features

  • Meeting Creation: Create new video meeting rooms with custom titles and descriptions
  • Meeting Joining: Join existing meetings using 6-digit meeting codes
  • Real-time Chat: Socket.IO powered chat system with message history
  • Participant Management: View and manage meeting participants in real-time
  • API Testing Suite: Comprehensive testing tool for all backend APIs
  • Responsive Design: Mobile-friendly interface with modern UI

πŸŽ₯ Video Conferencing Components

  • Meeting room interface with video placeholder
  • Participant list with real-time updates
  • Chat panel with system messages
  • Meeting controls (mute, camera, screen share placeholders)

πŸ§ͺ API Testing

  • Health check endpoint testing
  • Complete meeting lifecycle testing (create β†’ join β†’ get info β†’ get participants β†’ end)
  • Socket.IO connection testing
  • Real-time chat message testing
  • Comprehensive test result reporting

πŸ—οΈ Architecture

Frontend Structure

frontend/src/
β”œβ”€β”€ components/              # React components
β”‚   β”œβ”€β”€ APITester.tsx       # API testing interface
β”‚   β”œβ”€β”€ ChatPanel.tsx       # Real-time chat component
β”‚   β”œβ”€β”€ MeetingCreator.tsx  # Meeting creation form
β”‚   β”œβ”€β”€ MeetingJoiner.tsx   # Meeting join form
β”‚   β”œβ”€β”€ MeetingRoom.tsx     # Main meeting interface
β”‚   └── ParticipantsList.tsx # Participants management
β”œβ”€β”€ services/               # API and WebSocket services
β”‚   β”œβ”€β”€ apiService.ts       # REST API calls
β”‚   └── socketService.ts    # Socket.IO client
β”œβ”€β”€ App.tsx                 # Main application component
└── App.css                 # Styling

Key Services

  • API Service: Handles all REST API communication with the backend
  • Socket Service: Manages Socket.IO connections for real-time features
  • Meeting Management: Complete meeting lifecycle management
  • Chat System: Real-time messaging with participant notifications

πŸ› οΈ Setup & Installation

Prerequisites

  • Node.js 16+ and npm
  • Beauty LMS backend running on port 3000

Installation

# Navigate to frontend directory
cd frontend

# Install dependencies
npm install

# Start development server (will run on port 3001)
npm start

Dependencies

{
  "axios": "^1.6.0",           // HTTP client for API calls
  "socket.io-client": "^4.7.2", // Socket.IO client
  "react": "^18.2.0",          // React framework
  "typescript": "^4.9.5"       // TypeScript support
}

🎯 Usage Guide

1. Access the Application

2. Create a Meeting

  1. Click "πŸš€ Create New Meeting"
  2. Fill in host name, title, and description
  3. Click "πŸŽ₯ Create Meeting"
  4. You'll be automatically joined as the host

3. Join a Meeting

  1. Click "🎯 Join Existing Meeting"
  2. Enter the 6-digit meeting code
  3. Enter your participant name
  4. Click "πŸš€ Join Meeting"

4. Meeting Features

  • Real-time Chat: Send and receive messages instantly
  • Participant List: See who's in the meeting
  • Meeting Controls: Toggle chat, refresh data, leave/end meeting
  • System Messages: Automatic notifications for joins/leaves

5. API Testing

  1. Click "πŸ§ͺ API Testing" in the navigation
  2. Click "πŸš€ Run All Tests" to test all endpoints
  3. View detailed results with response data
  4. Check test summary for pass/fail statistics

πŸ”§ API Integration

REST API Endpoints

// Meeting Management
POST /api/meeting/create      // Create new meeting
POST /api/meeting/join        // Join existing meeting
GET  /api/meeting/:code       // Get meeting info
GET  /api/meeting/:code/participants // Get participants
DELETE /api/meeting/:code     // End meeting

// Health Check
GET  /health                  // Backend health status

Socket.IO Events

// Client β†’ Server
'join-meeting'    // Join meeting room
'leave-meeting'   // Leave meeting room
'chat-message'    // Send chat message

// Server β†’ Client
'chat-message'        // Receive chat message
'participant-joined'  // New participant notification
'participant-left'    // Participant left notification

πŸ§ͺ Testing Features

Manual Testing

  • Create and join meetings with multiple browser tabs
  • Test real-time chat between participants
  • Verify participant list updates
  • Test meeting end/leave functionality

Automated API Testing

The built-in API tester validates:

  • βœ… Backend health check
  • βœ… Meeting creation
  • βœ… Meeting information retrieval
  • βœ… Participant joining
  • βœ… Participant list retrieval
  • βœ… Socket.IO connectivity
  • βœ… Real-time chat messaging
  • βœ… Meeting termination

Test Results

  • Comprehensive pass/fail reporting
  • Detailed error messages and debugging info
  • Response data inspection
  • Timestamp tracking for all tests

🎨 UI/UX Features

Design System

  • Modern Gradient Background: Beautiful purple gradient
  • Glass Morphism Effects: Translucent panels with backdrop blur
  • Responsive Layout: Mobile-first design approach
  • Emoji Icons: Friendly and intuitive interface
  • Real-time Indicators: Connection status and participant counts

Interactive Elements

  • Hover Effects: Smooth transitions and feedback
  • Form Validation: Real-time input validation
  • Loading States: Visual feedback during API calls
  • Error Handling: User-friendly error messages
  • Success Animations: Satisfying interaction feedback

πŸ” Development Notes

TypeScript Integration

  • Full TypeScript support with proper typing
  • Interface definitions for all API responses
  • Type-safe component props and state management

Error Handling

  • Comprehensive error catching and user feedback
  • API error response parsing and display
  • Socket connection error management
  • Graceful degradation for offline scenarios

Performance Considerations

  • Efficient React component architecture
  • Minimal re-renders with proper dependency arrays
  • Optimized Socket.IO event handling
  • Lazy loading and code splitting ready

πŸš€ Future Enhancements

Planned Features

  • WebRTC Integration: Real video/audio streaming
  • Screen Sharing: Desktop sharing capabilities
  • Recording: Meeting recording and playback
  • File Sharing: Document and media sharing
  • User Authentication: Login and user management
  • Meeting Scheduling: Calendar integration

Technical Improvements

  • State Management: Redux/Zustand for complex state
  • Testing Suite: Jest and React Testing Library
  • PWA Support: Offline capabilities and installability
  • Performance Monitoring: Analytics and error tracking

πŸ“ž Support

For issues or questions:

  1. Check the API testing tool for backend connectivity
  2. Verify the backend server is running on port 3000
  3. Check browser console for detailed error messages
  4. Ensure Socket.IO connections are not blocked by firewall

🏷️ Version Information

  • Frontend Version: 1.0.0
  • React Version: 18.2.0
  • Backend Compatibility: Beauty LMS v1.0.0
  • Node.js: 16+ required
  • Browser Support: Chrome, Firefox, Safari, Edge (latest versions)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •