Files
Kordant/packages/mobile/App.tsx
Michael Freno a071aa736e feat: scaffold ShieldAI React Native mobile app MVP (FRE-4572)
Build complete Expo/React Native mobile app with:
- Auth flow: email/password login, registration, biometric auth
- Dashboard: exposure summary, spam stats, voice protection status
- DarkWatch: watch list management, exposure feed, alert toggles
- SpamShield: call/text history, whitelist/blacklist management
- VoicePrint: family member enrollment, voice analysis
- Settings: tier management, notification preferences, security
- Push notification integration via FCM/APNs
- Offline-first state management with Zustand + AsyncStorage
- Integration with @shieldai/mobile-api-client for API services
- React Navigation with auth-aware routing (stack + bottom tabs)
- Dark theme with consistent design system (colors, spacing, typography)
- Network status monitoring and offline request queuing

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-17 10:12:46 -04:00

30 lines
1.0 KiB
TypeScript

import React, { useEffect } from 'react';
import { StatusBar } from 'expo-status-bar';
import { NavigationContainer } from '@react-navigation/native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { useAuthStore } from '@/store/authStore';
import { AuthNavigator } from '@/navigation/AuthNavigator';
import { MainTabNavigator } from '@/navigation/MainTabNavigator';
import { usePushNotifications } from '@/hooks';
import '@/services/api';
export default function App() {
const { isAuthenticated } = useAuthStore();
const { registerForPushNotifications } = usePushNotifications();
useEffect(() => {
if (isAuthenticated) {
registerForPushNotifications();
}
}, [isAuthenticated, registerForPushNotifications]);
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<NavigationContainer>
<StatusBar style="light" />
{isAuthenticated ? <MainTabNavigator /> : <AuthNavigator />}
</NavigationContainer>
</GestureHandlerRootView>
);
}