How nguyenminhduc163/fire-guard-mobile works
Main System Components
a) IoT Hardware Layer:
• ESP8266 microcontroller
• Fire sensors
• Gas sensors
• Physical connectivity components
b) Backend Services Layer:
• Firebase services (evident from firebase_service.dart)
• REST API services (shown in api_service directory)
• Remote configuration services
• Notification services
c) Mobile Application Layer (Flutter):
• User Interface (Views)
• Business Logic (ViewModels)
• Data Models
• Service Layer
Component Relationships and Data Flow
a) IoT Layer → Backend Services:
• Data flow from sensors to the backend
• Real-time monitoring connections
• Emergency alert pathways
b) Backend Services → Mobile App:
• API communication paths
• Push notification flow
• Authentication flows
• Real-time data streams
c) External Services Integration:
• Google Maps integration
• News API connection
• Emergency services communication
• Weather API integration
Detailed Component Breakdown
For the Mobile App (based on the file structure):
Mobile Application
• Core Services
• Authentication (auth_model.dart)
• Sensor Management (sensor_model.dart)
• User Management (user_model.dart)
• Home Management (home_model.dart)
• Features
• Fire Detection
• Gas Detection
• Emergency Alerts
• Family Management
• News Feed
• Safety Skills
• External Integrations
• Maps
• Notifications
• Weather Services
Key Architectural Patterns to Highlight
• MVVM Architecture (evident from viewModel directory)
• Service-based architecture (service directory structure)
• Repository pattern (for data handling)
• Event-driven architecture (for real-time updates)
Implementation Details
• Firebase Authentication flow
• Real-time sensor data processing
• Emergency alert broadcast system
• Local storage implementation
• Multi-language support (shown by translations directory)