Skip to content

AhmedMSayed/Hemayatkom-webApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hemayatkom Web App

A Flutter web application for video calling and emergency support services. This app provides secure video communication with real-time signaling and post-call feedback functionality.

Features

  • πŸŽ₯ Video Calling: WebRTC-based video calling with high-quality audio/video
  • πŸ” Secure Authentication: Login system with validation
  • 🌐 Real-time Communication: Socket.io for signaling and real-time updates
  • πŸ“± Responsive Design: Works on desktop and mobile browsers
  • 🎨 Modern UI: Material Design 3 with custom theming
  • 🌍 Multilingual Support: Arabic and English interface elements
  • πŸ“ Location Sharing: GPS location sharing during calls
  • πŸ“Š Session Management: Post-call feedback and session tracking
  • πŸ”„ Auto-reconnection: Automatic socket reconnection on connection loss
  • ⚑ Error Handling: Comprehensive error handling and user feedback

Technology Stack

  • Frontend: Flutter Web
  • Real-time Communication: WebRTC, Socket.io
  • State Management: StatefulWidget with proper lifecycle management
  • HTTP Client: Dart HTTP package
  • Architecture: Clean architecture with separation of concerns

Project Structure

lib/
β”œβ”€β”€ main.dart                 # App entry point
β”œβ”€β”€ screens/                  # UI screens
β”‚   β”œβ”€β”€ login_screen.dart     # Authentication screen
β”‚   β”œβ”€β”€ join_screen.dart      # Main lobby/waiting screen
β”‚   └── call_screen.dart      # Video calling interface
β”œβ”€β”€ services/                 # Business logic services
β”‚   β”œβ”€β”€ signalling.service.dart  # Socket.io signaling
β”‚   └── api_service.dart      # HTTP API calls
β”œβ”€β”€ widgets/                  # Reusable UI components
β”‚   └── after_call_card.dart  # Post-call feedback widget
└── utils/                    # Utilities and constants
    β”œβ”€β”€ constants.dart        # App constants and configuration
    └── app_theme.dart        # Theme and styling

Getting Started

Prerequisites

  • Flutter SDK (>=3.8.0)
  • Dart SDK
  • Web browser (Chrome, Firefox, Safari, Edge)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd Hemayatkom-webApp
  2. Install dependencies

    flutter pub get
  3. Run the application

    flutter run -d chrome

Configuration

Update the configuration in lib/utils/constants.dart:

class AppConstants {
  // Network Configuration
  static const String websocketUrl = "https://your-server.com:443";
  static const String apiBaseUrl = "https://your-server.com";
  
  // Default Values (for development only)
  static const String defaultEmail = 'your-email@example.com';
  static const String defaultPassword = 'your-password';
}

Usage

Login

  1. Open the application in your web browser
  2. Use the demo credentials or configure your own authentication
  3. Click "Sign In" to access the main interface

Making a Call

  1. Enter the email address of the person you want to call
  2. Click the "Call" button
  3. Wait for the recipient to accept the call

Receiving a Call

  1. When someone calls you, an incoming call notification will appear
  2. Click "Accept" to join the call or "Decline" to reject it

Post-Call Feedback

After ending a call, you can provide feedback about the session status.

Development

Code Quality

  • Follow Flutter/Dart style guidelines
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Implement proper error handling

Testing

# Run tests
flutter test

# Run tests with coverage
flutter test --coverage

Building for Production

# Build web app
flutter build web

# Build with specific renderer
flutter build web --web-renderer html

Security Considerations

⚠️ Important: This application contains hardcoded credentials for demo purposes. In production:

  1. Remove hardcoded credentials from constants.dart
  2. Implement proper authentication with secure token storage
  3. Use HTTPS for all API communications
  4. Implement proper input validation and sanitization
  5. Add rate limiting for API calls
  6. Use environment variables for sensitive configuration

API Endpoints

The application communicates with the following endpoints:

  • POST /validateMobileCall - Validate callee for video calls
  • GET /session/open - Mark session as open
  • GET /session/closed - Mark session as closed

Browser Compatibility

  • βœ… Chrome 88+
  • βœ… Firefox 85+
  • βœ… Safari 14+
  • βœ… Edge 88+

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions, please contact the development team or create an issue in the repository.

Changelog

Version 2.0.0+1 (Latest)

  • βœ… Code Quality Improvements: Fixed all Flutter linter warnings and errors
  • βœ… Deprecated API Updates: Updated to use latest Flutter APIs (withValues, ColorScheme, etc.)
  • βœ… Debug Logging: Replaced print statements with proper debug logging using kDebugMode
  • βœ… Theme System: Enhanced Material Design 3 theming with proper color schemes
  • βœ… Error Handling: Improved error handling throughout the application
  • βœ… Code Organization: Better separation of concerns and cleaner architecture
  • βœ… Performance: Optimized build process and reduced bundle size

Version 1.0.0

  • Initial release with video calling functionality
  • Authentication system
  • Real-time signaling
  • Post-call feedback
  • Responsive design
  • Error handling and validation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors