Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .depcheckrc
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
{
"ignores": [
"@storybook/react-native",
"@storybook/addon-ondevice-controls",
"@storybook/addon-ondevice-actions",
"storybook",
"@storybook/react"
]
}
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ EXPO_PUBLIC_APP_ENV=production

# Feature Flags
EXPO_PUBLIC_ENABLE_PUSH_NOTIFICATIONS=true
EXPO_PUBLIC_STORYBOOK=false
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
open-pull-requests-limit: 5
ignore:
- dependency-name: "react"
versions: [">=20.0.0"]
labels:
- "dependencies"
- "automated"
reviewers: []
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Install dependencies
run: npm ci

- name: Check for high/critical vulnerabilities
run: npm run audit

Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
33 changes: 17 additions & 16 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
import * as Font from 'expo-font';
import { ExpoRoot } from 'expo-router';
import * as SplashScreen from 'expo-splash-screen';
import { StatusBar } from 'expo-status-bar';
import React, { useEffect, useRef } from 'react';
import { Alert, AppState, AppStateStatus, LogBox } from 'react-native';

import StorybookUI from './.rnstorybook';
import './global.css';

import * as Font from 'expo-font';
import * as SplashScreen from 'expo-splash-screen';
import { ErrorBoundary } from './src/components/common/ErrorBoundary';
import { requireEnvVariables } from './src/config/env';
import { initializeLogging } from './src/config/logging';
import { AuthProvider, useAdaptiveTheme } from './src/hooks';
import AppNavigator from './src/navigation/AppNavigator';
import { setupNotificationNavigation } from './src/navigation/linking';
import { apiClient } from './src/services/api';
import { crashReportingService } from './src/services/cashReporting';
import apiClient from './src/services/api/axios.config';
import { requestQueue } from './src/services/api/requestQueue';
import { crashReportingService } from './src/services/crashReporting';
import { mobileAuthService } from './src/services/mobileAuth';
import {
addNotificationReceivedListener,
getLastNotificationResponse,
registerForPushNotifications,
registerTokenWithBackend,
removeNotificationListener,
} from './src/services/pushNotifications';
import { requestQueue } from './src/services/requestQueue';
import { initializeSecureStorage } from './src/services/secureStorage';
import socketService from './src/services/socket';
import syncService from './src/services/syncService';
import { useAppStore } from './src/store';
import { syncService } from './src/services/syncService';
import { useAppStore, useNotificationStore } from './src/store';
import { handleCacheVersionUpdate } from './src/utils/cacheVersioning';
import { requireEnvVariables } from './src/utils/env';
import { appLogger } from './src/utils/logger';
import { handleNotificationReceived } from './src/utils/notificationHandlers';

Expand All @@ -35,7 +37,6 @@ SplashScreen.preventAutoHideAsync();
// SHOW_STORYBOOK flag based on environment variable
const SHOW_STORYBOOK = process.env.EXPO_PUBLIC_STORYBOOK === 'true';


// Centralized structured logging initialized on startup
requireEnvVariables();

Expand All @@ -56,7 +57,7 @@ if (__DEV__) {
}

const App = () => {
const theme = useAppStore((state) => state.theme);
const theme = useAppStore(state => state.theme);
useAdaptiveTheme();

const appStateRef = useRef<AppStateStatus>(AppState.currentState);
Expand Down Expand Up @@ -98,8 +99,8 @@ const App = () => {
crashReportingService.init();

// Initialize secure storage (Keychain/Keystore) for encrypted token storage
initializeSecureStorage().catch((error) => {
logger.error('Failed to initialize secure storage:', error);
initializeSecureStorage().catch(error => {
appLogger.errorSync('Failed to initialize secure storage:', error as Error);
// Continue app startup even if secure storage init fails
// (user will be prompted to re-authenticate if needed)
});
Expand All @@ -121,7 +122,7 @@ const App = () => {
socketService.connect();

// Initialize push notifications: request permissions and get device token
registerForPushNotifications().then(async (token) => {
registerForPushNotifications().then(async token => {
if (token) {
const { setPushToken, setTokenRegistered } = useNotificationStore.getState();
setPushToken(token);
Expand Down Expand Up @@ -235,7 +236,7 @@ const App = () => {
<ErrorBoundary>
<AuthProvider>
<StatusBar style={theme === 'dark' ? 'light' : 'dark'} />
<AppNavigator />
<ExpoRoot />
</AuthProvider>
</ErrorBoundary>
);
Expand Down
Loading