@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.
Files changed (70) hide show
  1. package/.github/workflows/ci.yml +187 -184
  2. package/.github/workflows/eas-build.yml +55 -55
  3. package/.github/workflows/eas-update.yml +50 -50
  4. package/CHANGELOG.md +106 -106
  5. package/CONTRIBUTING.md +377 -377
  6. package/README.md +399 -399
  7. package/__tests__/components/snapshots.test.tsx +131 -0
  8. package/__tests__/integration/auth-api.test.tsx +227 -0
  9. package/__tests__/performance/VirtualizedList.perf.test.tsx +362 -0
  10. package/app/(public)/onboarding.tsx +5 -5
  11. package/app.config.ts +45 -2
  12. package/assets/images/.gitkeep +7 -7
  13. package/components/onboarding/OnboardingScreen.tsx +370 -370
  14. package/components/onboarding/index.ts +2 -2
  15. package/components/providers/SuspenseBoundary.tsx +357 -0
  16. package/components/providers/index.ts +21 -0
  17. package/components/ui/Avatar.tsx +316 -316
  18. package/components/ui/Badge.tsx +416 -416
  19. package/components/ui/BottomSheet.tsx +307 -307
  20. package/components/ui/Checkbox.tsx +261 -261
  21. package/components/ui/OptimizedImage.tsx +369 -369
  22. package/components/ui/Select.tsx +240 -240
  23. package/components/ui/VirtualizedList.tsx +285 -0
  24. package/components/ui/index.ts +23 -18
  25. package/constants/config.ts +97 -54
  26. package/docs/adr/001-state-management.md +79 -79
  27. package/docs/adr/002-styling-approach.md +130 -130
  28. package/docs/adr/003-data-fetching.md +155 -155
  29. package/docs/adr/004-auth-adapter-pattern.md +144 -144
  30. package/docs/adr/README.md +78 -78
  31. package/hooks/index.ts +27 -25
  32. package/hooks/useApi.ts +102 -5
  33. package/hooks/useAuth.tsx +82 -0
  34. package/hooks/useBiometrics.ts +295 -295
  35. package/hooks/useDeepLinking.ts +256 -256
  36. package/hooks/useMFA.ts +499 -0
  37. package/hooks/useNotifications.ts +39 -0
  38. package/hooks/useOffline.ts +60 -6
  39. package/hooks/usePerformance.ts +434 -434
  40. package/hooks/useTheme.tsx +76 -0
  41. package/hooks/useUpdates.ts +358 -358
  42. package/i18n/index.ts +194 -77
  43. package/i18n/locales/ar.json +101 -0
  44. package/i18n/locales/de.json +101 -0
  45. package/i18n/locales/en.json +101 -101
  46. package/i18n/locales/es.json +101 -0
  47. package/i18n/locales/fr.json +101 -101
  48. package/jest.config.js +4 -4
  49. package/maestro/README.md +113 -113
  50. package/maestro/config.yaml +35 -35
  51. package/maestro/flows/login.yaml +62 -62
  52. package/maestro/flows/mfa-login.yaml +92 -0
  53. package/maestro/flows/mfa-setup.yaml +86 -0
  54. package/maestro/flows/navigation.yaml +68 -68
  55. package/maestro/flows/offline-conflict.yaml +101 -0
  56. package/maestro/flows/offline-sync.yaml +128 -0
  57. package/maestro/flows/offline.yaml +60 -60
  58. package/maestro/flows/register.yaml +94 -94
  59. package/package.json +175 -170
  60. package/services/analytics.ts +428 -428
  61. package/services/api.ts +340 -340
  62. package/services/authAdapter.ts +333 -333
  63. package/services/backgroundSync.ts +626 -0
  64. package/services/index.ts +54 -22
  65. package/services/security.ts +286 -0
  66. package/tailwind.config.js +47 -47
  67. package/utils/accessibility.ts +446 -446
  68. package/utils/index.ts +52 -43
  69. package/utils/validation.ts +2 -1
  70. 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: ["NOTIFICATIONS"],
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,
@@ -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)