- React Native
- Expo
- Architecture
One codebase for the website and the app
Madar ships a website and a mobile app from a single Expo and React Native codebase. Where that helps, and where it does not.
Madar needed both a website and a mobile app. Building them as two separate products would have meant two implementations of the same permission model, two sets of screens for the same five roles, and two places for the monthly reporting logic to drift apart. Instead, both ship from one Expo and React Native codebase.
What is genuinely shared
The parts worth sharing are the ones that carry meaning: the data access layer, the permission checks, the task and reporting logic, and the Arabic RTL design tokens. Those are the pieces where a divergence between web and mobile becomes a bug rather than a design choice.
- Data access and server calls live in one place.
- Role and permission checks are written once and reused.
- Task timers and reporting rules are shared, not reimplemented.
- Arabic RTL tokens and typography stay consistent across both.
What should stay separate
Not everything benefits from sharing. Navigation patterns, gesture handling and screen density are genuinely different on a phone and in a browser. Forcing one component to serve both usually produces something that feels wrong in both places. The rule I follow is to share the logic and the design language, and let the presentation diverge where the platform demands it.
The result is that a change to how a task timer is enforced, or how a role is checked, lands in one commit and is correct on both platforms at once. That is the part that matters when the product is used every day.