@croacroa/react-native-template 1.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +187 -184
- package/.github/workflows/eas-build.yml +55 -55
- package/.github/workflows/eas-update.yml +50 -50
- package/CHANGELOG.md +106 -106
- package/CONTRIBUTING.md +377 -377
- package/README.md +399 -399
- package/__tests__/components/snapshots.test.tsx +131 -0
- package/__tests__/integration/auth-api.test.tsx +227 -0
- package/__tests__/performance/VirtualizedList.perf.test.tsx +362 -0
- package/app/(public)/onboarding.tsx +5 -5
- package/app.config.ts +45 -2
- package/assets/images/.gitkeep +7 -7
- package/components/onboarding/OnboardingScreen.tsx +370 -370
- package/components/onboarding/index.ts +2 -2
- package/components/providers/SuspenseBoundary.tsx +357 -0
- package/components/providers/index.ts +21 -0
- package/components/ui/Avatar.tsx +316 -316
- package/components/ui/Badge.tsx +416 -416
- package/components/ui/BottomSheet.tsx +307 -307
- package/components/ui/Checkbox.tsx +261 -261
- package/components/ui/OptimizedImage.tsx +369 -369
- package/components/ui/Select.tsx +240 -240
- package/components/ui/VirtualizedList.tsx +285 -0
- package/components/ui/index.ts +23 -18
- package/constants/config.ts +97 -54
- package/docs/adr/001-state-management.md +79 -79
- package/docs/adr/002-styling-approach.md +130 -130
- package/docs/adr/003-data-fetching.md +155 -155
- package/docs/adr/004-auth-adapter-pattern.md +144 -144
- package/docs/adr/README.md +78 -78
- package/hooks/index.ts +27 -25
- package/hooks/useApi.ts +102 -5
- package/hooks/useAuth.tsx +82 -0
- package/hooks/useBiometrics.ts +295 -295
- package/hooks/useDeepLinking.ts +256 -256
- package/hooks/useMFA.ts +499 -0
- package/hooks/useNotifications.ts +39 -0
- package/hooks/useOffline.ts +60 -6
- package/hooks/usePerformance.ts +434 -434
- package/hooks/useTheme.tsx +76 -0
- package/hooks/useUpdates.ts +358 -358
- package/i18n/index.ts +194 -77
- package/i18n/locales/ar.json +101 -0
- package/i18n/locales/de.json +101 -0
- package/i18n/locales/en.json +101 -101
- package/i18n/locales/es.json +101 -0
- package/i18n/locales/fr.json +101 -101
- package/jest.config.js +4 -4
- package/maestro/README.md +113 -113
- package/maestro/config.yaml +35 -35
- package/maestro/flows/login.yaml +62 -62
- package/maestro/flows/mfa-login.yaml +92 -0
- package/maestro/flows/mfa-setup.yaml +86 -0
- package/maestro/flows/navigation.yaml +68 -68
- package/maestro/flows/offline-conflict.yaml +101 -0
- package/maestro/flows/offline-sync.yaml +128 -0
- package/maestro/flows/offline.yaml +60 -60
- package/maestro/flows/register.yaml +94 -94
- package/package.json +175 -170
- package/services/analytics.ts +428 -428
- package/services/api.ts +340 -340
- package/services/authAdapter.ts +333 -333
- package/services/backgroundSync.ts +626 -0
- package/services/index.ts +54 -22
- package/services/security.ts +286 -0
- package/tailwind.config.js +47 -47
- package/utils/accessibility.ts +446 -446
- package/utils/index.ts +52 -43
- package/utils/validation.ts +2 -1
- package/utils/withAccessibility.tsx +272 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OnboardingScreen } from "@/components/onboarding";
|
|
2
|
-
|
|
3
|
-
export default function Onboarding() {
|
|
4
|
-
return <OnboardingScreen />;
|
|
5
|
-
}
|
|
1
|
+
import { OnboardingScreen } from "@/components/onboarding";
|
|
2
|
+
|
|
3
|
+
export default function Onboarding() {
|
|
4
|
+
return <OnboardingScreen />;
|
|
5
|
+
}
|
package/app.config.ts
CHANGED
|
@@ -34,7 +34,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
|
|
|
34
34
|
supportsTablet: true,
|
|
35
35
|
bundleIdentifier: getUniqueIdentifier(),
|
|
36
36
|
infoPlist: {
|
|
37
|
-
UIBackgroundModes: ["remote-notification"],
|
|
37
|
+
UIBackgroundModes: ["remote-notification", "fetch", "processing"],
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
android: {
|
|
@@ -43,12 +43,46 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
|
|
|
43
43
|
backgroundColor: "#ffffff",
|
|
44
44
|
},
|
|
45
45
|
package: getUniqueIdentifier(),
|
|
46
|
-
permissions: [
|
|
46
|
+
permissions: [
|
|
47
|
+
"NOTIFICATIONS",
|
|
48
|
+
"RECEIVE_BOOT_COMPLETED",
|
|
49
|
+
"FOREGROUND_SERVICE",
|
|
50
|
+
],
|
|
47
51
|
},
|
|
48
52
|
web: {
|
|
49
53
|
bundler: "metro",
|
|
50
54
|
output: "static",
|
|
51
55
|
favicon: "./assets/images/favicon.png",
|
|
56
|
+
// PWA Configuration
|
|
57
|
+
name: getAppName(),
|
|
58
|
+
shortName: "YourApp",
|
|
59
|
+
description: "A production-ready React Native application",
|
|
60
|
+
lang: "en",
|
|
61
|
+
themeColor: "#3b82f6",
|
|
62
|
+
backgroundColor: "#ffffff",
|
|
63
|
+
display: "standalone",
|
|
64
|
+
orientation: "portrait",
|
|
65
|
+
startUrl: "/",
|
|
66
|
+
scope: "/",
|
|
67
|
+
// PWA Icons for different sizes
|
|
68
|
+
icons: [
|
|
69
|
+
{
|
|
70
|
+
src: "./assets/images/icon.png",
|
|
71
|
+
sizes: "192x192",
|
|
72
|
+
type: "image/png",
|
|
73
|
+
purpose: "any maskable",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
src: "./assets/images/icon.png",
|
|
77
|
+
sizes: "512x512",
|
|
78
|
+
type: "image/png",
|
|
79
|
+
purpose: "any maskable",
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
// Enable service worker for offline support
|
|
83
|
+
serviceWorker: {
|
|
84
|
+
enabled: true,
|
|
85
|
+
},
|
|
52
86
|
},
|
|
53
87
|
plugins: [
|
|
54
88
|
"expo-router",
|
|
@@ -60,6 +94,15 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
|
|
|
60
94
|
color: "#ffffff",
|
|
61
95
|
},
|
|
62
96
|
],
|
|
97
|
+
[
|
|
98
|
+
"expo-background-fetch",
|
|
99
|
+
{
|
|
100
|
+
ios: {
|
|
101
|
+
backgroundModes: ["fetch"],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
"expo-task-manager",
|
|
63
106
|
],
|
|
64
107
|
experiments: {
|
|
65
108
|
typedRoutes: true,
|
package/assets/images/.gitkeep
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Placeholder for app assets
|
|
2
|
-
# Replace these files with your own:
|
|
3
|
-
# - icon.png (1024x1024)
|
|
4
|
-
# - splash.png (1284x2778)
|
|
5
|
-
# - adaptive-icon.png (1024x1024)
|
|
6
|
-
# - favicon.png (48x48)
|
|
7
|
-
# - notification-icon.png (96x96, white on transparent)
|
|
1
|
+
# Placeholder for app assets
|
|
2
|
+
# Replace these files with your own:
|
|
3
|
+
# - icon.png (1024x1024)
|
|
4
|
+
# - splash.png (1284x2778)
|
|
5
|
+
# - adaptive-icon.png (1024x1024)
|
|
6
|
+
# - favicon.png (48x48)
|
|
7
|
+
# - notification-icon.png (96x96, white on transparent)
|