Getting Started
4 min read
Local-First Storage & Offline Engine
Deep dive into Mudawim's client-side storage architecture, self-healing database schemas, quota management, and privacy safeguards.
Storage Architecture#
Mudawim uses a high-performance Local-First hybrid storage engine.
text
┌─────────────────────────────────────────────────────────┐
│ Mudawim Client App │
├────────────────────────────┬────────────────────────────┤
│ In-Memory Cache (RAM) │ Fast UI Read/Write State │
├────────────────────────────┼────────────────────────────┤
│ LocalStorage / IndexedDB │ Persistent Local Database │
└────────────────────────────┴────────────────────────────┘- Primary Storage: Browser LocalStorage with automated size verification and fallback mechanisms.
- Zero Cloud Leakage: No data is ever transmitted to remote analytical endpoints or third-party servers.
- Offline Resilient: Once the web application is loaded, you can study, take timestamped notes, and review previous materials without an active internet connection (video playback itself requires connectivity to YouTube's CDN unless cached).
Self-Healing Database Validation#
Every time Mudawim loads from local storage, the database runs through validateAndRepairDb():
- Schema Migration: Missing fields in older schemas are safely backfilled with default properties without data loss.
- Streak Verification: Validates recorded
studyDatesagainst the calendar to ensure streak counts are mathematically exact. - Auto-Freeze Evaluation: Automatically applies active streak freeze tokens if yesterday was missed before breaking your streak.
- Duration Recalculation: Ensures total watched minutes across all courses accurately sum up completed video durations.
Browser Quota Monitoring#
Mudawim features real-time storage diagnostics:
- Tracks current JSON payload size in kilobytes.
- Warns users when approaching typical browser limits (e.g. 5MB–10MB LocalStorage caps).
- Provides one-click JSON backup downloads in Settings > Data Management.
Previous
5-Minute Quickstart GuideStep-by-step walkthrough to set up your profile, create your first workspace, import a YouTube playlist, and log your first study session.Next
Workspaces ManagementOrganize distinct fields of study into isolated workspaces with custom color accents, independent playlist rosters, and pace calculations.