How tranphuoctin/examguardapp works
Based on our analysis of the file structure and the README, Exam Guardian is a Flutter-based, multi-platform online examination app with advanced proctoring features (such as real‑time face monitoring and app switching detection). The architecture is modular and leverages clear separation of concerns via the Flutter Bloc pattern along with dedicated directories for features, data repositories, and core services.
Project Type & Purpose
• This is a full-stack Flutter application (client-side heavy) with multi-platform support (mobile, desktop, web) meant for secure online examinations.
• Its primary goal is to deliver a secure exam environment with interactive exam interfaces for students, proctoring features (e.g., face monitoring), and administration/teacher management modules.
Key Components
a. User Interface (UI) Layer:
• Represented by the Flutter frontend in the “lib” directory.
• Distinguish modules for different user roles: Student, Teacher, Admin, Authentication, and Common screens (splash, profile, homepage, etc.).
• That UI components interact with feature-specific views (e.g., exam interfaces, monitoring screens, login pages).
b. State Management Layer:
• Incorporate the Bloc/Cubit components (under various feature directories like “features/auth/cubit”, “features/student/exam/cubit”, etc.).
• That UI components dispatch events to these blocs, which govern state updates and trigger further actions.
c. Data & Repository Layer:
• Repositories listed in the “lib/data” and feature-specific repositories (i.e., auth_repository, exam_repository, cheating_repository, etc.).
• These components interface between the state management layer and the underlying data sources or external APIs.
• Use of network communication utilities (using Dio as indicated in “lib/configs/dio_client.dart”).
d. Service Layer:
• Services under the “lib/services” directory such as:
• Face Detection Service (integrates with ML Kit likely for real-time proctoring)
• Notification Service
• Monitoring Log Service
• Socket Service (for real-time interactions)
• How these services feed data to the Bloc layer or repository layer for handling live exam conditions.
e. Local Storage & Configuration:
• How Shared Preferences (shown in “lib/utils/share_preference”) are used for storing tokens (JWT authentication) and user configurations.
f. Platform-specific Layers:
• Platform-specific directories such as “android”, “ios”, “linux”, “macos”, “web”, and “windows”. This indicates that the app has platform-specific build configurations.
• You may simply denote these as different deployment targets but focus on their unified core Flutter code under “lib”.
Architectural Patterns & Design Principles
• Use of the Bloc pattern for state management to enforce separation of concerns.
• Modular organization of the project: distinct “features” directories (e.g., auth, student, teacher) representing different bounded contexts.
• Use of service and repository patterns for data fetching and external integrations.
• Rectangles for UI components and modules.
• Parallelograms for data repositories/services.