Shared logic, native modules only with a reason, over-the-air updates tested.
Constitution — React Native app
Version 1.0.0 · Ratified 2026-11-10
These principles hold for every spec, plan and task of the project. A spec may add rules; it never weakens these.
-
Shared logic. Business rules, data access and validation live in plain TypeScript modules shared by iOS and Android.
Platform.selectand.ios.tsxfiles appear only at the edges of the UI. -
Native modules only with a reason. Expo SDK modules come first. A custom native module needs a reason in the plan and is written as an Expo Module with a config plugin; nobody edits the generated
ios/andandroid/folders by hand. -
Over-the-air updates tested. Every EAS Update goes to a preview channel and is tested on real iOS and Android devices before it is promoted. The
runtimeVersionpolicy keeps JavaScript from reaching a build with different native code, and the plan says how to roll back. -
Smooth on real devices. Long lists use FlashList or
FlatList, the app runs on Hermes and heavy work stays out of render. Startup time and scroll frame rate are measured on a mid-range Android device before release. -
Accessible by default. Touchable elements have
accessibilityRoleandaccessibilityLabel, font scaling is never disabled, and screens are checked with VoiceOver and TalkBack. -
Secrets in secure storage. Tokens and credentials are stored with
expo-secure-store, never in AsyncStorage. No secret is bundled in the JavaScript, because anyone can read it. -
Tested on both platforms. Logic and components are tested with Jest and React Native Testing Library, and the critical flows have Maestro end-to-end tests that run on iOS and Android. Both are green before the merge.