Flutter desktop client for exam/assignment display and control. The app connects to a backend over WebSocket, receives activation/deactivation/timer events, fetches exam and student details through REST APIs, and renders information on a large-screen dashboard UI.
- Desktop-oriented layout with a left announcements panel and center student/timer cards.
- Persistent device identity: prompts once for PC name and saves it locally.
- Real-time backend communication over WebSocket.
- Activation flow to load live exam + student data from REST endpoints.
- Deactivation flow to reset the UI to sample values.
- Live timer updates from backend (
seconds -> HH:MM:SS).
- Flutter (Dart SDK >= 3.4.3 < 4.0.0)
web_socket_channelfor WebSocket communicationhttpfor REST API callspath_providerfor local file storage (pc_name.txt)
- Main application entry and UI logic:
lib/main.dart - App icon/logo asset:
assets/itfac-logo.png - Flutter configuration and dependencies:
pubspec.yaml
- If no saved PC name exists, a dialog asks the user to enter one.
- Value is saved to application documents directory as
pc_name.txt.
- App connects to:
ws://bcca-112-135-76-91.ngrok-free.app
- Immediately sends the saved/entered PC name to backend.
activate,<studentIndex>,<examId>- Sends
activate_received - Fetches exam details from
/api/v1/exams/{examId} - Fetches student details from
/api/v1/students/{studentIndex}
- Sends
deactivate- Resets screen data to sample placeholders
- Sends
deactivate_received
timer,<seconds>- Updates countdown text in
HH:MM:SS - Sends
timer_received
- Updates countdown text in
GET https://bcca-112-135-76-91.ngrok-free.app/api/v1/exams/{examId}GET https://bcca-112-135-76-91.ngrok-free.app/api/v1/students/{studentId}
The current implementation sends these headers:
Content-Type: application/jsonAuthorization: Bearer "ngrok-skip-browser-warning": "69420"
- Flutter SDK installed and available in
PATH - A desktop target enabled (Windows, macOS, or Linux)
Check setup:
flutter doctor- Clone the repository.
- Install dependencies:
flutter pub get- Run on your desktop platform:
flutter run -d windowsUse macos or linux target instead if needed.
flutter build windowsflutter build macosflutter build linux- This code currently keeps backend URLs and auth-related header values hardcoded in
lib/main.dart. - Consider moving environment-specific settings to a config layer (for example, compile-time defines via
--dart-define) for safer deployments.
- If the app cannot connect, verify the WebSocket host is reachable and still active.
- If data is not displayed after activation, check backend API responses for the provided IDs.
- If the PC name prompt appears repeatedly, ensure app has permission to write to its documents directory.
No license file is currently defined in this repository.

