Mobile App Guide
Mobile Offline Sync Engine & Architecture
Deep dive into YeneSchool mobile's offline-first architecture, local SQLite database storage, and automatic background synchronization.
Mobile Offline Sync Engine & Architecture
Unreliable or fluctuating internet connectivity is a common challenge in educational institutions. YeneSchool is engineered with an offline-first philosophy: the mobile application never blocks user productivity when internet connectivity drops.
1. What Operates Completely Offline on Mobile
The mobile app caches the latest school state on device storage:
- Full Student Rosters & Photos: Browse class lists and student profiles without an active connection.
- Attendance Roll-Call: Take daily, period, and bus attendance offline.
- Continuous Assessment & Grade Entry: Enter exam, quiz, and test scores.
- Offline Timetable & Class Schedules: View room assignments and period times.
- Discipline Incident Logging: Record student behavioral notes on the spot.
2. The Local SQLite Sync Queue
When an action is taken while offline:
- The app serializes the payload (e.g.,
attendance_records_batch) with a local unique UUID, monotonic timestamp, and cryptographic hash. - The payload is written to the device's local SQLite Database.
- A subtle Amber cloud indicator in the top navbar indicates: "3 unsynced actions stored locally".
- The user continues working with zero latency or spinner blocking.
3. Background Sync & Conflict Resolution Strategies
The moment network connectivity is re-established (via Wi-Fi or cellular data):
- Network Listener Trigger: The app detects the
onlinestate change. - Sequential Batch Flush: The sync worker iterates through the SQLite queue in strict chronological order and posts requests to the backend sync endpoint (
POST /sync/batch). - Conflict Resolution Strategy:
- Last-Write-Wins with Entity Timestamps: For grade score edits, the most recent verified timestamp prevails.
- Server Merge for Attendance: If attendance was marked on both mobile and web while split-brain, records are merged per student record.
- Queue Pruning: Successfully committed transactions are pruned from local storage to keep the device storage footprint minimal (< 25 MB).
- The navbar cloud icon turns green with a checkmark: "All Changes Synced".
Next Steps
- Platform Offline Mode (PWA) — Explore how desktop web offline mode operates
- Mobile App Overview — General mobile app architecture and setup
- Data Quality & Audits — Audit synced data integrity
QR & Barcode Attendance Scanning
Fast mobile camera-based student ID card scanning for morning gate attendance, classroom roll-call, cafeteria meals, and exam hall admission.
Documents & Compliance Overview
Centralized institutional document repository and student enrollment compliance system in YeneSchool.