Overview
Open Mushaf Native is a modern cross-platform Quran Mushaf application built with Expo and React Native. The app provides a native reading experience on iOS, Android, and Web platforms with RTL (Right-to-Left) support optimized for Arabic content.Tech Stack
Framework
React Native 0.81.5 with React 19.1.0
Platform
Expo SDK 54 for cross-platform development
Routing
Expo Router 6 for file-based navigation
State Management
Jotai 2.12.4 with MMKV for persistence
Core Dependencies
package.json (key dependencies)
Project Structure
The application follows Expo’s recommended folder structure with clear separation of concerns:The
app/ directory uses Expo Router’s file-based routing convention. File and folder names directly map to app routes.Design Decisions
1. Cross-Platform Architecture
- Native (iOS/Android)
- Web
Uses MMKV for high-performance persistent storage with native bindings.
utils/storage/createStorage.ts
2. RTL (Right-to-Left) Support
The app enforces RTL layout for Arabic content at the root level:app/_layout.tsx
3. Performance Optimizations
- React Compiler: Enabled via Babel plugin for automatic optimization
- Reanimated: Used for 60fps animations and gestures
- MMKV: Synchronous, ultra-fast key-value storage
- Image Optimization: Expo Image for optimized image loading
- Code Splitting: Automatic with Expo Router
babel.config.js (excerpt)
4. Progressive Web App (PWA)
The app supports PWA deployment with offline capabilities:- Service worker with Workbox for caching
- Web manifest for installability
- Offline fallback page
Typography
The app uses Google Fonts optimized for Arabic:app/_layout.tsx
- Amiri: Traditional Arabic font for Quranic text
- Tajawal: Modern Arabic font for UI elements
Build & Deployment
Android
EAS Build with internal testing and production tracks
iOS
EAS Build for App Store distribution
Web
Firebase Hosting with PWA support
Development
Expo Go for rapid iteration
Testing Strategy
- Unit Tests: Jest with jest-expo preset
- Linting: ESLint with Expo config + Prettier
- Type Checking: TypeScript strict mode
- Pre-commit Hooks: Husky + lint-staged
package.json (scripts)
Environment Variables
Configuration is managed through Expo’s environment variables:EXPO_PUBLIC_TOP_MENU_HIDE_DURATION_MS: Auto-hide duration for top menu- Platform-specific builds via EAS profiles
All public environment variables must be prefixed with
EXPO_PUBLIC_ to be accessible in the app.