The root layout (app/_layout.tsx) is the absolute entry point of the CommitT application. Before any screen renders, it wraps the entire component tree in a deeply nested provider architecture. Each layer depends on the one above it, and the order cannot be changed without breaking the system.
System reset capability. Increments an iteration counter to trigger full client rebirth on catastrophic failure.
2
SQLiteProvider
Initializes the local commit.db database. Runs migrateDbIfNeeded() on mount to detect schema mismatches and execute Nuke and Pave.
3
ConvexClientWrapper
Manages the lifecycle of the ConvexReactClient. Destroys and re-creates the client on each resurrection iteration.
4
SecurityShield
Root and jailbreak detection via JailMonkey. If a compromised device is detected, the entire tree below is unmounted and replaced with a violation screen.
5
GestureHandlerRootView
Required by react-native-gesture-handler for drag-and-drop and swipe gestures across the app.
6
KeyboardProvider
Powers react-native-keyboard-controller for smooth keyboard avoidance animations.
7
AppThemeProvider
Dark-mode theming and design token management.
8
HeroUINativeProvider
HeroUI component library initialization.
9
ThemeProvider
React Navigation theme (forced to pure black background).
The SecurityShield sits above the navigation stack. If a rooted device or jailbreak is detected, the entire app tree below is unmounted. There is no way to navigate around it.
Before any provider mounts, the root layout activates the global Logger polyfill:
Logger.installPolyfill();
This intercepts every console.log, console.warn, and console.error call across the entire app and writes them to persistent daily log files on disk. This is critical for Release builds where logcat access is unavailable.